eK      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  Safe-Inferred  None The state of the game: informations on players the status of a rule. )An informationnal structure about a rule , Return type of a rule function. + it can be either nothing or another rule. /Type of a rule function. 6!data associated with each events E events names Z events types ^stores the variable's data c)a container for a variable name and type f>A Nomex (Nomyx Expression) allows the players to write rules. F | within the rules, you can access and modify the state of the game. 6 | It is a compositional algebra defined with a GADT. 'an equality that tests also the types. >Replaces all instances of a value in a list by another value.   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Value to search Value to replace it with  Input list  Output list   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~f~}|{zyxwvutsrqponmlkjihgcde^_`ab]Z\[SYXWVUTRQPONMELKJIHGF6CA?=;97DB@><:8012345/,.-)+* !"#$%&'(  Q  !"#$%&'()+*,.-/0123456CA?=;97DB@><:8ELKJIHGFMNOPQRSYXWVUTZ\[]^_`abcdef~}|{zyxwvutsrqponmlkjihgNone-VArrayVar is an indexed array with a signal attached to warn when the array is filled. ieach indexed elements starts empty (value=Nothing), and when the array is full, the signal is triggered. lThis is useful to wait for a serie of events to happen, and trigger a computation on the collected results. variable creation variable reading variable writing .modify a variable using the provided function delete variable initialize an empty ArrayVar einitialize an empty ArrayVar, registering a callback that will be triggered when the array is filled 6initialize an empty ArrayVar, registering a callback. _the callback will be triggered when the array is filled, and then the ArrayVar will be deleted qstore one value and the given index. If this is the last filled element, the registered callbacks are triggered. 4get the messsage triggered when the array is filled get the association array 6get the association array with only the filled values  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 =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 ;activate a rule: change its state to Active and execute it mreject a rule: change its state to Suppressed and suppresses all its environment (events, variables, inputs) ' the rule can be activated again later 6add a rule to the game, it will have to be activated Mtriggers 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 %the same, disregard the event number Atriggers a choice input to the user, using an enumerate as input %the same, disregard the event number 1the same, suppress the event after first trigger Mtriggers 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. get all the players Get a specific player Set the name of a player Set the name of a player =Get the total number of playersgetPlayersNumber :: Nomex Int Get all the players number 'Remove the player from the game (kick) !set victory to a list of players give victory to one player  outputs a message to one player Jallows a rule to retrieve its self number (for auto-deleting for example) a default rule [ZZZNone4This rule will activate automatically any new rule. CThis rule will forbid any new rule to delete the rule in parameter (immutableRule :: RuleNumber -> RuleFunc )immutableRule rn = return $ Meta f where  f r = do  protectedRule < - getRule rn  case protectedRule of ) Just pr -> case _rRuleFunc r of / RuleRule paramRule -> paramRule pr ( _ -> return $ BoolResp True + Nothing -> return $ BoolResp True A rule will be always legal A rule will be always illegal Aactive metarules are automatically used to evaluate a given rule Dany new rule will be activate if the rule in parameter returns True ]Performs a vote for a rule on all players. The provided function is used to count the votes. i the assessors allows to configure how and when the vote will be assessed. The assessors can be chained. assess the vote on every new vote with the assess function, and as soon as the vote has an issue (positive of negative), sends a signal xassess the vote with the assess function when time is reached, and sends a signal with the issue (positive of negative) xassess the vote with the assess function when time is elapsed, and sends a signal with the issue (positive of negative) massess the vote only when every body voted. An error is generated if the assessing function returns Nothing. 4players that did not voted are counted as negative. 2clean events and variables necessary for the vote Ia quorum is the neccessary number of voters for the validity of the vote 'adds a quorum to an assessing function Gassess the vote results according to a unanimity (everybody votes for)  fassess the vote results according to an absolute majority (half voters plus one, no quorum is needed) !<assess the vote results according to a majority of x (in %) "Jassess the vote results according to a necessary number of positive votes #*helper function for assessement functions $4get the number of positive votes and negative votes %4get the number of positive votes and negative votes &get only those who voted 'get only those who voted (activate or reject a rule )Lperform an action for each current players, new players and leaving players *@perform the same action for each players, including new players +,create a value initialized for each players $manages players joining and leaving ,@create a value initialized for each players initialized to zero $manages players joining and leaving /&Player p cannot propose anymore rules 0La rule can autodelete itself (generaly after having performed some actions) 1$All rules from player p are erased: 1      !"#$%&'()*+,-./01231      !"#$%&'()*+,-./01231      !"#$%&'()*+,-./0123*      !"#$%&'()*+,-./0123None4A rule that does nothing 5&A rule that says hello to all players 6account variable name and type 7'Create a bank account for each players 8 each player wins X Ecu each day  you can also try with minutly or monthly instead of daily and everything in the time-recurrence package 93a player wins X Ecu if a rule proposed is accepted :.a player can transfer money to another player \ it does not accept new players or check if balance is positive, to keep the example simple ;delete a rule <Bplayer 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 reject ?Revolution! Hail to the king! g 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 B2will display the time to all players in 5 seconds C7Only one player can achieve victory: No group victory. U 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. DTRule that state that you win. Good luck on having this accepted by other players ;) Ea majority vote, FYChange unanimity vote (usually rule 1) to absolute majority (half participants plus one) G-kick a player and prevent him from returning 456789:;<=>?@ABCDEFG      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~456789:;<=>?@ABCDEFG456789:;E=<>?@ABCDFG456789:;<=>?@ABCDEFGNoneIevaluate an expression. M The rule number passed is the number of the rule containing the expression. HIJKLMNOPQRSTUVWXYZ[\]^_`HIJKLMNOPQRSTUVWXYZ[\]^_`HIJKLMNOPQRSTUVWXYZ[\]^_`HIJKLMNOPQRSTUVWXYZ[\]^_`NoneEabcdefghijklmnopqrstuvwxyz{|}~Eabcdefghijklmnopqrstuvwxyz{|}~Eghijklmnopqrstuvwxyz{|dfe}~acbAacbdfeghijklmnopqrstuvwxyz{|}~ NoneK      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`Noneinitialize the game. join the game. leave the game.  insert a rule in pending rules. ;An helper function to use the state transformer GameState. ( It additionally sets the current time. -        !"#$%%&'()*+,-./.0123456789:;<=>?@ABCDEFGHIJKLMNOPJKLMQNRSTUVWXPYZ[\\]^_``abcdefgh[ijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnomnpmqrmqsmqtmqtmqumvwmvxmvymvzmv{mv|}~}~}~}~}~}~}~}~}~}~}~}~}~}~}~}~}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}Nomyx-Language-0.2.0Paths_Nomyx_LanguageLanguage.Nomyx.ExpressionLanguage.Nomyx.DefinitionLanguage.Nomyx.RuleLanguage.Nomyx.ExamplesLanguage.Nomyx.EvaluationLanguage.Nomyx.TestLanguage.Nomyx.GameLanguage.Nomyxversion getBinDir getLibDir getDataDir getLibexecDirgetDataFileNameGameDesc_desc_agoraGame _gameName _gameDesc_rules_players _variables_events_outputs_victory _currentTime PlayerInfo _playerNumber _playerName SubmitRule RuleStatusRejectPendingActiveRule_rNumber_rName _rDescription _rProposedBy _rRuleCode _rRuleFunc_rStatus _rAssessedByBoolRespMsgRespRuleRespMetaVoidRuleFunc EventHandlerEH _eventNumber _ruleNumbereventhandler EventData VictoryData victoryDataInputStringDatainputStringDataInputChoiceDatainputChoiceData MessageData messageDataTimeDatatimeDataRuleDataruleData PlayerData playerDataEventVictory InputString InputChoiceMessageTimeRuleEvPlayerEvRule RuleEventDeletedModifiedAddedRejected ActivatedProposedLeaveArriveOutputVar _vRuleNumber_vNamevDataVvarNameNomex CatchError ThrowErrorBindReturnSelfRuleNumber CurrentTime SetVictory DelPlayer SetPlayerName GetPlayersGetRules ModifyRuleDelRuleAddRule RejectRule ActivateRule ProposeRule SendMessage DelAllEventsDelEventOnEventDelVarWriteVarReadVarNewVarCodeGameNameVarName EventName EventNumberRuleCodeRuleTextRuleDescRuleName RuleNumber PlayerName PlayerNumber=== replaceWithtracePNgameNamegameDescrulesplayers variableseventsoutputsvictory currentTimedescagorarNumberrName rDescription rProposedBy rRuleCode rRuleFuncrStatus rAssessedBy playerNumber playerName eventNumber ruleNumber vRuleNumbervNameArrayVarnewVarnewVar_readVarreadVar_writeVar writeVar_ modifyVardelVardelVar_ newArrayVar newArrayVar'newArrayVarOnceisFullArrayVar putArrayVargetArrayVarMessagegetArrayVarDatagetArrayVarData' delArrayVaronEventonEvent_ onEventOnce onEventOnce_delEvent delEvent_ delAllEvents sendMessage sendMessage_ onMessage onMessageOncescheduleexecuteAndScheduleNext schedule_ schedule'executeAndScheduleNext' schedule'_ activateRule activateRule_ rejectRule rejectRule_getRulesgetActiveRulesgetRulegetRulesByNumbers getRuleFuncsaddRuleaddRule_addRuleParams_ suppressRule suppressRule_suppressAllRules modifyRule inputChoiceinputChoiceHeadinputChoiceEnum inputString onInputChoiceonInputChoice_onInputChoiceOnceonInputChoiceOnce_onInputChoiceEnumonInputChoiceEnum_onInputChoiceEnumOnce_ onInputStringonInputString_onInputStringOnce_ getPlayers getPlayer getPlayerName setPlayerNamemodifyPlayerNamegetPlayersNumbergetAllPlayerNumbers delPlayer setVictory giveVictoryoutput outputAllgetCurrentTimegetSelfRuleNumber getSelfRulegetSelfProposedByPlayer mapMaybeM parse822TimesndMaybevoidRule andMsgBool andMsgMsg defaultRuleAssessorVoteDatamsgEndvoteVar inputNumbersassessFunction CountVotesVote ForAgainstAgainstFor autoActivatelegalillegalcheckWithMetarules maybeMetaRuleonRuleProposedvoteWithassessOnEveryVotesassessOnTimeLimitassessOnTimeDelayassessWhenEverybodyVoted noStatusQuo cleanVoteassessOnlyVotersquorum withQuorum unanimitymajority majorityWithnumberPositiveVotes voteQuotanbFor nbAgainstvoters getOnlyVotersactivateOrReject forEachPlayerforEachPlayer_createValueForEachPlayercreateValueForEachPlayer_modifyValueOfPlayermodifyAllValues noPlayPlayer autoDelete eraseAllRulesoneDay maybeWhennothing helloWorldaccountscreateBankAccount winXEcuPerDaywinXEcuOnRuleAccepted moneyTransferdelRulemakeKingkingmonarchy revolution victoryXRules victoryXEcu displayTimenoGroupVictoryiWinvoteWithMajorityreturnToDemocracy banPlayerEvaluateevalExp triggerEvent errorHandler triggerChoiceexecChoiceHandler findEvent findChoiceoutputS getFreeNumber evProposeRuleevActivateRule evRejectRule evAddRule evDelRule evModifyRule addPlayer evDelPlayer evChangeName evInputChoice evTriggerTime delVarsRule delEventsRule traceState runEvalErrorChoice2YouMeChoiceSarkozyHollanddate1date2date3testGametestRule evalRuleFuncexecRuleFuncEventexecRuleFuncGameexecRuleFuncEventGame execRuleFunctestsallTeststestVar1 testVarEx1testVar2 testVarEx2testVar3 testVarEx3testVar4 testVarEx4testVar5 testVarEx5testSingleInputtestSingleInputExtestInputStringtestInputStringExtestSendMessagetestSendMessageExtestSendMessage2testSendMessageEx2testUserInputWritetestUserInputWriteExtestActivateRuletestActivateRuleExtestAutoActivateEx testTimeEventtestTimeEventExtestTimeEvent2testTimeEventEx2voteGameActions voteGame'voteGame voteGameTimed unanimityRuleapplicationMetaRuleRuletestApplicationMetaRuleVotetestApplicationMetaRuleExtestVoteAssessOnVoteComplete1testVoteAssessOnVoteComplete2testVoteAssessOnEveryVotes1testVoteAssessOnEveryVotes2testVoteAssessOnEveryVotes3testVoteAssessOnEveryVotes4testVoteMajorityWithtestVoteNumberPositiveVotestestVoteWithQuorum1testVoteWithQuorum2testVoteAssessOnTimeLimit1testVoteAssessOnTimeLimit2testVoteAssessOnTimeLimit3testVoteAssessOnTimeLimit4testVoteAssessOnTimeLimit5 testVoteRule LoggedGame_game_gameLog GameEvent SystemAddRule TimeEvent OutputPlayerInputStringResultInputChoiceResult ProposeRuleEv LeaveGameJoinGame GameSettings emptyGamegamegameLogupdateupdate' getLoggedGamegetTimes execWithGame execWithGame' activeRules pendingRules rejectedRulescatchIObindirlibdirdatadir libexecdir $fShowGame $fReadGame $fOrdGame$fEqGame $fOrdRule$fEqRule$fShowRuleResp$fOrdEventHandler$fEqEventHandler$fShowEventHandler$fEqVar $fShowVar $fShowNomex$fMonadError[]Nomex$fApplicativeNomex$fFunctorNomex $fMonadNomex$fBooleanNomexbaseGHC.Base++foldrGHC.Listconcatfilterzipmapfail>>=>>fmapreturn Control.MonadguardliftMMonadFunctor MonadPlusfoldMzipWith Data.Listunwordswordsunlineslinesproductsumfoldl1'foldl1foldl'unfoldrsortBysort permutations subsequencestailsinitsgroupBygroupdeleteFirstsByunzip7unzip6unzip5unzip4zipWith7zipWith6zipWith5zipWith4zip7zip6zip5zip4genericReplicate genericIndexgenericSplitAt genericDrop genericTake genericLength minimumBy maximumByminimummaximuminsertByinsert mapAccumR mapAccumL partition transpose intercalate intersperse intersectBy intersectunionByunion\\deleteBydeletenubBynub isInfixOf isSuffixOf isPrefixOf findIndices findIndexfind elemIndices elemIndex stripPrefix dropWhileEndmfilterapliftM5liftM4liftM3liftM2unlesswhen replicateM_ replicateMfoldM_ zipWithM_zipWithM mapAndUnzipMjoinvoidforever<=<>=>msumforM_forMfilterMmapM_mapM sequence_sequence=<<mplusmzerounzip3unzipzipWith3zip3!! concatMaplookupnotElemelemallanyorandreversebreakspansplitAtdroptake dropWhile takeWhilecycle replicaterepeatiteratescanr1scanrfoldr1scanl1scanlfoldllengthnullinitlasttailhead time-1.4.0.1Data.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 gameSettingsjoinGame leaveGame proposeRule TimedEvent$fOrdLoggedGame$fEqLoggedGame enactEventenactTimedEventevalTimedEvent outputPlayerinputChoiceResultinputStringResult mapStateIO createRule systemAddRule$fOrdPlayerInfo