h$dX^4      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                 None$&'(+-./<=>?NcleffCoerce any boxed value into .cleffCoerce  to a boxed value. This is generally unsafe and it is your responsibility to ensure that the type you're coercing into is the original type that the  is coerced from.None%&'(+-./<=>?I)cleff1The type of natural transformations from functor f to g.cleffes is a subset of es'. cleff The element e is present in the list es. cleff The list es' list is concrete, i.e. is of the form '[a1, a2, ..., an], i.e. is not a type variable. cleffType level list concatenation. cleff,Extensible record type supporting efficient  O(1) ) reads. The underlying implementation is 4 slices, therefore suits small numbers of entries (i.e. less than 128). cleffInfix version of " that also supports destructuring.cleffInfix version of " that also supports destructuring.cleffGet the length of the record.cleffCreate an empty record.  O(1) .cleff Create a record with one entry.  O(1) .cleff!Prepend one entry to the record.  O(n) .cleffConcatenate two records.  O(m+n) .cleff0Slice off one entry from the top of the record.  O(1) .cleff6Slice off several entries from the top of the record.  O(1) .cleffGet the head of the record.  O(1) .cleff*Take elements from the top of the record.  O(m) .cleff(Get an element in the record. Amortized  O(1) .cleff&Get a subset of the record. Amortized  O(m) .cleffModify an entry in the record.  O(n) .cleffInfix version of .cleffMerge a subset into the original record, updating several entries at once.  O(m+n) .cleffInfix version of .cleff.Apply a natural transformation to the record.  O(n) .cleffInfix version of . cleff/Zip two records with a natural transformation.  O(n) .!cleff.Check if a predicate is true on all elements.  O(n) ."cleff6Check if a predicate is true on at least one element.  O(n) .#cleffConvert a record that effectively contains a fixed type into a list of the fixed type.  O(n) .$cleff"Map each element to a fixed type.  O(n) .%cleffTest the size invariant of  .&cleffTest whether all fields of   are really set.'cleffTest all invariants.(cleff=The unit of a record type are the units of its element types:  ==    )cleff  ==  +cleff8One-by-one semigroup operation instead of concatenation. (x  xs)  (y  ys) == x  y  xs  ys -cleff  (      ,) == "Const False :~: Const True :~: empty" .cleff  "Identity True :~: Identity \Hi\\ :~: empty" ==     "Hi"   /cleff  (    "Hi"  ") == "Identity True :~: Identity \Hi\\ :~: empty" 0cleff  "empty" ==  1cleff   == "empty" !  !"#$%&'!      !"#$'%&0 5 559 9 4None%&'(+-./<=>? <cleffA simulated array of thread-local pointers. This means for each array cell, you can either change the pointer or change the memory the pointer points to.Note that like real memory, any of the operations provided is not generally safe and it is your responsibility to ensure the correctness of your calls.=cleff%The representation of a pointer in a <.>cleff Create a < with no pointers.?cleffAdjust the array of pointers.@cleffAllocate a new address.  O(1) .AcleffRead a pointer.  O(1) .Bcleff)Write to the memory a pointer points to.  O(1) .Ccleff"Replace a pointer with a new one.  O(n) .Dcleff Add a new pointer to the array.  O(n) .EcleffUse the memory of LHS as a newer version for the memory of RHS.  O(1) .FcleffPointer equality.Gcleff)An arbitrary total order on the pointers. <=>?@ABCDE <=>?@ABCDENone$&'(+-./<=>?Hcleffxs H es means the list of effects xs% are all present in the effect stack es'. This is a convenient type alias for (e1 I es, ..., en I es).Icleffe I es means the effect e is present in the effect stack es#, and therefore can be used in an  es computation.JcleffThe type of effects. An effect e m a takes an effect monad type m ::  ->  and a result type a :: . HIJJIH H0I0None$&'(+-./<=>?rKcleff%The extensible effect monad. A monad K es, is capable of performing any effect in the  effect stack es, which is a type-level list that holds all effects available. However, most of the times, for flexibility, es should be a polymorphic type variable, and you should use the I and H operators in constraints to indicate what effects are in the stack. For example,    I es,    I es => K es  (allows you to perform operations of the    effect and the   ' effect in a computation returning an .NcleffThe effect memironment that stores handlers of any effect present in the stack es.OcleffThe internal representation of effect handlers. This is just a natural transformation from the effect type e (K es) to the effect monad K es for any effect stack es.In interpreting functions (see Cleff.Internal.Interpret), the user-facing % type is transformed into this type.RcleffPerform an effect operation, i.e. a value of an effect type e :: J. This requires e to be in the effect stack.Scleff  (handler :: O E) == "Handler E"  KLMNOPQR OPQNKLM RNone%&'(+-./<=>?#RZcleffFor a datatype T representing an effect, Z T generates functions defintions for performing the operations of T via R. The naming rule is changing the first uppercase letter in the constructor name to lowercase or removing the : symbol in the case of operator constructors. Also, this function will preserve any fixity declarations defined on the constructors.Because of the limitations of Template Haskell, all constructors of T should be polymorphic in the monad type, if they are to be used by Z. For example, this is not OK: data Limited :: J where Noop :: Limited (K es) () because the monad type K es* is not a fully polymorphic type variable.$This function is also "weaker" than polysemy's makeSem, because this function cannot properly handle some cases involving complex higher order effects. Those cases are rare, though. See the tests for more details.[cleffLike Z, but doesn't generate type signatures. This is useful when you want to attach Haddock documentation to the function signature, e.g.: data Identity :: J where Noop :: Identity m () [; ''Identity -- | Perform nothing at all. noop :: Identity I es => K es () 6Be careful that the function signatures must be added after the [ call.Z[Z[None&&'(+-./<=>?0'\cleff9The type of a simple transformation function from effect e to e'.]cleffThe type of an effect handler0, which is a function that transforms an effect e from an arbitrary effect stack into computations in the effect stack es.^cleff>The typeclass that indicates a handler scope, handling effect e sent from the effect stack esSend in the effect stack es.>You should not define instances for this typeclass whatsoever._cleffLift a computation into a bigger effect stack with one more effect. For a more general version see `.`cleffLift a computation into a bigger effect stack with arbitrarily more effects. This function requires TypeApplications.acleffLift a computation with a fixed, known effect stack into some superset of the stack.bcleffEliminate a duplicate effect from the top of the effect stack. For a more general version see c.ccleffEliminate several duplicate effects from the top of the effect stack. This function requires TypeApplications.dcleffGet the send-site N.ecleffInterpret an effect e) in terms of effects in the effect stack es with an effect handler.fcleffLike e, but adds a new effect e'! that can be used in the handler.gcleffLike f, but adds two new effects.hcleffLike f, but adds three new effects.icleffLike f, but adds arbitrarily many new effects. This function requires TypeApplications.jcleffRespond to an effect while being able to leave it unhandled (i.e. you can resend the effects in the handler).kcleffLike j?, but allows to introduce one new effect to use in the handler.lcleffLike k, but allows introducing arbitrarily many effects. This requires TypeApplications.mcleffInterpret an effect in terms of another effect in the stack via a simple \.ncleffLike m, but instead of using an effect in stack, add a new one to the top of it.ocleffRun a computation in the current effect stack. This is useful for interpreting higher-order effects, like a bracketing effect: data Resource m a where Bracket :: m a -> (a -> m ()) -> (a -> m b) -> Resource m b Bracket alloc dealloc use ->  (o alloc) (o . dealloc) (o . use) pcleffRun a computation in the current effect stack, but handles the current effect inside the computation differently by providing a new ]. This is useful for interpreting effects with local contexts, like  : runReader :: r -> K (  r ': es)  K es runReader x = e' (handle x) where handle :: r -> ] ( " r) es handle r = \case   ->  r   f m -> p (handle $ f r) m qcleff*Temporarily gain the ability to lift some K es actions into K esSend. This is useful for dealing with effect operations with the monad type in the negative position, which means it's unlikely that you need to use this function in implementing your effects.\]^_`abcdefghijklmnopq_`abc^d]\efghijklmnopqNone%&'(+-./<=>?; rcleffThe type of an  effect handler0, which is a function that transforms an effect e into ! computations. This is used for y.scleff)The effect for lifting and unlifting the  monad, allowing you to use , , , ,  and  functionalities. This is the "final" effect that most effects eventually are interpreted into. For example, you can do: log :: s :> es => K es () log =  ( "Test logging") It is not recommended to use this effect in application code, as it is too liberal and allows arbitrary IO. Ideally, this is only used in interpreting more fine-grained effects.Note that this is not< a real effect and cannot be interpreted in any way besides v and w. It is similar to Polysemy's Final effect which also cannot be interpreted. This is mainly for performance concern, but also that there doesn't really exist reasonable interpretations other than the current one, given the underlying implementation of the K monad.s5 can be a real effect though, and you can enable the  dynamic-ioe build flag to have that. However it is only for reference purposes and should not be used in production code.tcleffLift an  computation into K. This function is  highly unsafe& and should not be used directly; use ? instead, or if you're interpreting higher-order effects, use {.ucleff$Give a runner function a way to run K actions as an  computation. This function is  highly unsafe' and should not be used directly; use ? instead, or if you're interpreting higher-order effects, use z.vcleffUnsafely eliminate an s effect from the top of the effect stack. This is mainly for implementing effects that uses ! but does not do anything really impure (i.e. can be safely used  on), such as a State effect.wcleff Unwrap an K' computation with side effects into an 0 computation, given that all effects other than s are interpreted.xcleffUnwrap a pure K computation into a pure value, given that all effects are interpreted.ycleff Interpret an effect in terms of !, by transforming an effect into  computations. y f = e (  f) zcleff*Temporarily gain the ability to unlift an K esSend computation into . This is useful for dealing with higher-order effects that involves .{cleffLift an  computation into K esSend. This is useful for dealing with effect operations with the monad type in the negative position within , like ing.}cleffCompatibility instance; use  if possible.~cleffCompatibility instance; use  if possible. rstuvwxyz{ stuvwxryz{None$&'(+-./<=>??@cleffAn effect capable of accumulating outputs. This roughly corresponds to the  MonadWriter typeclass and WriterT monad transformer in the mtl approach.(However, note that this does not have a pass operation as we are not sure what its semantics should be. In fact, the pass semantics in mtl is also unclear and will change when handlers are put in different orders. To avoid any confusion we decided it is best that we don't include it because no one seems to be relying on it anyway.cleff.Apply a function to the accumulated output of .cleffRun a monoidal  effect.Caveat: Both  and s under  will stop taking care of writer operations done on forked threads as soon as the main thread finishes its computation. Any writer operation done before main thread finishes is still taken into account. None$&'(+-./<=>?Ecleff/An effect capable of providing a mutable state s that can be read and written. This roughly corresponds to the  MonadState typeclass and StateT monad transformer in the mtl approach.cleff"Apply a function to the result of .cleff-Modify the value of the state via a function.cleffRun the  effect.Caveat: The ! interpreter is implemented with  s and there is no way to do arbitrary atomic transactions. The 7 operation is atomic though and it is implemented with , which can be faster than atomicModifyIORef in contention. For any more complicated cases of atomicity, please build your own effect that uses either MVars or TVars based on your need.Unlike mtl, in cleff the state will not revert when an error is thrown. will stop taking care of state operations done on forked threads as soon as the main thread finishes its computation. Any state operation done before main thread finishes is still taken into account.cleffRun a  effect in terms of a larger  via a .   None$&'(+-./<=>?Gcleff8An effect capable of providing an immutable environment r4 that can be read. This roughly corresponds to the  MonadReader typeclass and ReaderT monad transformer in the mtl approach.cleff"Apply a function on the result of .cleffRun a ' effect with a given environment value.cleffRun a  effect in terms of a larger  via a . None$&'(+-./<=>?IcleffAn effect that is capable of sending outputs, for example to a log file or an output stream.cleffRun an  effect by accumulating a list.cleffRun an ! effect by translating it into a .cleffIgnore outputs of an  effect altogether.cleffRun an 4 effect by performing a computation for each output. None$&'(+-./<=>?KcleffAn effect capable of logging messages, mostly for debugging purposes.cleffRun the  effect by writing to a .cleffRun the  effect by writing to .cleffRun the  effect by writing to .cleffRun the + effect by ignoring all outputs altogether.cleffTransform the  effect into an   effect. None$&'(+-./<=>?NcleffAn effect capable of ing and specifically, ing operations, i.e.= allowing cleanup after operations that my raise exceptions.cleff Variant of , that does not provide a restoring function.cleff Variant of , that does not provide a restoring function.cleff Variant of  that does not pass the allocated resource to the cleanup action.cleffAttach a cleanup action that will always run to a potentially throwing computation.cleffAttach an action that runs if the main computation throws an exception.cleffInterpret the  effect in terms of primitive  actions.None$&'(+-./<=>?PcleffAn effect that is capable of reading from some input source, such as an input stream.cleff"Apply a function to the result of .cleffRun an ) effect by giving a constant input value.cleffRun an * effect by going through a list of values.cleffRun an ; effect by performing a computation for each input request.None$&'(+-./<=>?RqcleffAn effect capable of generating unique values. This effect can be useful in generating variable indices.cleff Interpret a   effect in terms of  .cleff Interpret a   effect in terms of IO actions.None%&'(+-./<=>?\ cleffAn effect capable of breaking out of current control flow by raising an exceptional value e*. This effect roughly corresponds to the  MonadError typeclass and ExceptT monad transformer in mtl.cleffLift an  value into the  effect.cleff Lift exceptions generated by an  computation into the  effect.cleffLike , but allows to transform the exception into another error type.cleff Lift exceptions generated by an K computation into the  effect.cleffLike , but allows to transform the exception into another error type.cleffTry to extract a value from , throw an error otherwise.cleff A variant of 5 that allows a predicate to choose whether to catch () or rethrow ( ) the error.cleff A variant of 5 that allows a predicate to choose whether to catch () or rethrow ( ) the error.cleffFlipped version of .cleffFlipped version of .cleffFlipped version of .cleff Runs a computation, returning a  value if an error was thrown.cleff A variant of 5 that allows a predicate to choose whether to catch () or rethrow ( ) the error.cleffRun an  effect.Caveat:  is implemented with s therefore inherits some of its unexpected behavoirs. Errors thrown in forked threads will not be directly caught by s in the parent thread. Instead it will incur an exception, and we won't be quite able to display the details of that exception properly at that point. Therefore please properly handle the errors in the forked threads separately.However if you use async and wait for the action in the same effect scope (i.e. they get to be interpreted by the same  handler), the error will be caught in the parent thread even if you don't deal with it in the forked thread. But if you passed the Async# value out of the effect scope and waited for it elsewhere, the error will again not be caught. The best choice is  not to pass Async values around randomly.cleff Transform an  into another. This is useful for aggregating multiple errors into one type.None%&'(+-./<=>?]cleffAn effect that expresses failure with a message. This effect allows the use of the  class.cleffRun a  effect in terms of .cleffRun a + effect in terms of throwing exceptions in .!None%&'(+-./<=>?^"#$%&'%&()*+)*,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde8fghijklmnopqrsttuvwxyz{|}~         B                                        %%%%"#"#%h"#%"#%"#%%%%%%"#%%%%%%%%!!!!!!!!$cleff-0.1.0.0-5bbR6uZP4CLDfxqDI4vJ6JData.AnyCleffData.RecData.MemCleff.Internal.MonadCleff.Internal.InterpretCleff.Internal.Base Cleff.Writer Cleff.State Cleff.Reader Cleff.Output Cleff.Trace Cleff.Mask Cleff.Input Cleff.Fresh Cleff.Error Cleff.FailData.Functor.IdentityIdentityCleff.Internal.EffectEffReaderStateHandlerCleff.Internal.THUnliftIObracketLocalAskIOE Data.IORefIORef Paths_cleffghc-prim GHC.TypesAnybaseControl.Monad.IO.ClassliftIOMonadIO,unliftio-core-0.2.0.1-9GVcmaajsglG88oErAZOTVControl.Monad.IO.Unlift withRunInIO MonadUnliftIOtoAnyfromAny~>SubsetElem KnownList++Rec:++::~:lengthempty singletonconsconcattaildropheadtakeindexpickmodify/~/batch/++/natural<#>zipWithallany degenerateextract sizeInvariant allAccessible invariant $fMonoidRec $fMonoidRec0$fSemigroupRec$fSemigroupRec0$fSemigroupRec1 $fShowRec $fReadRec $fShowRec0 $fReadRec0 $fShowRec1$fEqRec$fEqRec0$fEqRec1 $fKnownListk:$fKnownListk[] $fElemae: $fElemae:0 $fElemke[] $fSubsetk:es' $fSubsetk[]esMemMemPtradjustallocareadwritereplaceappendupdate $fEqMemPtr $fOrdMemPtr:>>:>EffectunEffEnvInternalHandler runHandlersend$fShowInternalHandler$fSemigroupEff $fMonoidEff $fFunctorEff$fApplicativeEff $fMonadEff $fMonadFixEff makeEffect makeEffect_ TranslatorHandlingraiseraiseNinjectsubsumesubsumeNsendEnv interpret reinterpret reinterpret2 reinterpret3 reinterpretN interposeimposeimposeN transform translatetoEff toEffWith withFromEff HandlerIO primLiftIO primUnliftIOthisIsPureTrustMerunIOErunPure interpretIOwithToIOfromIO$fPrimMonadEff$fMonadBaseControlIOEff$fMonadBaseIOEff$fMonadMaskEff$fMonadCatchEff$fMonadThrowEff$fMonadUnliftIOEff $fMonadIOEffWriterTellListenlistentelllistens runWriterGetPutstateputgetgetsrunStatezoomlocalaskasks runReadermagnifyOutputoutputoutputToListStateoutputToWriter ignoreOutput runOutputEffTracetracerunTraceHandlerunTraceStdoutrunTraceStderr ignoreTrace traceToOutputMaskUninterruptibleMaskBracketBracketOnErrorbracketOnErroruninterruptibleMaskmaskmask_uninterruptibleMask_bracket_finallyonErrorrunMaskInputinputinputs runInputConstinputToListState runInputEffFreshfreshfreshIntToStaterunFreshUniqueError ThrowError CatchError catchError throwError fromEither fromExceptionfromExceptionViafromExceptionEfffromExceptionEffVianotecatchErrorJust catchErrorIf handleErrorhandleErrorJust handleErrorIftryError tryErrorJustrunErrormapError$fShowErrorExc$fExceptionErrorExcFailrunFail runFailIO$fMonadFailEff(primitive-0.7.3.0-GaTKHWlkxwrBb07qgsmPECData.Primitive.SmallArray SmallArrayGHC.Basemempty<>GHC.ShowshowData.Functor.ConstConstFalseTrue Text.ReadTypeStringBoolinteger-wired-inGHC.Integer.TypeIntegerpureIOControl.Monad.Primitive PrimMonadexceptions-0.10.4Control.Monad.Catch MonadCatch MonadThrow MonadMask System.IOputStrLn GHC.IO.UnsafeunsafeDupablePerformIO.(unliftio-0.2.20.1-7TFE4g28s322jbLjUpAVQMUnliftIO.Exception+atomic-primops-0.8.4-4spYits9m0kFboMhzJLwEq Data.AtomicsatomicModifyIORefCAS(microlens-0.4.12.0-LWmCgM3D0eIxbRgAEzd8kLens.Micro.TypeLens'GHC.IO.Handle.TypesHandleGHC.IO.Handle.FDstdoutstderrInt Data.UniqueUnique Data.EitherEither GHC.MaybeMaybeJustNothingLeftGHC.Exception.Type ExceptionControl.Monad.Fail MonadFailversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName