QM-     Safe]List node. Used for insertion, traversal, and removal starting at a given item in the list.+A Node contains an immutable value of type a, and -s that point to the previous and next nodes.Node equality can be likened to pointer equality in C. Two Node values are considered equal if and only if they were created with the same insertion operation. if this is the list head.]List handle. Used for insertion and traversal starting at the beginning or end of the list. Unwrap the list head, a special  with the following properties:  .  ==   .  ==   v .  ==  v  v .  ==  v  .  ==> error   .  ==> errorExtract the value of a node.!O(1). Is the list empty?"O(n)(. Count the number of items in the list.#O(1). Create an empty linked list.$O(1) . Version of # that can be used in the % monad.&)Insert a node between two adjacent nodes.O(1)/. Add a node to the beginning of a linked list.O(1)). Add a node to the end of a linked list.O(1)'. Insert an item before the given node.O(1)&. Insert an item after the given node. O(1). Remove a node from whatever C it is in. If the node has already been removed, this is a no-op.O(1)!. Get the previous node. Return 6 if this is the first item, or if this node has been  d from its list.O(1). Get the next node. Return 5 if this is the last item, or if this node has been  d from its list.O(1)E. Get the node corresponding to the first item of the list. Return  if the list is empty.O(1)D. Get the node corresponding to the last item of the list. Return  if the list is empty.'cTraverse list nodes with a fold function. The traversal terminates when the list head is reached."This is strict in the accumulator.(O(n). Return all of the items in a .)O(n). Return all of the items in a , in reverse order.*+,-.!"#$& /' Fold function Initial valueStep function (, or -).Starting node. This node's value is not used!()0*+,-.!"#$& /'()*+,-.!"#$& /'()0Safe This monad works very similar to a continuation monad on top of stm. You can do any basic stm computation you want simply using  . However, if you use < everything after that call will be executed everytime the  given to  is changed.You can also use the 1$ instance to make a union of events.You can also use the 2 instance to run two things 'parallel'. Parallel meaning that events on one side will not cause the other side to be reevaluated completely. is the portable Signal they can be exchanged between any parts of your program. Internally, they are just a variable and a list of change hooks.HWrites the value to the variable inside the signal and schedules the listeners to run. The listeners will run in the same stm action and with the value you gave. However, they do not run immediately. So you are guaranteed that writeSignal will not have any immediate sideffects other then writing the one single variable.3Xexecutes listeners immediately. can lead to breaking of semanitcs if not used carefully4the return value will remove the listener use 'fixm remover -> someListener remover' to add a listener that can remove itself9is executed right before getEvent ... fire the next eventIO actions given here will be executed once a signal update has been completed. They keep the order in which they are inserted.@Runs everything below it everytime its input signal is updated.  Similar to V except that it also fires an event immediately, with the value of the current state. DgetBehavior signal = liftSTM (readSignal signal) <|> getEvent signalThis will evaluate the  Monad. It will block until the first run reaches the end. After that, it will return the result and free everything. To prevent signals from reaching the end use  or  with some exit signal."56789:;<=>?@A34BCDEF GHIJ @A4 56789:;<=>?@A34BCDEF GHIJNoneC Creates a new signal. You can use this signal in any context you want and share it freely between any number of different Updater monads. Just a synonym for K from 1y. It basically prevents signals from ever progressing beyond this point. You can use this to make a filter for instance when (condition) stop Just for some quick debugging putLine = onCommit . putStrLn Returns immediately after registering the given computation. However, events from inside will not spread outside, except for the initial one.It is implemented like this 7local computation = return () <|> (computation >> stop)Gets the current value.0simple combination of readSignal and writeSignalthis is just a convenience for use in ghci and in the test cases. It will just run the updater it is given in it's own thread. L     LM      !"#$%&'()*+,-./0123456789:;<<=>?@ABCDEFGHIJ)KLUpdat_DOJfgZCWpTPEN6UlHNv4L2Updater Updater.ListUpdater.InternalstopSignal newSignalIO writeSignal onCleanuponCommitgetEvent getBehavior runUpdaterliftSTM newSignalputLinelocal readSignal modifySignalrunGlobalUpdaterNodebase GHC.Conc.SyncTVar nodeValueGHC.BaseNothing LinkedListlistHeadnextstartprevend insertBeforeappend insertAfterprependvaluedeletenulllengthemptyemptyIOghc-prim GHC.TypesIO insertBetween foldlHelpertoList toListRevNodePtrnodePrevnodeNext stepHelper$fEqNode Alternative ApplicativewriteSignalNow addListener runUpdater'StatestateOnCommitUpdaterstateOnCommitIO stateCleanup signalValuesignalListenersaddSingletonListener getCleanuponCommitUpdatergetStateputState$fMonadUpdater$fAlternativeUpdater$fApplicativeUpdater$fFunctorUpdater globalUpdater