XSD      !"#$%&'()*+,-./012345 6 7 8 9 : ; < = > ? @ A B C 9Fast type-aligned queue optimized to effectful functions.Alej Cabrera 2015BSD-3cpp.cabrera@gmail.com experimentalPOSIXSafe!"'Left view deconstruction data structureMNon-empty tree. Deconstruction operations make it more and more left-leaning+Build a leaf from a single operation [O(1)]3Append an operation to the right of the tree [O(1)]An alias for '(|>)'%Append two trees of operations [O(1)]An alias for '(><)' 'Left view deconstruction [average O(1)] DE   DE >Open unions (type-indexed co-products) for extensible effects.Alej Cabrera 2015BSD-3cpp.cabrera@gmail.com experimentalPOSIXSafe!"&'(3457>KLNFGHIJKLMNO PQRST   FGHIJKLMNO  PQRSTMechanisms to make effects workAlej Cabrera 2015BSD-3cpp.cabrera@gmail.com experimentalPOSIXSafe !"(4>IKLN 3A data type for representing nondeterminstic choiceThe Eff representation.Status of a coroutine (client): * Val: Done with the value of type a * E : Sending a request of type Union r with the continuation Arrs r b aAn effectful function from a to b that is a composition of several effectful functions. The paremeter r describes the overall effect. The composition members are accumulated in a type-aligned queue.QEffectful arrow type: a function from a to b that also does effects denoted by rFFunction application in the context of an array of effects, Arrs r b w`Composition of effectful arrows Allows for the caller to change the effect environment, as well#send a request and wait for a replyRuns a set of Effects. Requires that all effects are consumed. Typically composed as follows: > run . runEff1 eff1Arg . runEff2 eff2Arg1 eff2Arg2 (program).Given a request, either handle it or relay it.Parameterized  Allows sending along some state to be handled for the target effect, or relayed to a handler that can handle the target effect.GIntercept the request and possibly reply to it, but leave it unhandled%A handler for nondeterminstic effects UVWXY      UVWXY#Composable coroutine effects layer.Alej Cabrera 2015BSD-3cpp.cabrera@gmail.combrokenPOSIXSafe-4!dStatus of a thread: done or reporting the value of the type a and resuming with the value of type b$A type representing a yielding of control a: The current type b: The input to the continuation function v: The output of the continuation%6Lifts a value and a function into the Coroutine effect!"#$Z%!"#$%$%!"#!"#$Z% An Exception effect and handler.Alej Cabrera 2015BSD-3cpp.cabrera@gmail.com experimentalPOSIXSafe(4KL&'Exceptions of the type e; no resumption(.Throws an error carrying information of type e)Handler for exception effects If there are no exceptions thrown, returns Right If exceptions are thrown and not handled, returns Left, interrupting the execution of any other effect handlers.*FA catcher for Exceptions. Handlers are allowed to rethrow exceptions.&'()*&'()*&'()*&'()* An implementation of logical CutAlej Cabrera 2015BSD-3cpp.cabrera@gmail.combrokenPOSIXSafe(4KL,0Implementation of logical Cut using Exc effects.+[,+,+,+[,*Generation of fresh integers as an effect.Alej Cabrera 2015BSD-3cpp.cabrera@gmail.combrokenPOSIXSafe!"(4KL-Fresh effect model.Request a fresh effect/;Handler for Fresh effects, with an Int for a starting value-\./-./-./-\./0Reader effects, for encapsulating an environmentAlej Cabrera 2015BSD-3cpp.cabrera@gmail.com experimentalPOSIXSafe !"(4KLN2#Request a value for the environment3Handler for reader effects4Locally rebind the value in the dynamic environment This function is like a relay; it is both an admin for Reader requests, and a requestor of them01234012340123401234 /State effects, for state-carrying computations.Alej Cabrera 2015BSD-3cpp.cabrera@gmail.com experimentalPOSIXSafe !"(4KLN7;Strict State effects: one can either Get values or Put them8Retrieve state9 Modify state:Handler for State effects;An encapsulated State handler, for transactional semantics The global state is updated only if the transactionState finished successfully 567]^89:;56789:;789:56;567]^89:; Composable Writer effects -Alej Cabrera 2015BSD-3cpp.cabrera@gmail.com experimentalPOSIXSafe!"(4KL<6Writer effects - send outputs to an effect environment>)Send a change to the attached environment?!Simple handler for Writer effects<=>?<=>?<=>?<=>? 'State effects in terms of Reader/WriterAlej Cabrera 2015BSD-3cpp.cabrera@gmail.com experimentalPOSIXSafe!"(4KL@*State handler, using Reader/Writer effects@02<>@@0<>2@ Composable Trace effectsAlej Cabrera 2015BSD-3cpp.cabrera@gmail.com experimentalPOSIXSafe!"(4KLA2A Trace effect; takes a String and performs outputBPrinting a string in a traceCAn IO handler for Trace effectsA_BCABCABCA_BC %Freer - an extensible effects libraryAlej Cabrera 2015BSD-3cpp.cabrera@gmail.com experimentalPOSIXSafe   ` !"#$%&'()*+,-./01234456789:;<==>?@ A A B C D E F G G H I J K L MNOPQRSTUUVWXYZ[\]^_`ab28: c d Kefreer_BBiEiqZAVwuEisrmZ3fcQv Data.FTCQueueData.Open.UnionControl.Monad.Freer.InternalControl.Monad.Freer.CoroutineControl.Monad.Freer.ExceptionControl.Monad.Freer.CutControl.Monad.Freer.FreshControl.Monad.Freer.ReaderControl.Monad.Freer.StateControl.Monad.Freer.WriterControl.Monad.Freer.StateRWControl.Monad.Freer.TraceControl.Monad.FreerViewLTOne:|FTCQueue tsingleton|>snoc><appendtviewlMemberinjprjUniondecompweaken NonDetEffMZeroMPlusEffValEArrsArrqAppqCompsendrun handleRelay handleRelayS interpose makeChoiceAmsplitStatusDoneContinueYieldyieldExc throwErrorrunError catchErrorCutFalsecutFalseFreshfresh runFresh'Readerask runReaderlocal ProxyStateStategetputrunStatetransactionStateWritertell runWriter runStateRTracetracerunTraceLeafNodeEQUFindElemMember'inj'prj'PNatSZUNowUNext $fMember'trS $fMember'trZ $fMembertr$fMonadPlusEff$fAlternativeEff $fMonadEff$fApplicativeEff $fFunctorEffGetPut