h$XU      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS T U V W X Y Z [ \ ] ^ _ ` a bcdefghijklm n o p q r s t u v w x y z { | } ~   9Fast type-aligned queue optimized to effectful functions.(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions. Safe-Inferred'(-/5>?) freer-simple(Left view deconstruction data structure. freer-simpleNon-empty tree. Deconstruction operations make it more and more left-leaning freer-simple,Build a leaf from a single operation. [O(1)] freer-simple4Append an operation to the right of the tree. [O(1)] freer-simple An alias for  freer-simple&Append two trees of operations. [O(1)]  freer-simple An alias for   freer-simple(Left view deconstruction. [average O(1)]    >Open unions (type-indexed co-products) for extensible effects.(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-./5>?% freer-simple5A constraint that requires that a particular effect, eff&, is a member of the type-level list effs#. This is used to parameterize an < computation over an arbitrary list of effects, so long as eff is  somewhere in the list.For example, a computation that only needs access to a cell of mutable state containing an % would likely use the following type:  (   ) effs =>  effs ()  freer-simpleTakes a request of type  t :: * -> *, and injects it into the .O(1) freer-simpleProject a value of type  (t ': r) :: * -> *& into a possible summand of the type  t :: * -> *.  means that  t :: * -> *! is not the value stored in the  (t ': r) :: * -> *.O(1) freer-simpleInstance resolution for this class fails with a custom type error if  t :: * -> * is not in the list  r :: [* -> *]. freer-simpleFind an index of an element  t :: * -> * in a type list  r :: [* -> *]. The element must exist. The  w :: [* -> *] type represents the entire list, prior to recursion, and it is used to produce better type errors.This is essentially a compile-time computation without run-time overhead. freer-simplePosition of the element  t :: * -> * in a type list  r :: [* -> *].Position is computed during compilation, i.e. there is no run-time overhead.O(1) freer-simpleRepresents position of element  t :: * -> * in a type list  r :: [* -> *]. freer-simple:Open union is a strong sum (existential with an evidence). freer-simpleTakes a request of type  t :: * -> *, and injects it into the .!Summand is assigning a specified . value, which is a position in the type-list (t ': r) :: * -> *.This function is unsafe.O(1) freer-simpleProject a value of type  (t ': r) :: * -> *& into a possible summand of the type  t :: * -> *.  means that  t :: * -> *! is not the value stored in the  (t ': r) :: * -> *.,It is assumed that summand is stored in the  when the . value is the same value as is stored in the .This function is unsafe.O(1) freer-simpleOrthogonal decomposition of a  (t ': r) :: * -> *.  value is returned if the  (t ': r) :: * -> * contains  t :: * -> *, and  when it doesn't. Notice that  value contains Union r :: * -> *, i.e. it can not contain  t :: * -> *.O(1) freer-simpleSpecialized version of  for efficiency.O(1)0TODO: Check that it actually adds on efficiency. freer-simpleSpecialised version of / that works on an  '[t] :: * -> * which contains only one specific summand. Hence the absence of , and .O(1) freer-simple Inject whole  r into a weaker  (any ': r) that has one more summand.O(1) freer-simpleRecursion; element is not at the current position, but is somewhere in the list.  freer-simple:Base case; element is at the current position in the list.! freer-simplePass if r is uninstantiated. The incoherence here is safe, since picking this instance doesn@t cause any variation in behavior, except possibly the production of an inferior error message. For more information, see lexi-lambda/freer-simple#3, which describes the motivation in more detail.% freer-simpleIf we reach an empty list, that@s a failure, since it means the type isn@t in the list. For GHC >=8, we can render a custom type error that explicitly states what went wrong.   5>Open unions (type-indexed co-products) for extensible effects.(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-./5>?( freer-simpleLike , ( eff effs% is a constraint that requires that eff is in the type-level list effs . However, unlike , ( requires m be the final effect in effs.Generally, this is not especially useful, since it is preferable for computations to be agnostic to the order of effects, but it is quite useful in combination with  or . to embed ordinary monadic effects within an  computation.) freer-simpleA shorthand constraint that represents a combination of multiple & constraints. That is, the following ) constraint: ) '[Foo, Bar, Baz] effs '@is equivalent to the following set of  constraints: ( Foo effs,  Bar effs,  baz effs) ;Note that, since each effect is translated into a separate , constraint, the order of the effects does not matter. ()  )( Mechanisms to make effects work.(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-/5>?-, freer-simple4A data type for representing nondeterminstic choice./ freer-simpleThe / monad provides the implementation of a computation that performs an arbitrary set of algebraic effects. In / effs a, effs is a type-level list that contains all the effects that the computation may perform. For example, a computation that produces an  by consuming a  from the global environment and acting upon a single mutable cell containing a  would have the following type: / '[  ,   ]  Normally, a concrete list of effects is not used to parameterize /. Instead, the  or ) constraints are used to express constraints on the list of effects without coupling a computation to a concrete list of effects. For example, the above example would more commonly be expressed with the following type: ) '[  ,    ] effs => / effs  This abstraction allows the computation to be used in functions that may perform other effects, and it also allows the effects to be handled in any order.0 freer-simple Pure value ( =  = 0).1 freer-simpleSending a request of type  Union effs with the continuation 2 r b a.2 freer-simpleAn effectful function from a :: * to b :: * that is a composition of several effectful functions. The paremeter effs :: [* -> *] describes the overall effect. The composition members are accumulated in a type-aligned queue.3 freer-simple&Effectful arrow type: a function from a :: * to b :: *$ that also does effects denoted by effs :: [* -> *].4 freer-simple=Function application in the context of an array of effects, 2 effs b w.5 freer-simple!Composition of effectful arrows (2). Allows for the caller to change the effect environment, as well.6 freer-simple@Sends@ an effect, which should be a value defined as part of an effect algebra (see the module documentation for Control.Monad.Freer), to an effectful computation. This is used to connect the definition of an effect to the /* monad so that it can be used and handled.7 freer-simple Identical to 6), but specialized to the final effect in effs to assist type inference. This is useful for running actions in a monad transformer stack used in conjunction with 9.8 freer-simple Runs a pure / computation, since an / computation that performs no effects (i.e. has no effects in its type-level list) is guaranteed to be pure. This is usually used as the final step of running an effectful computation, after all other effects have been discharged using effect handlers.0Typically, this function is composed as follows: someProgram  runEff1 eff1Arg  runEff2 eff2Arg1 eff2Arg2  8 9 freer-simpleLike 8, 9 runs an /' computation and extracts the result. Unlike 8, 9 allows a single effect to remain within the type-level list, which must be a monad. The value returned is a computation in that monad, which is useful in conjunction with 7 or 1 for plugging in traditional transformer stacks.: freer-simpleLike ;, but with support for an explicit state to help implement the interpreter.; freer-simpleInterpret an effect by transforming it into another effect on top of the stack. The primary use case of this function is allow interpreters to be defined in terms of other ones without leaking intermediary implementation details through the type signature.= freer-simple.Given a request, either handle it or relay it.> freer-simpleParameterized =+. Allows sending along some state of type s :: * to be handled for the target effect, or relayed to a handler that can- handle the target effect.? freer-simpleIntercept the request and possibly reply to it, but leave it unhandled.@ freer-simpleLike ?, but with support for an explicit state to help implement the interpreter.A freer-simpleEmbeds a less-constrained /2 into a more-constrained one. Analogous to MTL's lift.= freer-simpleHandle a pure value. freer-simple$Handle a request for effect of type  eff :: * -> *. freer-simpleResult with effects of type  eff :: * -> * handled.> freer-simpleHandle a pure value. freer-simple$Handle a request for effect of type  eff :: * -> *. freer-simpleResult with effects of type  eff :: * -> * handled., (),-./1023456789:;<=>?@A/103267A89=>?@;:<45,-.Composable Writer effects.(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-/5>?/{I freer-simple7Writer effects - send outputs to an effect environment.K freer-simple*Send a change to the attached environment.L freer-simpleSimple handler for I effects.IJKLIJKLComposable Trace effects.(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-/5>?1)M freer-simpleA Trace effect; takes a  and performs output.O freer-simplePrinting a string in a trace.P freer-simpleAn  handler for M effects.MNOPMNOPNon deterministic effects/2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-/5>?2GQ freer-simple&A handler for nondeterminstic effects.,-.QR,-.QR *Generation of fresh integers as an effect.(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-/5>?4S freer-simpleFresh effect model.U freer-simpleRequest a fresh effect.V freer-simple Handler for S effects, with an  for a starting value. The return value includes the next fresh value.W freer-simple Handler for S effects, with an 6 for a starting value. Discards the next fresh value.STUVWSTUVW #Composable coroutine effects layer.(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-/5>?9X freer-simple!Represents status of a coroutine.Y freer-simple.Coroutine is done with a result value of type r.Z freer-simpleReporting a value of the type a', and resuming with the value of type b', possibly ending with a value of type x.[ freer-simple*A type representing a yielding of control.&Type variables have following meaning: aThe current type.b'The input to the continuation function.cThe output of the continuation.] freer-simple7Lifts a value and a function into the Coroutine effect.^ freer-simpleReply to a coroutine effect by returning the Continue constructor._ freer-simple)Launch a coroutine and report its status.` freer-simpleLaunch a coroutine and report its status, without handling (removing) [ from the typelist. This is useful for reducing nested coroutines. XYZ[\]^_` [\]XYZ_`^%Freer - an extensible effects library(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-/5>?E b freer-simpleThe simplest way to produce an effect handler. Given a natural transformation from some effect eff- to some effectful computation with effects effs), produces a natural transformation from / (eff ': effs) to / effs.c freer-simpleLike b, but instead of handling the effect, allows responding to the effect while leaving it unhandled.d freer-simpleInterprets an effect in terms of another identical effect. This can be used to eliminate duplicate effects.e freer-simpleLike b1, but instead of removing the interpreted effect f#, reencodes it in some new effect g.f freer-simpleLike e, but encodes the f effect in two" new effects instead of just one.g freer-simpleLike e, but encodes the f effect in three" new effects instead of just one.h freer-simpleLike b, e, f, and g, but allows the result to have any number of additional effects instead of simply 0-3. The problem is that this completely breaks type inference, so you will have to explicitly pick gs using TypeApplications . Prefer b, e, f, or g where possible.i freer-simpleRuns an effect by translating it into another effect. This is effectively a more restricted form of e4, since both produce a natural transformation from / (f ': effs) to / (g ': effs) for some effects f and g, but i does not permit using any of the other effects in the implementation of the interpreter.In practice, this difference in functionality is not particularly useful, and e- easily subsumes all of the functionality of i, but the way i: restricts the result leads to much better type inference. i f = e (6 . f) j freer-simpleLike b, this function runs an effect without introducing another one. Like i, this function runs an effect by translating it into another effect in isolation, without access to the other effects in effs. Unlike either of those functions, however, this runs the effect in a final monad in effs, intended to be run with 9. j f = b (7 . f) k freer-simple1A highly general way of handling an effect. Like b, but explicitly passes the  continuation, a function of type v -> / effs b, to the handler function. Most handlers invoke this continuation to resume the computation with a particular value as the result, but some handlers may return a value without resumption, effectively aborting the computation to the point where the handler is invoked. This is useful for implementing things like , for example. b f = k (e -> (f e )) l freer-simple'Combines the interposition behavior of c0 with the continuation-passing capabilities of k. c f = l (e -> (f e )) ()/6789Abcdefghijkl/)(67A89bcdefghijkl None '(-/5>?IUm freer-simpleIf T is a GADT representing an effect algebra, as described in the module documentation for Control.Monad.Freer, $(m ''T)/ automatically generates a function that uses 6 with each operation. For more information, see the module documentation for Control.Monad.Freer.TH.n freer-simpleLike m, but does not provide type signatures. This can be used to attach Haddock comments to individual arguments for each generated function. data Lang x where Output :: String -> Lang () makeEffect_ ''Lang -- | Output a string. output :: Member Lang effs => String -- ^ String to output. -> Eff effs () -- ^ No result.  Note that n must be used before the explicit type signatures.mnmn /State effects, for state-carrying computations.(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-/5>?N o freer-simpleStrict o effects: one can either p values or q them.r freer-simple0Retrieve the current value of the state of type s :: *.s freer-simple3Set the current state to a specified value of type s :: *.t freer-simple!Modify the current state of type s :: * using provided function (s -> s).u freer-simpleRetrieve a specific component of the current state using the provided projection function.v freer-simple Handler for o effects.w freer-simpleRun a o( effect, returning only the final state.x freer-simple/Run a State effect, discarding the final state.y freer-simpleAn encapsulated State handler, for transactional semantics. The global state is updated only if the y finished successfully.GHC cannot infer the s type parameter for this function, so it must be specified explicitly with TypeApplications5. Alternatively, it can be specified by supplying a  to z.z freer-simpleLike y, but s is specified by providing a  instead of requiring TypeApplications. opqrstuvwxyz opqrstuvxwyz 1Reader effects, for encapsulating an environment.(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-/5>?RV{ freer-simple0Represents shared immutable environment of type (e :: *)3 which is made available to effectful computation.} freer-simple#Request a value of the environment.~ freer-simpleRequest a value of the environment, and apply as selector/projection function to it. freer-simple Handler for { effects. freer-simple4Locally rebind the value in the dynamic environment.7This function is like a relay; it is both an admin for {$ requests, and a requestor of them.~ freer-simpleThe selector/projection function to be applied to the environment.{|}~{|}~An Error effect and handler.(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis KingBSD3#Alexis King  experimental!GHC specific language extensions.None'(-/5>?U freer-simpleExceptions of the type e :: * with no resumption. freer-simple-Throws an error carrying information of type e :: *. freer-simpleHandler for exception effects. If there are no exceptions thrown, returns 4. If exceptions are thrown and not handled, returns , while interrupting the execution of any other effect handlers. freer-simpleA catcher for Exceptions. Handlers are allowed to rethrow exceptions. freer-simple'A catcher for Exceptions. Handlers are not allowed to rethrow exceptions. !"#$%&'()*+,-../00123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abccdefg h h i j k l m n o o p q r s tuUvwxyz{|}~                    +freer-simple-1.2.1.2-2uZzOkgbIoxCsIOORhQ4OmControl.Monad.Freer Data.FTCQueueData.OpenUnionData.OpenUnion.InternalControl.Monad.Freer.NonDetControl.Monad.Freer.InternalControl.Monad.Freer.WriterControl.Monad.Freer.TraceControl.Monad.Freer.FreshControl.Monad.Freer.CoroutineControl.Monad.Freer.THControl.Monad.Freer.StateControl.Monad.Freer.ReaderControl.Monad.Freer.ErrorEffStatesendMControl.Monad.BaseliftBaseReader Data.Function& catchError1natural-transformation-0.4-6EQWiwxPO8s9WuoVsVTQUsControl.Natural~>ViewLTOne:|FTCQueue tsingleton|>snoc><appendtviewlWeakensweakens:++:Memberinjprj IfNotFoundFindElemelemNoPunPUnion unsafeInj unsafePrjdecompdecomp0extractweaken $fFindElemt: $fFindElemt:0$fIfNotFoundtrw$fIfNotFoundt:w$fIfNotFoundt:w0 $fMembertr$fIfNotFoundt[]w $fWeakens: $fWeakens[] LastMemberMembers$fLastMemberm:$fLastMemberm:0NonDetMZeroMPlusValEArrsArrqAppqCompsendrunrunM replaceRelayS replaceRelay replaceRelayN handleRelay handleRelayS interpose interposeSraise $fMonadIOEff$fMonadBasebEff $fMonadEff$fApplicativeEff $fFunctorEff$fMonadPlusEff$fAlternativeEffWriterTelltell runWriterTracetracerunTrace makeChoiceAmsplitFreshfreshrunFresh evalFreshStatusDoneContinueYieldyieldreplyCrunC interposeC$fFunctorYield interpretsubsume reinterpret reinterpret2 reinterpret3 reinterpretN translate interpretM interpretWith interposeWith makeEffect makeEffect_GetPutgetputmodifygetsrunState execState evalStatetransactionStatetransactionState'Askaskasks runReaderlocalError throwErrorrunError handleErrorinteger-wired-inGHC.Integer.TypeIntegerbase GHC.MaybeNothingghc-prim GHC.TypesWord Data.EitherRightLeftMaybeEitherGHC.BaseStringBoolreturnpure.transformers-base-0.4.6-DuPufTGc2fAGorgoRQsXgAIOInt>>= Data.ProxyProxy