.}F      !"#$%&'()*+,-./0123456789:;<=>?@ABCDE unportable experimentaljochem@functor.nl!The type that represents a time. /The type that represents a process identifier.  unportable experimentaljochem@functor.nl'A ! is an action that can be run. A  has  three parameters: , * The first is the process to which this  belongs. 1 * The second is a primitive action to be run. ( * The third is Maybe a continuation. Existential type for the  type. The Action! GADT. This is a GADT with three  parameters; an Action pkt st a is a action where 5 * pkt denotes the packet type of incoming packets / * st denotes the state that can be modified  and inspected ' * a denotes the result value of the Action F9GADT for the primitive actions. These are the primitives  Hasim supports. A PrimAction pkt st a is a primitive action where  * pkt# is the packet type the associated  supports.  * st is the state of the associated .  * a' is the return type of the PrimAction. 0 (this is why we need a GADT; the return type & varies for each primitive action). :(Unfortunately, the documentation for each constructor is C not available in the generated output due to a glitch in Haddock. / You can use the source, which is documented.) Existential type for a . A  is a Proc pkt  for some pkt. The type of result of the  An acceptor of a pkt is an , which is either  * Refuse6 if the packet is to be delivered at a later time, or  never, of course  *  Parallel act3 if a current computation should not be suspended, $ but the state should be changed.  *  Interrupt act1 if the current computation should be suspended. A  Proc st pkt8 is a process that potentially accepts packets of type  pkt while maintaining state st. -The list of acceptors with the continuations  after the WithAcceptor. &The current wakeup function, if any. )The starting action. Loses its relevance " after startup of the simulation. /The identifier of this process. Must be unique 0 or hell will ensue. Guaranteed to be unique by  the creator of the process. !1The name of the process. Determined by the user, 4 may be any string. Used for displaying information  to the user. "The state of the process. # Finds the # (existential type) belonging to a . GHI$'Converts a process with an action to a . #  !"#$# !" #$#   !" !"#$ unportable experimentaljochem@functor.nlJKThe state of the SimMonad LM%The identifier that will be used for  the next process NAll processes that are created %The simulation monad called % . In this . monad you can define a simulation to be run. &%Data type representing a simulation. O'P"The initial state of the SimMonad Q0Increase the current identifier of the SimMonad R.Append a process to the state of the SimMonad (Make an anonymous process. )3Make a process with a name. This name will be used  in logging and error messages The name of the new process. "The initial state of the process. S*Set the action of the process. .The process of which the action should be set The action to be set +?Create a simulation from a SimMonad (a simulation definition).  If the simulation is invalid, T will be called. UVW%&'()*+&'%'()*+%&''()*+ unportable experimentaljochem@functor.nl,=Discrete Event Set. A discrete event set is a data structure  that supports the operations 3 and 2. XY-Event. An event consists of a  and a  Z.The ! at which the event takes place. /The ! that should be run at this time 0The process of an - 1!Is the Discrete Event Set empty? 29Get an event with lowest time that will take place next.  Returns a tuple  (evt, des) where evt is the next -  and des is the new , where this event is removed. Calls T if the , is empty. [3<Schedule an event in a discrete event set. Note that an old C event of the same process is removed from the discrete event set. (The time at which the event takes place The ! that should be run at that time The old discrete event set ,The discrete event set with the event added 4 Create a new , . For each , an - is scheduled  at time 0 and with  the associated  of the . The list of processes  IO, with result the created DES 5An empty discrete event set. ,-./012345 -././0,45123 ,-././012345 unportable experimentaljochem@functor.nl6:A watch map. This data structure represents a relation on  processes. \]7Add the tuple (p1, p2) to the relation.  p1 p2old 6 new 6 8Remove the tuple (p1, p2)# from the relation, if it existed.  p1 p2old 6 new 6 9 Find all p1 such that (p1, p2) is in the relation. The 6 to be queried  p2 The list of p1's : An empty 6. 6789:6:9786789: unportable experimentaljochem@functor.nl"^The state of the simulation. _`abcd?The simulation run monad, composed of IO plus the state monad. ;Run the simulation. e/Given a DES, the initial simulation run state. fReturn the current DES. g Set the DES. hReturn the current Watchmap. iSet the Watchmap. jReturn the current time. kSet the current time. l1Return the next event to be run in the DES, and  update the DES. m5Run the simulation. Return only if the DES is empty. n$Warp to the time of the next event. oRun an event. p Schedule a  at a certain time in the DES. $ All other Runnables of the related  are removed. qSame as p#, but only execute if the Runnable  is a Just. r Schedule a  at the current time. All other  Runnables of the related  are removed. sSame as r#, but only execute if the Runnable  is a Just. t#Execute the PopAcceptor primitive. u'Return the head of the acceptor stack. vAdd a watch to the Watchmap. The process that watches. #The process that is being watched. wExecute a Send primitive The sender process The packet to be sent The receiver process The maximum time of sending The continuation xExecute the Unwatch primitive. The process that watched "The process that is being watched yConcatenate two s. Because of lack of 5 type information, there is no flow of return values  between the two s. z:Same as rcat, but now the right hand side may be Nothing,  in which case nothing is done. {!Push an acceptor onto the stack. |$Execute the WithAcceptor primitive. -The process that is executing this primitive "The acceptor that is being pushed  onto the stack The action in the body The continuation }#Execute the head of the Runnable. ~5Is this event a wakeup event? i.e. must all watchers  be woken? ;;; unportable experimentaljochem@functor.nl <6Get the current time. The result will be nonnegative. =$Wait for a nonnegative time period. .The time period we wait. Must be nonnegative. >+Send a packet to a process, with a timeout % time interval. Returns True iff the  packet was accepted. The packet we send. The receiver process "The timeout. Must be nonnegative. ?.Send a packet. Return True iff the packet was / accepted immediately. Do not wait in case the  packet was not accepted. The packet we send The receiver process @@Send a packet. Wait as long as necessary to deliver the packet. The packet we send The receiver process AExecute an action with an  function The acceptor to set The action to be executed B?Execute an action without interruptions from incoming packets. C<Wait forever. This can be useful in case you want to block,  waiting for incoming packets. D9Receive a packet. Block until the first packet comes in. E Receive a packet, non-blocking. <=>?@ABCDE <=C>?@ABDE <=>?@ABCDE unportable experimentaljochem@functor.nl%&()*+;<=>?@ABCDE&%()*+;       !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQQRSTUVWXYZ[\]^2_3`abccdefghijklmBnopqrstuvwxyz{|}~ hasim-0.1.2Control.Hasim.TypesControl.Hasim.ProcessControl.Hasim.SimulationControl.Hasim.DESControl.Hasim.WatchMapControl.Hasim.SimRunControl.Hasim.Action Control.HasimIdTimeRunnableRunAtomActionPrim PrimAction WaitForeverPutStateGetState ObserveTime PerformIO PopAcceptor WithAcceptorUnwatchSendWaitRetProcess AcceptResult InterruptParallelRefuseAcceptorProcacceptorwakeupaction identifiername currentStaterunnable2process toRunnableSimMonad SimulationunSim mkAnonProcess mkProcess setActioncreateSimulationDESEventeTime eRunnableeProcessisEmpty removeNextupdateinitDESemptyDESWatchMapregister unregisterwatchersemptyWM runSimulationgetTimewaitsendtrySend sendBlock withAcceptorwithoutInterruptions waitForeverreceivepoll:>>=atomunprimunleft SimValidationSimState currentId processesSiminitialSimStateincId appendProcess mkProcessWIdbaseGHC.ErrerrorvalidateatLeastOneProcessprocessesHaveActionsunDESinsertWMunWMSimRunStdestimewatchmap latestPidSimRunM initSimRunStgetDESputDES getWatchmap putWatchmapputTimepopEventrunwarprunEvent reschedulemaybeReschedule rescheduleNowmaybeRescheduleNowexecPopAcceptor getAcceptoraddWatchexecSend execUnwatchrcat rcatMaybe pushAcceptorexecWithAcceptor stepRunnablewake