9-      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None!"*-09:;<=AOTe4 represents a task in a task stream being generated. More tasks to come This is the last task No more tasks, we are done An error occurredRun m a& discarding its result before running m b.Run m b1 discarding its result, after the whole task set m a is done.Run m b0 discarding its result, once after each task in m a3, and once again after the whole task set is done."&Dynamic serializable data for logging.%7Constraint type synonym for a value that can be logged.&:EventF describes the context of a TransientIO computation:(RNot yet consumed result (event) from the last asynchronous run of the computation*List of continuations+.State data accessed with get or put operations.When ., threads are not killed using kill primitives/The parent of this thread0%Forked child threads, used only when . is 18Maximum number of threads that are allowed to be created2<Label the thread with its lifecycle state and a label string@Run a "non transient" computation within the underlying state monad, so it is guaranteed that the computation neither can stop neither can trigger additional events/threads.B8Run a transient computation with a default initial stateC6Run a transient computation with a given initial stateDMGet the continuation context: closure, continuation, state, child threads etcEORun the closure and the continuation using the state data of the calling threadF>Run the closure and the continuation using its own state data.G2Warning: Radically untyped stuff. handle with careH Compose a list of continuations.IRun the closure (the x- in 'x >>= f') of the current bind operation.JRun the continuation (the fD in 'x >>= f') of the current bind operation with the current state.K#Save a closure and a continuation (x and f in 'x >>= f').LvSave a closure and continuation, run the closure, restore the old continuation. | NOTE: The old closure is discarded.MURestore the continuations to the provided ones. | NOTE: Events are also cleared out.NRun a chain of continuations. WARNING: It is up to the programmer to assure that each continuation typechecks with the next, and that the parameter type match the input of the first continuation. NOTE: Normally this makes sense to stop the current flow with Q after the invocation.Q A synonym of n that can be used in a monadic expression. It stops the computation, which allows the next computation in an  () composition to run.RRun b= once, discarding its result when the first task in task set aV has finished. Useful to start a singleton task after the first task has been setup.SBSet the current closure and continuation for the current statementTReset the closure and continuation. Remove inner binds than the previous computations may have stacked in the list of continuations. resetEventCont :: Maybe a -> EventF -> StateIO ()UTotal variant of 5 that returns an empty list when given an empty list.XSets the maximum number of threads that can be created for the given task set. When set to 0, new tasks start synchronously in the current thread. New threads are created by {, and APIs that use parallel.YTerminate all the child threads in the given task set and continue execution in the current thread. Useful to reap the children when a task is done.ZXAdd a label to the current passing threads so it can be printed by debugging calls like \\0Show the tree of threads hanging from the state.]GReturn the state of the thread that initiated the transient computation^vReturn the state variable of the type desired with which a thread, identified by his number in the treee was initiated_NAdd n threads to the limit of threads. If there is no limit, the limit is set.`FEnsure that at least n threads are available for the current task set.aSDisable tracking and therefore the ability to terminate the child threads. By default, child threads are terminated automatically when the parent thread dies, or they can be terminated using the kill primitives. Disabling it may improve performance a bit, however, all threads must be well-behaved to exit on their own to avoid a leak.bEnable tracking and therefore the ability to terminate the child threads. This is the default but can be used to re-enable tracking if it was previously disabled with a.c1Kill all the child threads of the current thread.d'Kill the current thread and the childs.e*Kill the childs and the thread of an statefSame as g8 but with a more general type. If the data is found, a ! value is returned. Otherwise, a  value is returned.gRetrieve a previously stored data item of the given data type from the monad state. The data type to retrieve is implicitly determined from the requested type context. If the data item is not found, an  value (a void event) is returned. Remember that an empty value stops the monad computation. If you want to print an error message or a default value in that case, you can use an  composition. For example: DgetSData <|> error "no data" getInt = getSData <|> return (0 :: Int)hSame as giiK stores a data item in the monad state which can be retrieved later using f or g. Stored data items are keyed by their data type, and therefore only one item of a given type can be stored. A newtype wrapper can be used to distinguish two data items of the same type. import Control.Monad.IO.Class (liftIO) import Transient.Base import Data.Typeable data Person = Person { name :: String , age :: Int } deriving Typeable main = keep $ do setData $ Person AlbertoF 55 Person name age <- getSData liftIO $ print (name, age) jAccepts a function that takes the current value of the stored data type and returns the modified value. If the function returns ) the value is deleted otherwise updated.kSame as modifyDatalSame as im<Delete the data item of the given type from the monad state.nSame as moQmutable state reference that can be updated (similar to STRef in the state monad)%Initialized the first time it is set.rRun an action, if it does not succeed, undo any state changes that it might have caused and allow aternative actions to run with the original statesHExecutes the computation and reset the state either if it fails or not. twGenerator of identifiers that are unique within the current monadic sequence They are not unique in the whole program.vAn task stream generator that produces an infinite stream of tasks by running an IO computation in a loop. A task is triggered carrying the output of the computation. See { for notes on the return value.wRun an IO computation asynchronously and generate a single task carrying the result of the computation when it completes. See { for notes on the return value.xIForce an async computation to run synchronously. It can be useful in an  composition to run the alternative only after finishing a computation. Note that in Applicatives it might result in an undesired serialization.y  spawn = freeThreads . waitEventsz)An task stream generator that produces an infinite stream of tasks by running an IO computation periodically at the specified time interval. The task carries the result of the computation. A new task is generated only if the output of the computation is different from the previous one. See { for notes on the return value.{[Run an IO action one or more times to generate a stream of tasks. The IO action returns a . When it returns an   or  H a new task is triggered with the result value. If the return value is  U, the action is run again to generate the next task, otherwise task creation stops./Unless the maximum number of threads (set with Xg) has been reached, the task is generated in a new thread and the current thread returns a void task.|*Execute the IO action and the continuationDkill all the child threads associated with the continuation contextFMake a transient task generator from an asynchronous callback handler.The first parameter is a callback. The second parameter is a value to be returned to the callback; if the callback expects no return value it can just be a  return ()5. The callback expects a setter function taking the  eventdataU as an argument and returning a value to the callback; this function is supplied by .jCallbacks from foreign code can be wrapped into such a handler and hooked into the transient monad using U. Every time the callback is called it generates a new task for the transient monad.JRuns a computation asynchronously without generating any events. Returns  in an  composition.6Waits on stdin in a loop and triggers a new task every time the input data matches the first parameter. The value contained by the task is the matched value i.e. the first argument itself. The second parameter is a label for the option. The label is displayed on the console when the option is activated.,Note that if two independent invocations of x are expecting the same input, only one of them gets it and triggers a task. It cannot be predicted which one gets it.Waits on stdin and triggers a task when a console input matches the predicate specified in the first argument. The second parameter is a string to be displayed on the console before waiting. Non blocking  with a validatorWait for the execution of ; and return the result or the exhaustion of thread activityRuns the transient computation in a child thread and keeps the main thread running until all the user threads exit or some thread invokes .The main thread provides facilities to accept keyboard input in a non-blocking but line-oriented manner. The program reads the standard input and feeds it to all the async input consumers (e.g.  and ). All async input consumers contend for each line entered on the standard input and try to read it atomically. When a consumer consumes the input others do not get to see it, otherwise it is left in the buffer for others to consume. If nobody consumes the input, it is discarded.A /+ in the input line is treated as a newline.When using asynchronous input, regular synchronous IO APIs like getLine cannot be used as they will contend for the standard input along with the asynchronous input thread. Instead you can use the asynchronous input APIs provided by transient.A built-in interactive command handler also reads the stdin asynchronously. All available commands handled by the command handler are displayed when the program is run. The following commands are available: ps: show threadslog: inspect the log of a threadend, exit: terminate the programJAn input not handled by the command handler can be handled by the program.*The program's command line is scanned for -p or --path command line options. The arguments to these options are injected into the async input channel as keyboard input to the program. Each line of input is separated by a /. For example:  foo -p ps/endSame as Q but does not read from the standard input, and therefore the async input APIs ( and x) cannot be used in the monad. However, keyboard input can still be passed via command line arguments as described in . Useful for debugging or for creating background tasks, as well as to embed the Transient monad inside another computation. It returns either the value returned by 6. or Nothing, when there are no more threads runninghExit the main thread, and thus all the Transient threads (and the application if there is no more code)If the first parameter is D return the second parameter otherwise return the first parameter..GDelete all the undo actions registered till now for the given track id.& for the default track; equivalent to  backCut ().fRun the action in the first parameter and register the second parameter as the undo action. On undo (E) the second parameter is called with the undo track id as argument.& for the default track; equivalent to  onBack ().Register an undo action to be executed when backtracking. The first parameter is a "witness" whose data type is used to uniquely identify this backtracking action. The value of the witness parameter is not used.For a given undo track id, stop executing more backtracking actions and resume normal execution in the forward direction. Used inside an undo action.+ for the default undo track; equivalent to  forward ().\Abort finish. Stop executing more finish actions and resume normal execution. Used inside  actions.Start the undo process for the given undo track id. Performs all the undo actions registered till now in reverse order. An undo action can use | to stop the undo process and resume forward execution. If there are no more undo actions registered execution stops and a Q action is returned.+ for the default undo track; equivalent to back ().YClear all finish actions registered till now. initFinish= backCut (FinishReason Nothing)'Register an action that to be run when  is called. r can be used multiple times to register multiple actions. Actions are run in reverse order. Used in infix style.uRun the action specified in the first parameter and register the second parameter as a finish action to be run when ! is called. Used in infix style.@Execute all the finalization actions registered up to the last G, in reverse order and continue the execution. Either an exception or  can be+trigger finish when the stream of data endsInstall an exception handler. Handlers are executed in reverse (i.e. last in, first out) order when such exception happens in the continuation. Note that multiple handlers can be installed for the same exception type.4The semantic is thus very different than the one of 6Delete all the exception handlers registered till now.Use it inside an exception handler. it stop executing any further exception handlers and resume normal execution from this point on.'catch an exception in a Transient blockThe semantic is the same than C but the computation and the exception handler can be multirhreaded)throw an exception in the Transient monad  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"$#%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~?>;<=:9834567&'()*+,-./012@ABCDEFGHIJKLMNOP%"#$! QRSTUVWXYZ[\]^_`abcdefghijklmn opqrstu vwxyz{|}~  !"#$%& '()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~111NoneTKConverts a list of pure values into a transient task set. You can use the X& primitive to control the parallelism.Same as  except that the XG combinator cannot be used, instead the parent thread's limit applies./Collect the results of a task set in groups of n elements.Collect the results of a task set, grouping all results received within every time interval specified by the first parameter as .!Collect the results of the first n tasks. Synchronizes concurrent tasks to collect the results safely and kills all the non-free threads before returning the results. Results are returned in the thread where  is called.Like G but with a timeout. When the timeout is zero it behaves exactly like . If the timeout (second parameter) is non-zero, collection stops after the timeout and the results collected till now are returned.None0creates an EVar.Evars are event vars. C trigger the execution of all the continuations associated to the 1 of this variable (the code that is after them).It is like the publish-subscribe pattern but without inversion of control, since a readEVar can be inserted at any place in the Transient flow.wEVars are created upstream and can be used to communicate two sub-threads of the monad. Following the Transient philosophy they do not block his own thread if used with alternative operators, unlike the IORefs and TVars. And unlike STM vars, that are composable, they wait for their respective events, while TVars execute the whole expression when any variable is modified.TThe execution continues after the writeEVar when all subscribers have been executed./Now the continuations are executed in parallel.see Yhttps://www.fpcomplete.com/user/agocorona/publish-subscribe-variables-transient-effects-v(delete al the subscriptions for an evar.read the EVar. It only succeed when the EVar is being updated The continuation gets registered to be executed whenever the variable is updated.if readEVar is re-executed in any kind of loop, since each continuation is different, this will register again. The effect is that the continuation will be executed multiple times To avoid multiple registrations, use Qupdate the EVar and execute all readEVar blocks with "last in-first out" priority write the EVar and drop all the  handlers.It is like a combination of  and NoneT/ 8;QXY`abcfghijklmnoprtvwyz{/;8Q {wvzyigfmjrlhnpokX`abYctNone9;ATReads the saved logs from the logs subdirectory of the current directory, restores the state of the computation from the logs, and runs the computation. The log files are removed after the state has been restored.SSaves the logged state of the current computation that has been accumulated using  , and then Xs using the passed parameter as the exit code. Note that all the computations before a  must be ; to have a consistent log state. The logs are saved in the logsX subdirectory of the current directory. Each thread's log is saved in a separate file.<Saves the accumulated logs of the current computation, like , but does not exit.Run the computation, write its result in a log in the parent computation and return the result. If the log already contains the result of this computation (`d from previous saved state) then that result is used instead of running the computation again.' can be used for computations inside a i computation. Once the parent computation is finished its internal (subcomputation) logs are discarded. %% None0AT          !"#$%&'&())*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~&transient-0.5.9-GgNH1FbGxp8BjNjxagdfi0Transient.InternalsTransient.IndeterminismTransient.EVarsTransient.LoggedControl.Exception.Base onExceptionTransient.BaseTransient.BacktrackFinish Backtrack backtracking backStackExit StreamDataSMoreSLastSDoneSErrorRefAdditionalOperators**><**atEnd'<***atEnd RemoteStatus WasRemote WasParallelNoRemoteLogLogElemWaitExecVar LogEntriesCurrentPointerRecoverIDynamicIDynsLoggableEventFeventxcompfcompmfData mfSequencethreadIdfreeThparentchildren maxThreadlabelth LifeCycleAliveParentListenerDead TransientIOEventIdSDataTransIO TransientrunTransStateIO!>noTrans emptyEventF runTransient runTransStategetContrunContrunCont'getContinuationscompose runClosurerunContinuationsetContinuationwithContinuation restoreStackrunContinuations readWithErr readsPrec'stop<| setEventContresetEventConttailsafe waitQSemB signalQSemBthreads oneThread labelState printBlock showThreadstopState showState addThreads' addThreads freeThreads hookedThreads killChilds killBranch killBranch'getDatagetSDatagetStatesetData modifyData modifyStatesetStatedelDatadelState setRState getRState delRStatetrysandboxgenId getPrevId waitEventsasyncsyncspawnsampleparallelloopfree hangThread killChildrenreactabduce getLineRefroptionoptioninputinput'getLine'reads1 inputLoop processLinestaykeepkeep'execCommandLineexit onNothingbackCutundoCutonBackonUndo registerBack registerUndoforwardretrynoFinishback backStateOfundoonFinish onFinish' initFinishfinish checkFinalize onException' exceptBack cutExceptionscontinuecatchtthrowt$fExceptionFinish$fReadSomeException$fAdditionalOperatorsTransIO $fNumTransIO$fReadIDynamic$fShowIDynamic$fMonadPlusTransIO$fAlternativeTransIO$fMonoidTransIO$fMonadIOTransIO$fMonadTransIO$fApplicativeTransIO$fFunctorTransIO$fMonadStateEventFTransIO $fEqLifeCycle$fShowLifeCycle $fReadLogElem $fShowLogElem $fShowLog$fEqRemoteStatus$fShowRemoteStatus$fShowStreamData$fReadStreamData $fShowFinishchoosechoose'group groupByTimecollectcollect'EVarnewEVar cleanEVarreadEVar writeEVar lastWriteEVarrestoresuspend checkpointloggedreceivedparamghc-prim GHC.TypesTrueFalsebaseGHC.Baseempty Alternative<|>GHC.ListtailJustNothing System.IOgetLinecatch time-1.6.0.1Data.Time.Clock.UTCDiff diffUTCTimelogslogAllfromIDyntoIDyn