®      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                          Safe-Inferred   Safe-InferredM#class of things that can be run in parallel and can be shortcuted. The funtion in parameter is called everytime an intermediate result is known, as soon as it returns True the intermediate results are returned (discarding those not yet available). the order of the lists must be preserved version without the maybes *version with two different types of result <version with a supplementary event which result is discarded    None!"(*+0246:<=M informations on playersthe status of a rule.(An informationnal structure about a rule%Type of a rule function.@ Input formsOEvents parametersRType agnostic result dataTType agnostic base eventV Base events]Composable eventsf(a container for a variable name and typeA NomexNE (Nomyx Expression No Effect) is a specialisation of the type that guaranties that the instructions will have no effects.A Nomex (Nomyx Expression) allows the players to write rules. within the rules, you can access and modify the state of the game. !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~i~}|{zyxwvutsrqponmlkjfgh]edcba`_^V\[ZYXWTURSOQPHNMLKJIFG@EDCBA89:;<=>?07654321/*+,-.)&('% !"#$L  !"#$%&(')*+,-./0765432189:;<=>?@EDCBAFGHNMLKJIOQPRSTUV\[ZYXW]edcba`_^fghi~}|{zyxwvutsrqponmlkjNoneM  register a callback on an event <register a callback on an event, disregard the event number =set an handler for an event that will be triggered only once 8broadcast a message that can be catched by another rule subscribe on a message ?on the provided schedule, the supplied function will be called durationdurationdurationdurationNone!" #event based on a radio input choiceMtriggers a choice input to the user. The result will be sent to the callback %the same, disregard the event number 1the same, suppress the event after first trigger event based on a text inputMtriggers a string input to the user. The result will be sent to the callback Oasks the player pn to answer a question, and feed the callback with this data. Oasks the player pn to answer a question, and feed the callback with this data. event based on a checkbox inputevent based on a button event based on a text area @ABCDE@EDCBANone!"+MArrayVar is an indexed array with a signal attached triggered at every change. | each indexed elements starts empty (value=Nothing). ua MsgVar is a variable with a message attached, allowing to trigger registered functions anytime the var if modified variable creation variable reading variable writing .modify a variable using the provided function delete variable Mcreate a new MsgVar and register callback in case of change (update, delete)  Fadds a callback for each of the MsgVar events: Create, Update, Delete 4get the messsage triggered when the array is filled get the association array initialize an empty ArrayVar \initialize an empty ArrayVar, registering a callback that will be triggered at every change _initialize an empty ArrayVar, registering a callback. the ArrayVar will be deleted when full qstore one value and the given index. If this is the last filled element, the registered callbacks are triggered. )      the MsgVar )callback on creation (called immediatly) callback on update callback on delete -event number generated for update and delete ,fgh     ,fgh     $     None1outputs a message to one player, dynamic version 0outputs a message to one player, static version  output a message to all players )output a constant message to all players get an output by number  )get an output by number, partial version !update an output "delete an output  !"#$%&  !"#$%&  !"#$%&  !"#$%&NoneM'AA meta rule is a rule that can juge the legality of another rule.(:activate a rule: change its state to Active and execute it*reject a rule: change its state to Suppressed and suppresses all its environment (events, variables, inputs) the rule can be activated again later14add a rule to the game, it will have to be activated35add a rule to the game as described by the parameters9Iallows a rule to retrieve its own number (for auto-deleting for example) ;activate or reject a rule<Ka rule can autodelete itself (generaly after having performed some actions)=#All rules from player p are erased:>3This rule will activate automatically any new rule.?,The meta rules are stored in a list variable@create the meta rule variableAadd a new metarule to the listB-use the list of meta rules to juge a new ruleDA rule will be always legalEA rule will be always illegalF&Player p cannot propose any more rulesGrule number rn cannot be deleted by any incoming rule we simulate the execution of an incoming rule to make sure it doesn't delete the immutable ruleHMsimulate the execution of rule "sim" and then run rule "test" over the resultI-sets a callback called for each rule proposeda default rule ''()*+,-./0123456789:;<=>?@ABCDEFGHIJ1HIJKLMN'()*+,-./0123456789:;<=>?@ABCDEFGHIJ1HNMLKJI'()*+,-./012345678>;H?@ABCDEFG<=9:IJ''()*+,-./0123456789:;<=>?@ABCDEFGHIJ None!"EMKget all the players LGet a specific player MSet the name of a player NSet the name of a player P Get the total number of players QGet all the players number R'Remove the player from the game (kick) Sperform an action for each current players, new players and leaving players returns the event numbers for arriving players and leaving playersTperform the same action for each players, including new players returns the event numbers for arriving players and leaving playersUOcreate a value initialized for each players manages players joining and leavingVccreate a value initialized for each players initialized to zero manages players joining and leavingZ&show a player name based on his number[!set victory to a list of players \give victory to one player ]2get the player number of the proposer of the rule KLMNOPQRSTUVWXYZ[\]^!OPQKLMNOPQRSTUVWXYZ[\]^!OQPKLMNOPQRSTUVWXYZ]^[\KLMNOPQRSTUVWXYZ[\]^ None !"+234=KM_the vote statistics, including the number of votes per choice, the number of persons called to vote, and if the vote is finished (timeout or everybody voted)d:a vote assessing function (such as unanimity, majority...)e%vote at unanimity every incoming rulefOcall a vote on a rule for every players, with an assessing function and a delayh'actions to do when the vote is finishedifcall a vote for every players, with an assessing function, a delay and a function to run on the resultjsvote with a function able to assess the ongoing votes. | the vote can be concluded as soon as the result is known.l0assess the vote results according to a unanimitymQassess the vote results according to an absolute majority (half voters plus one) n<assess the vote results according to a majority of x (in %) oEassess the vote results according to a fixed number of positive votesp'adds a quorum to an assessing function sCompute a result based on a quota of positive votes. the result can be positive if the quota if reached, negative if the quota cannot be reached anymore at that point, or still pending.tinumber of people that voted if the voting is finished, total number of people that should vote otherwise_`abcdefghijklmnopqrstuvwxyz{|}_`abcdefghijklmnopqrstuvwxyz{|}d_`abcefghijklmnopqrstvuwxyz{|}_`abcdefghijklmnopqrstuvwxyz{|}  Trustworthy^ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}  Safe-Inferred!"$+castle structure~A rule that does nothing%A rule that says hello to all playersaccount variable name and type&Create a bank account for each players%Permanently display the bank accountseach player wins X Ecu each day you can also try with "minutly" or "monthly" instead of "daily" and everything in the "time-recurrence" package2a player wins X Ecu if a rule proposed is accepted-a player can transfer money to another playerDhelper function to transfer money from first player to second player delete a rule_player pn is the king: we create a variable King to identify him, and we prefix his name with King?Monarchy: only the king decides which rules to accept or rejectRevolution! Hail to the king! This rule suppresses the democracy (usually rules 1 and 2), installs the king and activates monarchy.=set the victory for players having more than X accepted rules:will display the current time (when refreshing the screen)9will display the time at which the rule as been activatedOnly one player can achieve victory: No group victory. Forbidding group victory usually becomes necessary when lowering the voting quorum: a coalition of players could simply force a "victory" rule and win the game.SRule that state that you win. Good luck on having this accepted by other players ;)a majority vote, with the folowing parameters: a quorum of 2 voters is necessary for the validity of the vote the vote is assessed after every vote in case the winner is already known the vote will finish anyway after one daygChange current system (the rules passed in parameter) to absolute majority (half participants plus one),kick a player and prevent him from returningtriggers a referendum, if the outcome is yes player 2 will be kicked referendumOnKickPlayer :: Rule referendumOnKickPlayer = referendum " kick player 2" (void $ delPlayer 2);display a button and greets you when pressed (for player 1)'display a button to greet other players"~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~~~~  !"#$%&&'()*+,-./01234456789:;<=>?@AABCDEFGHIJKLMNNOPQRSTUVWXYYZZ[\]^_V`abcdefghijjklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPNOQNRSNRTNRUNRUNRVNWXNWYNWZNW[NW\NW]^_`^_a^_b^_c^_d^_e^_f^_g^_h^_i^_j^_k^_l^_m^_n^_o^pq^pr^ps^pt^pu^pv^pw^px^py^pz^p{^p|^p}^p~^p^p^p^p^p^p^p^p^p^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Nomyx-Language-0.7.0Paths_Nomyx_LanguageControl.ShortcutLanguage.Nomyx.ExpressionLanguage.Nomyx.EventsLanguage.Nomyx.InputsLanguage.Nomyx.VariablesLanguage.Nomyx.OutputsLanguage.Nomyx.RulesLanguage.Nomyx.PlayersLanguage.Nomyx.VoteLanguage.Nomyx.ExamplesLanguage.Nomyxversion getBinDir getLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName Shortcutableshortcut shortcut_ shortcut2 shortcut2bfromLeft fromRight VictoryInfo _vRuleNumber_vCond PlayerInfo _playerNumber _playerName_playAs RuleStatusRejectPendingActiveRuleInfo_rNumber_rName _rDescription _rProposedBy _rRuleCode_rRule_rStatus _rAssessedByRuleStatusSDeletedSActive EventHandler FieldResultfield fieldResult _fieldAddress FieldAddressFieldAddressElemIndexBindLBindRAppLAppRSumLSumR EventInfo _eventNumber _ruleNumbereventhandler _evStatus_env InputFormCheckboxRadioButtonTextAreaTextMsg RuleEventDeletedModifiedAddedRejected ActivatedProposedPlayerLeaveArriveSomeData SomeFieldFieldVictoryMessageTimeRuleEvInputEvent LiftNomexNE BaseEventShortcutEvents BindEvent EmptyEvent PureEventAppEventSumEventVvarNameExpSimu LiftEffect CatchError ThrowErrorBindReturnSelfRuleNumber CurrentTime SetVictory DelOutput UpdateOutput GetOutput NewOutput DelPlayer SetPlayerName GetPlayersGetRules ModifyRuleAddRule RejectRule ActivateRule ProposeRule SendMessage GetEventsDelEventOnEventDelVarWriteVarReadVarNewVarNomexNENomexNoEffectEffectEff InputNumber OutputNumberCodeVarName EventName EventNumberRuleCodeRuleTextRuleDescRuleName RuleNumber PlayerName PlayerNumber liftEffectpartial concatMapM$fOrdPlayerInfo $fOrdRuleInfo $fEqRuleInfo$fOrdEventInfo $fEqEventInfo$fShortcutableEvent$fMonadPlusEvent $fMonadEvent$fAlternativeEvent$fApplicativeEvent$fFunctorEvent $fShow(->) $fShowExp $fShowExp0$fMonadError[]Exp$fApplicativeExp $fFunctorExp $fMonadExprNumberrName rDescription rProposedBy rRuleCoderRulerStatus rAssessedBy playerNumber playerNameplayAs eventNumber ruleNumberevStatusenv fieldAddressonEventonEvent_ onEventOncedelEvent getEventsgetEventgetIntermediateResults sendMessage sendMessage_ onMessage onMessageOnceschedule schedule_ schedule' schedule'_getCurrentTimeoneWeekoneDayoneHour oneMinute baseEvent timeEvent messageEvent victoryEvent playerEvent ruleEventbaseInputEvent liftNomexNE inputRadio inputRadio' onInputRadio onInputRadio_onInputRadioOnce inputText onInputText onInputText_onInputTextOnce inputCheckboxonInputCheckboxonInputCheckbox_onInputCheckboxOnce inputButton onInputButtononInputButton_onInputButtonOnce inputTextareaonInputTextareaonInputTextarea_onInputTextareaOnceArrayVarMsgVarmessagevariableVEventVDeletedVUpdatednewVarnewVar_newVar'readVarreadVar_writeVar modifyVardelVarmsgVar newMsgVar newMsgVar_ newMsgVar'newMsgVarOnEvent writeMsgVar readMsgVar readMsgVar_ modifyMsgVar delMsgVar onMsgVarEventonMsgVarChangeonMsgVarDeletegetMsgVarMessage getMsgVarDatagetMsgVarData_ getMsgVarName newArrayVar newArrayVar_ newArrayVar'newArrayVarOnce cleanOnFullisFullArrayVar_ putArrayVar putArrayVar_ newOutput newOutput_ outputAll outputAll_ getOutput getOutput_ updateOutput delOutput displayVar displayVar'displaySimpleVardisplayArrayVarMetaRule activateRule activateRule_ rejectRule rejectRule_getRulesgetActiveRulesgetRulegetRulesByNumbers getRuleFuncsaddRuleaddRule_addRule'getFreeRuleNumber suppressRule suppressRule_suppressAllRules modifyRulegetSelfRuleNumber getSelfRuleactivateOrRejectRule autoDelete eraseAllRules autoActivate metaruleVarcreateMetaruleVar addMetaruletestWithMetaRulesdisplayMetaruleslegalillegal noPlayPlayer immutableRulesimulateonRuleProposedshowRule getPlayers getPlayer getPlayerName setPlayerNamemodifyPlayerNamegetPlayersNumbergetAllPlayerNumbers delPlayer forEachPlayerforEachPlayer_createValueForEachPlayercreateValueForEachPlayer_getValueOfPlayermodifyValueOfPlayermodifyAllValues showPlayer setVictory giveVictorygetProposerNumbergetProposerNumber_ VoteStats voteCountsnbParticipants voteFinishedAssessFunction unanimityVote callVoteRule callVoteRule' finishVotecallVotevoteWith singleVote unanimitymajority majorityWith numberVotes withQuorum getVoteStatscounts voteQuotanbVotersnotVotedvoted displayVotegetVotesgetBooleanResultshowOnGoingVoteshowFinishedVoteshowVote showChoicenothing helloWorldaccountscreateBankAccountdisplayBankAccount winXEcuPerDaywinXEcuOnRuleAccepted moneyTransferdelRulemakeKingkingmonarchy revolution victoryXRules victoryXEcudisplayCurrentTimedisplayActivateTimenoGroupVictoryiWinvoteWithMajorityreturnToDemocracy banPlayer gameMaster bravoButton enterHaikucatchIObindirlibdirdatadir libexecdir sysconfdirgetInputResultexecuteAndScheduleNextexecuteAndScheduleNext'baseInputRadio baseInputTextbaseInputCheckboxbaseInputButtonbaseInputTextarea showArrayVar defaultRule getFreeNumber mapMaybeMCastletransfermakeGM helloButtontowersdungeontournamentMasterCandidatescastlesbaseGHC.Base++foldrGHC.Listconcatfilterzipmapfail>>=>>fmapreturn Control.MonadguardliftMjoinMonadFunctor MonadPlusfoldMzipWith Data.List intercalateunwordswordsunlineslinesproductsumfoldl1'foldl1foldl'unfoldrsortBysort permutations subsequencestailsinitsgroupBygroupdeleteFirstsByunzip7unzip6unzip5unzip4zipWith7zipWith6zipWith5zipWith4zip7zip6zip5zip4genericReplicate genericIndexgenericSplitAt genericDrop genericTake genericLength minimumBy maximumByminimummaximuminsertByinsert mapAccumR mapAccumL partition transpose intersperse intersectBy intersectunionByunion\\deleteBydeletenubBynub isInfixOf isSuffixOf isPrefixOf findIndices findIndexfind elemIndices elemIndex stripPrefix dropWhileEndmfilterapliftM5liftM4liftM3liftM2unlesswhen replicateM_ replicateMfoldM_ zipWithM_zipWithM mapAndUnzipMvoidforever<=<>=>msumforM_forMfilterMmapM_mapM sequence_sequence=<<mplusmzerounzip3unzipzipWith3zip3!! concatMaplookupnotElemelemallanyorandreversebreakspansplitAtdroptake dropWhile takeWhilecycle replicaterepeatiteratescanr1scanrfoldr1scanl1scanlfoldllengthnullinitlasttailhead time-1.4.2Data.Time.Clock.UTCDiff diffUTCTime addUTCTimeData.Time.Clock.UTC utctDayTimeutctDayUTCTimeNominalDiffTimeData.Time.Clock.ScalepicosecondsToDiffTimesecondsToDiffTimegetModJulianDate ModJulianDate UniversalTimeDiffTimetime-recurrence-0.9.2Data.Time.Recurrence.SchedulestartingevalrecurwithStartOfWeekbyyearlymonthlyweeklydailyhourlyminutelysecondlyFreqRecurAndSchedule$Data.Time.Recurrence.ScheduleDetailsselectenumScheduleDetailsSecondsMinutesHoursDaysWeeksWeekDaysWeekDaysInWeekWeekDaysInMonthMonthsYearDays PeriodFilterfromEPFEPFEnumerablePeriodFilterfromFPFFPFFilterablePeriodFilterfromSPFSPFSelectablePeriodFilterData.Time.Moment.MomentMoment#Data.Time.CalendarTime.CalendarTimecalendarTimeZonecalendarYearDaycalendarWeekDay calendarYear calendarMonth calendarDay calendarHourcalendarMinutecalendarSecond CalendarTimeData.Time.Calendar.MonthJanuaryFebruaryMarchAprilMayJuneJulyAugust SeptemberOctoberNovemberDecemberMonthData.Time.Calendar.WeekDayMondayTuesday WednesdayThursdayFridaySaturdaySundayWeekDayData.Time.Recurrence.AndThen>==>AndThen