úÎŃSČ[Ś      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽNone 09:;<=AOT, async calls%dynamic serializable data for logging.0run the transient computation with a blank state/+run the transient computation with an state0Mget the continuation context: closure, continuation, state, child threads etc1Orun the closure and the continuation using the state data of the calling thread2=run the closure and the continuation using his own state data33warning: radiactive untyped stuff. handle with care4compose a list of continuations5run the closure (the x. in 'x >>= f') of the current bind operation.6run the continuation (the f, in 'x >>= f') of the current bind operation8˙run a chain of continuations. It is up to the programmer to assure by construction that each continuation type-check with the next, that the parameter type match the input of the first continuation. Normally this makes sense if it stop the current flow with < after the invocation<’a sinonym of empty that can be used in a monadic expression. it stop the computation and execute the next alternative computation (composed with Ś)= executes the second operand even if the frist return empty. A normal imperative (monadic) sequence uses the operator (>>) which in the Transient monad does not>Ëforces the execution of the second operand even if the first stop. Return the first result. The second operand is executed also when internal events happens in the first operand and it returns something@żforces the execution of the second operand even if the first stop. It does not execute the second operand as result of internal events occuring in the first operand. Return the first resultBĽwhen the first operand is an asynchronous operation, the second operand is executed once (one single time) when the first completes his first asyncronous operation.†This is useful for spawning asynchronous or distributed tasks that are singletons and that should start when the first one is set up.Rfor example a streaming where the event receivers are acivated before the senders.CBset the current closure and continuation for the current statementDÍreset the closure and continuation. remove inner binds than the previous computations may have stacked in the list of continuations. resetEventCont :: Maybe a -> EventF -> StateIO (TransIO b -> TransIO b)Izset the maximun number of threads for a procedure. It is useful to limit the parallelization of transient code that uses [ Z and WJ|delete all the previous childs generated by the expression taken as parameter and continue execution of the current thread.LFadd n threads to the limit of threads. If there is no limit, it set itM2assure that at least there are n threads availableNOThe threads generated in the process passed as parameter will not be killed by `kill*` primitivesOzThe threads will be killed when the parent thread dies. That is the default. This can be invoked to revert the effect of NP0kill all the child threads of the current threadQ8Get the state data for the desired type if there is any.RdgetData specialized for the Transient monad. if Nothing, the monadic computation does not continue.If there is no such data, R– silently stop the computation. That may or may not be the desired behaviour. To make sure that this does not get unnoticed, use this construction:  getSData <|> error "no data"/To have the same semantics and guarantees than §, use a default value: &getInt= getSData <|> return (0 :: Int)The default value (0 in this case) has the same role than the initial value in a state monad. The difference is that you can define as many §% as you need for all your data types.DTo distingish two data with the same types, use newtype definitions.S˙-set session data for this type. retrieved with getData or getSData Note that this is data in a state monad, that means that the update only affect downstream in the monad execution. it is not a global state neither a per user or per thread state it is a monadic state like the one of a state monad.Uxgenerator of identifiers that are unique withing the current monadic sequence They are not unique in the whole program.W variant of [S that repeatedly executes the IO computation and kill the previously created childsnIt is useful in single threaded problems where each event discard the computations spawned by previous eventsY variant of [J that execute the IO computation once, and kill the previous child threadsZQvariant that spawn free threads. Since there is no thread control, this is faster[–return empty to the current thread, in new thread, execute the IO action, this IO action modify an internal buffer. then, executes the closure where [@ is located In this new execution, since the buffer is filled, [z return the content of this buffer. Then it launch the continuation after it with this new value returned by the closure.+If the maximum number of threads, set with I has been reached [< perform the work sequentially, in the current thread. So [B means that 'it can be parallelized if there are thread available'uif there is a limitation of threads, when a thread finish, the counter of threads available is increased so another [ can make use of it.The behaviour of [ depend on ; If , [( will excute again the IO action. with ,  and , [' will not repeat the IO action anymore.`Dkill all the child threads associated with the continuation contextadeinvert an event handler.–The first parameter is the setter of the event handler to be deinverted. Usually it is the primitive provided by a framework to set an event handlerZthe second parameter is the value to return to the event handler. Usually it is `return()`iit configures the event handler by calling the setter of the event handler with the current continuationdfinstall a event receiver that wait for a string and trigger the continuation when this string arrives.eĄvalidates an input entered in the keyboard in non blocking mode. non blocking means that the user can enter also anything else to activate other option unlike dA, wich watch continuously, input only wait for one valid responsef non blocking ¨ with a validatorkwait for the execution of n and return the resultlnkeep the main thread running, initiate the non blocking keyboard input and execute the transient computation.@It also read a slash-separated list of string that are read by d and e( as if they were entered by the keyboard 0 foo -p options/to/be/read/by/option/and/inputm same than lJbut do not initiate the asynchronous keyboard input. Useful for debuggingn{force the finalization of the main thread and thus, all the Transient block (and the application if there is no more code)p:alternative operator for maybe values. Used in infix mode|  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{q   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop|+,-*)( !"#$%&'{./012345678zy9:;xw  v u<=>?@ABtCDEFsrGHIJKLMNOPQRSTUVqWXYZ[\]^_`abcdefghijklmnop`    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{=1>1@1NoneT#(+,-<=>@BIJMNOPQRSTUWYZ[adelmn#+,-(lm<denYWZ[aSQRTIMNOJP=@>BUNone0 ˆcreates 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 ‰0trigger finish when the stream data return SDoneŽrinitialize the event variable for finalization. all the following computations in different threads will share it3trigger the event, so this closes all the resources‘Zderegister all the finalization actions. A initFinish is needed to register actions againƒ„…†‡ˆ‰Š‹ŒŽ‘’ƒ„…†‡ˆ‰Š‹ŒŽ‘’†‡ˆ‰Š‹Œ…ƒ„Ž‘’ƒ„…†‡ˆ‰Š‹ŒŽ‘’None0AT“2assures that backtracking will not go further back”6the secod parameter will be executed when backtracking•:register an action that will be executed when backtracking–+restart the flow forward from this point on—Iexecute backtracking. It execute the registered actions in reverse order.QIf the backtracking flag is changed the flow proceed forward from that point on.8If the backtrack stack is finished or undoCut executed, — will stop. ŠŞŤŹ“”•–—“”•–—•”—–“ŠŞŤŹ“”•–—None9;AT›Źwrite the result of the computation in the log and return it. but if there is data in the internal log, it read the data from the log and do not execute the computation.˙!It accept nested step's. The effect is that if the outer step is executed completely the log of the inner steps are erased. If it is not the case, the inner steps are logged this reduce the log of large computations to the minimum. That is a feature not present in the package Workflow. ƒ r <- logged $ do logged this :: TransIO () logged that :: TransIO () logged thatOther liftIO $ print rwhen ­- is executed, the log is just the value of r. but at the  thatOther$ execution the log is: [Exec,(), ()]˜™š›œ˜™š›˜œ™š›˜™š›œNone0TStream the input to a filežslurp input from a file a line at a time. It creates as much threads as possible. to allow single threaded processing, use it with `threads 0`Ÿśis the general operation for processing a streamed input, with opening resources before processing and closing them when finish is called. The process statements suscribe to the ƒ EVar.=When this variable is updated, the close procedure is called.When the processing return  or , the ƒX variable is updated so all the subscribed code, that close the resources, is executed.žŸinput computationGopen computation that gives resources to be used during the computation*close computation that frees the resourcesprocess to be doneŽ‘žŸžŸŽ‘žŸNone fslurp a list of values and process them in parallel . To limit the number of processing threads, use IĄMgroup the output of a possible multithreaded process in groups of n elements.˘0group result for a time interval, measured with ŽŁFalternative definition with more parallelism, as the composition of n Y sentences¤˙Ąexecute a process and get at least the first n solutions (they could be more). if the process end without finding the number of solutions requested, it return the found ones if he find the number of solutions requested, it kill the non-free threads of the process and return It works monitoring the solutions found and the number of active threads. If the first parameter is 0, collect will return all the resultsĽ˙search also between two time intervals. If the first interval has passed and there is no result, it stops. After the second interval, it stop unconditionally and return the current results. It also stops as soon as there are enough results specified in the first parameter. ŻĄ˘Ł¤Ľ Ą˘Ł¤Ľ Ł¤ĽĄ˘ ŻĄ˘Ł¤Ľ°       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡‡ˆ‰‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­¨ŽŻ°°ą˛¨Žł´ľśˇ¸&transient-0.4.1-1lrwWkyVDsdESbuUIUX93ZTransient.InternalsTransient.EVarsTransient.BacktrackTransient.LoggedTransient.Stream.ResourceTransient.IndeterminismTransient.BaseToReturn EventSetter StreamDataSMoreSLastSDoneSError RemoteStatus WasRemote WasParallelNoRemoteLogLogElemWaitExecVar LogEntriesCurrentPointerRecoverIDynamicIDynsIDNUMStateIOEffectsEventFmeffectseventxcompfcompmfData mfSequencethreadIdfreeThparentchildren maxThread TransientIOEventIdSDataTransIO TransientrunTrans runTransient runTransStategetContrunContrunCont'getContinuationscompose runClosurerunContinuationsetContinuationrunContinuations restoreStack readWithErr readsPrec'stop**><***atEnd<**atEnd'<| setEventContresetEventConttailsafe baseEffects waitQSemB signalQSemBthreads oneThread showThreads addThreads' addThreads freeThreads hookedThreads killChildsgetDatagetSDatasetDatadelDatagenId getPrevId waitEvents waitEvents'asyncspawnparallelloop forkFinally1free hangThread killChildrenreact getLineRefroptionoptioninputgetLine'reads1 inputLoop processLinerexitstaykeepkeep'exitexit' onNothing$fReadSomeException$fMonadIOTransIO$fMonadTransIO$fMonoidTransIO$fMonadPlusTransIO$fAlternativeTransIO$fReadIDynamic$fShowIDynamic$fApplicativeTransIO$fFunctorTransIO$fMonadStateEventFTransIO $fShowIDNUM $fReadLogElem $fShowLogElem$fEqRemoteStatus$fShowRemoteStatus$fShowStreamData$fReadStreamDataFinish FinishReasonEVarnewEVar cleanEVarreadEVar writeEVar lastWriteEVar checkFinalize initFinishonFinishfinishunFinish killOnFinishundoCutonUndo registerUndoretryundoLoggablefromIDyntoIDynlogged $fLoggableasinkFile sourceFileprocesschoosegroup groupByTimechoose'collectcollect'baseGHC.Base<|> mtl-2.2.1-6qsR1PHUy5lL47Hpoa4jCMControl.Monad.State.Classget System.IOgetLine Backtrack backtracking backStackprint time-1.6.0.1Data.Time.Clock.UTCDiff diffUTCTimetoData