!՜~'              ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6789 : ; < = >?@ABC DEFGHI J K L M N O P Q RSTU V W X YZ[\]^_` a b c d e f g h i j k l m n o p q r s t u v w x yz{ | } ~        !"#$%&"Safe&'.14>DHSUVX_kpolysemy!An effect which allows a regular ' m into the   ecosystem. Monadic actions in m can be lifted into   via !.-For example, you can use this effect to lift ( actions directly into  : ! (putStrLn "hello") :: " (# IO) r =>   r () JThat being said, you lose out on a significant amount of the benefits of   by using ! directly in application code; doing so will tie your application code directly to the underlying monad, and prevent you from interpreting it differently. For best results, only use  in your effect interpreters.Consider using $ and % as a substitute for using ) directly.Safe&'-.14>DHSUVX_kNone&',-.14>DHSUVX_k!polysemyLike ), but leaves no residual constraint when expr5 is stuck. This can be used to ensure an expression isn't$ stuck before analyzing it further.polysemyLike E, but specialized to the case when you don't want to do anything if expr isn't stuck.polysemy expr b c leaves b' in the residual constraints whenever expr is stuck, otherwise it *uates c.Safe&'-.14>DHSUVX_k& polysemyAn effect for providing &'. polysemyThe error used in (, ) and *s when the result of a failed computation is recursively used and somehow visible. You may use this for your own  B interpreters. The argument should be the name of the interpreter.  Safe&'-.14>DHSUVX_k( polysemyThe kind of effect rows. polysemyThe kind of effects.  None&',-.14>DHSUVX_k2+polysemyUnhandled effectspolysemyvThis constraint gives helpful error messages if you attempt to use a first-order combinator with a higher-order type.,polysemyPut brackets around r if it's a cons.-polysemy Given that r1 isn't stuck, determine which constructor it has..polysemy\The constructor of the effect row --- it's either completely polymorphic, a nil, or a cons.polysemyuThe module this effect was originally defined in. This type family is used only for providing better error messages. Calls to +,' will automatically give instances of .-Safe&'.149>DHSUVX_k4{polysemyAn effect corresponding to the ./ typeclass.0Safe&'-.14>DHSUVX_k5Z/0 None&',-.14=>?@ACDHSUVX_kmPpolysemyA singleton for .polysemy'The kind of type-level natural numbers.polysemyA proof that the effect e4 is available somewhere inside of the effect stack r. polysemy0The original effect GADT originally lifted via  1. There is an invariant that  m ~ Sem r0 , where r0/ is the effect row that was in scope when this  was originally created.!polysemySA piece of state that other effects' interpreters have already woven through this . f is a 1, so you can always 2 into this thing."polysemy Distribute f by transforming m into n. We have invariants on m and n5, which means in actuality this function looks like f (  (Some ': Effects ': r) x) ->   r (f x).#polysemy Even though f a is the moral resulting type of 9, we can't expose that fact; such a thing would prevent   from being a '.$polysemy+A function for attempting to see inside an fG. This is no guarantees that such a thing will succeed (for example, 2 might have 3n.)%polysemy$An extensible, type-safe union. The rZ type parameter is a type-level list of effects, any one of which may be held within the %.)polysemy Decompose a %'. Either this union contains an effect e---the head of the r list---or it doesn't.*polysemyRetrieve the last effect in a %.+polysemy@An empty union contains nothing, so this function is uncallable.,polysemy Weaken a %2 so it is capable of storing a new sort of effect.-polysemyLift an effect e into a % capable of holding it..polysemyLift a  e into a % capable of holding it./polysemyAttempt to take an e effect out of a %.0polysemyLike )#, but allows for a more efficient 45 function. !"#$%&'()*+,-./0%& !"#$'(-.,)/*+0 None&'-.14=>?DHSUVX_k06polysemyxType synonym for interpreters that consume an effect without changing the return value. Offered for user convenience. rC Is kept polymorphic so it's possible to place constraints upon it: teletypeToIO ::  (Embed IO) r => 6 Teletype r 7polysemyvMakes constraints of functions that use multiple effects shorter by translating single list of effects into multiple  constraints: foo :: 7 '[ 6 Int , 6 Bool , 7# String ] r => 8 r () translates into:  foo :: (  (6 Int) r ,  (6 Bool) r ,  (7 String) r ) => 8 r () 8polysemyThe 8N monad handles computations of arbitrary extensible effects. A value of type Sem r/ describes a program with the capabilities of r. For best results, rJ should always be kept polymorphic, but you can add capabilities via the  constraint.The value of the 8 monad is that it allows you to write programs against a set of effects without a predefined meaning, and provide that meaning later. For example, unlike with mtl, you can decide to interpret an 2 effect tradtionally as an 3), or instead significantly faster as an ( 89~. These interpretations (and others that you might add) may be used interchangably without needing to write any newtypes or 'V instances. The only change needed to swap interpretations is to change a call from : to ;.The effect stack r` can contain arbitrary other monads inside of it. These monads are lifted into effects via the . effect. Monadic values can be lifted into a 8 via D.RHigher-order actions of another monad can be lifted into higher-order actions of 8 via the <& effect, which is more powerful than &, but also less flexible to interpret.A 8) can be interpreted as a pure value (via E) or as any traditional ' (via F or =). Each effect E3 comes equipped with some interpreters of the form: runE :: 8 (E ': r) a -> 8 r a -which is responsible for removing the effect E from the effect stack. It is the order in which you call the interpreters that determines the monomorphic representation of the r parameter.Order of interpreters can be important - it determines behaviour of effects that manipulate state or change control flow. For example, when interpreting this action::{ D example :: Members '[State String, Error String] r => Sem r String example = do put "start"U let throwing, catching :: Members '[State String, Error String] r => Sem r String throwing = do modify (++"-throw") throw "error" get catching = do modify (++"-catch") get, catch @String throwing (\ _ -> catching):}when handling 2/ first, state is preserved after error occurs::{ example & runError & fmap (either id id) & evalState "" & runM & (print =<<):}"start-throw-catch"while handling 7$ first discards state in such cases::{ example & evalState "" & runError & fmap (either id id) & runM & (print =<<):} "start-catch"vA good rule of thumb is to handle effects which should have "global" behaviour over other effects later in the chain.EAfter all of your effects are handled, you'll be left with either a 8 '[] a, a 8 '[  m ] a, or a 8 '[ < m ] a/ value, which can be consumed respectively by E, F, and =.ExamplesAs an example of keeping r& polymorphic, we can consider the type  (7 String) r => 8 r () to be a program with access to > :: 8 r String ? :: String -> 8 r () methods.By also adding a  (2 Bool) r constraint on r, we gain access to the 3 :: Bool -> 8 r a @ :: 8 r a -> (Bool -> 8 r a) -> 8 r a functions as well.In this sense, a  (7 s) r# constraint is analogous to mtl's AB s m- and should be thought of as such. However, unlike mtl, a 88 monad may have an arbitrary number of the same effect.For example, we can write a 8" program which can output either 4s or 5s:  foo :: (  (6 Int) r ,  (6 Bool) r ) => 8 r () foo = do C @Int 5 C True Notice that we must use -XTypeApplications( to specify that we'd like to use the (6 4 ) effect.;polysemyLike :- but flipped for better ergonomics sometimes.>polysemyIntroduce an effect into 8. Analogous to DE in the mtl ecosystem?polysemyLike >?, but introduces a new effect underneath the head of the list.? can be used in order to turn transformative interpreters into reinterpreters. This is especially useful if you're writing an interpreter which introduces an intermediary effect, and then want to use an existing interpreter on that effect.For example, given:  fooToBar ::  Bar r => 8 (Foo ': r) a -> 8 r a runBar :: 8 (Bar ': r) a -> 8 r a You can write:  runFoo :: 8 (Foo ': r) a -> 8h r a runFoo = runBar -- Consume Bar . fooToBar -- Interpret Foo in terms of the new Bar . ? -- Introduces Bar under Foo @polysemyLike >B, but introduces two new effects underneath the head of the list.ApolysemyLike >B, but introduces two new effects underneath the head of the list.Bpolysemy:Interprets an effect in terms of another identical effect.2This is useful for defining interpreters that use F without immediately consuming the newly introduced effect. Using such an interpreter recursively may result in duplicate effects, which may then be eliminated using B.CpolysemyEmbed an effect into a 8. This is used primarily via ,! to implement smart constructors.DpolysemyEmbed a monadic action m in 8.EpolysemyRun a 8' containing no effects as a pure value.FpolysemyLower a 8! containing only a single lifted ' into that monad.GpolysemyJSome interpreters need to be able to lower down to the base monad (often (D) in order to function properly --- some good examples of this are G and H.THowever, these interpreters don't compose particularly nicely; for example, to run H, you must write: runM . lowerError runM  Notice that F is duplicated in two places here. The situation gets exponentially worse the more intepreters you have that need to run in this pattern. Instead, G@ performs the composition we'd like. The above can be written as (runM .@ lowerError) ]The parentheses here are important; without them you'll run into operator precedence errors.Warning: This combinator will duplicate works that is intended to be just for initialization. This can result in rather surprising behavior. For a version of G$ that won't duplicate work, see the .@! operator in  Uhttp://hackage.haskell.org/package/polysemy-zoo/docs/Polysemy-IdempotentLowering.html polysemy-zoo.Interpreters using <m may be composed normally, and avoid the work duplication issue. For that reason, you're encouraged to use -< interpreters instead of lower-! interpreters whenever possible.HpolysemyLike G@, but for interpreters which change the resulting type --- eg. G.IpolysemyDue to a quirk of the GHC plugin interface, it's only easy to find transitive dependencies if they define an orphan instance. This orphan instance allows us to find Polysemy.Internal in the polysemy-plugin.KpolysemyThis instance will only lift (/ actions. If you want to lift into some other 61 type, use this instance, and handle it via the I interpretation.LpolysemyMpolysemyGpolysemyThe lowering function, likely F.HpolysemyThe lowering function, likely F.6789:;<=>?@ABCDEFGH89:7CDEF>?@AB;<=6GHG8H8 None&'-.14>DHSUVX_k RpolysemyA container for T. See the documentation for \.TpolysemySee the documentation for \.ZpolysemyZ is an environment in which you're capable of explicitly threading higher-order effect states. This is provided by the (internal) effect Tacticsa, which is capable of rewriting monadic actions so they run in the correct stateful environment. Inside a Z, you're capable of running ], ^ and _G which are the main tools for rewriting monadic stateful environments.:For example, consider trying to write an interpreter for J, whose effect is defined as: data J m a where K( :: m a -> (a -> m ()) -> (a -> m b) -> J m b Here we have an m aF which clearly needs to be run first, and then subsequently call the  a -> m () and a -> m b arguments. In a Z6 environment, we can write the threading code thusly: K' alloc dealloc use -> do alloc' <- ^ alloc dealloc' <- _ dealloc use' <- _ use where alloc' ::   (J" ': r) (f a1) dealloc' :: f a1 ->   (J" ': r) (f ()) use' :: f a1 ->   (J ': r) (f x) The fh type here is existential and corresponds to "whatever state the other effects want to keep track of." f is always a 1.alloc', dealloc' and use' are now in a form that can be easily consumed by your interpreter. At this point, simply bind them in the desired order and continue on your merry way.We can see from the types of dealloc' and use'! that since they both consume a f a1U, they must run in the same stateful environment. This means, for illustration, any ?s run inside the use* block will not be visible inside of the dealloc block.Power users may explicitly use [ and _T to construct whatever data flow they'd like; although this is usually unnecessary.[polysemyCGet the stateful environment of the world at the moment the effect e is to be run. Prefer ], ^ or _* instead of using this function directly.\polysemyQGet a natural transformation capable of potentially inspecting values inside of f. Binding the result of \H produces a function that can sometimes peek inside values returned by _.[This is often useful for running callback functions that are not managed by polysemy code.ExampleWe can use the result of  getInspectT to "undo" ] (or any of the other Z functions): ins <- \ fa <- ] "hello" fb <- ] True let a = T" ins fa -- Just "hello" b = T ins fb -- Just True We]polysemyLift a value into Z.^polysemyRun a monadic action in a Zj environment. The stateful environment used will be the same one that the effect is initally run in. Use _A if you'd prefer to explicitly manage your stateful environment._polysemyBLift a kleisli action into the stateful environment. You can use _( to get an effect parameter of the form a -> m b0 into something that can be used after calling ^ on an effect parameter m a.`polysemyZInternal function to create first-order interpreter combinators out of higher-order ones.apolysemyRun the U effect.^polysemyHThe monadic action to lift. This is usually a parameter in your effect._polysemyNThe monadic continuation to lift. This is usually a parameter in your effect.Continuations lifted via _6 will run in the same environment which produced the a.RSTUVWXYZ[\]^_`aUVWX[\RST^_]`aZY None"#%&'-.14>DHSUVX_gkbpolysemy)Info about constructor being lifted; use 7 to create one.dpolysemy!Name of effect's type constructorepolysemyEffect-specific type argumentsfpolysemyResult type specific to actiongpolysemyName of action constructorhpolysemyName of final functionipolysemy&Fixity of function used as an operatorjpolysemyFinal function argumentskpolysemyConstraints of final functionlpolysemy%Name of type variable parameterizing 8mpolysemyjPattern constructing function type and matching on one that may contain type annotations on arrow itself.npolysemyGiven an name of datatype or some of it's constructors/fields, return datatype's name together with info about it's constructors.8polysemy2Creates name of lifting function from action name.7polysemyRCreates info about smart constructor being created from name of the original one.opolysemyGiven a b$, get the corresponding effect type.ppolysemyp con r a will produce a   (Effect ': r) a ->   r a type, where Effect% is the effect corresponding to the b for con.qpolysemyTurn a b for Foo into a  Member Foo r constraint.rpolysemyr r type will produce a  Member type r constraint.spolysemys r a will produce a   r a type.tpolysemyGiven a bs, this will produce an action for it. It's arguments will come from any variables in scope that correspond to the cliArgs of the b.upolysemy Fail the 9 monad whenever the given :(s aren't enabled in the current module.;polysemy3Constructs capturable name from base of input name.<polysemyConverts names of all type variables in type to capturable ones based on original name base. Use with caution, may create name conflicts!vpolysemyFolds a list of =!s into a right-associative arrow =.>polysemyReplaces use of m in type with Sem r.?polysemy^Extracts name from type variable (possibly nested in signature and/or some context), returns @ otherwise.ApolysemyB counting from the end.bcdefghijklmnopqrstuvwbcdefghijklnqrspotuvwmm1+None&'-.14>DHSUVX_k@rypolysemyIf TY is a GADT representing an effect algebra, as described in the module documentation for Polysemy, $(y ''T)L automatically generates a smart constructor for every data constructor of T. This also works for data family instances. Names of smart constructors are created by changing first letter to lowercase or removing prefix :] in case of operators. Fixity declaration is preserved for both normal names and operators.zpolysemyLike y, but does not provide type signatures and fixities. This can be used to attach Haddock comments to individual arguments for each generated function. data Output o m a where Output :: o -> Output o m () makeSem_ ''Output -- | Output the value @o@. output :: forall o r . Member (Output o) r => o -- ^ Value to output. -> Sem r () -- ^ No result. cBecause of limitations in Template Haskell, signatures have to follow some rules to work properly:z must be used before the explicit type signatures'signatures have to specify argument of Sem# representing union of effects as r (e.g. Sem r ())mall arguments in effect's type constructor have to follow naming scheme from data constructor's declaration: Idata Foo e m a where FooC1 :: Foo x m () FooC2 :: Foo (Maybe x) m ()  should have x in type signature of fooC1: 1fooC1 :: forall x r. Member (Foo x) r => Sem r ()and Maybe x in signature of fooC2: 9fooC2 :: forall x r. Member (Foo (Maybe x)) r => Sem r () all effect's type variables and r) have to be explicitly quantified using forall (order is not important)WThese restrictions may be removed in the future, depending on changes to the compiler.Change in (TODO(Sandy): version): in case of GADTs, signatures now only use names from data constructor's type and not from type constructor declaration.Cpolysemy]Generates declarations and possibly signatures for functions to lift GADT constructors into Sem actions.DpolysemyoGenerates signature for lifting function and type arguments to apply in its body on effect's data constructor.Epolysemy*Builds a function definition of the form !x a b c = send (X a b c :: E m a).yzyz None!&'-.14>DHSUVX_kK}{polysemy2A promise for interpreting an effect of the union r in another thread.polysemyA strategy for automatically interpreting an entire stack of effects by just shipping them off to some other interpretation context.polysemy(Run an effect stack all the way down to (_ by running it in a new thread, and temporarily turning the current thread into an event poll.?This function creates a thread, and so should be compiled with  -threaded.polysemy<A lambda that takes the lowering function, and a finalizing (b action to mark a the forked thread as being complete. The finalizing action need not be called.{|~}{|~}None&'-.14>DHSUVX_kuFpolysemyA lazier version of LM.polysemyDThe simplest way to produce an effect handler. Interprets an effect e2 by transforming it into other effects inside of r.polysemyLike A, but for higher-order effects (ie. those which make use of the m parameter.)See the notes on Z for how to use this function.GpolysemyKA highly-performant combinator for interpreting an effect statefully. See 3 for a more user-friendly variety of this function.HpolysemyKA highly-performant combinator for interpreting an effect statefully. See 3 for a more user-friendly variety of this function.polysemyLike +, but with access to an intermediate state s.polysemyLike +, but with access to an intermediate state s.polysemyLike , but for higher-order effects.See the notes on Z for how to use this function.polysemyLike %, but instead of removing the effect e#, reencodes it in some new effect f,. This function will fuse when followed by N, meaning it's free to  in terms of the 7 effect and immediately run it.polysemyLike , but for higher-order effects.See the notes on Z for how to use this function.polysemyLike , but introduces two intermediary effects.polysemyLike , but for higher-order effects.See the notes on Z for how to use this function.polysemyLike , but introduces three intermediary effects.polysemyLike , but instead of handling the effect, allows responding to the effect while leaving it unhandled. This allows you, for example, to intercept other effects and insert logic around them.polysemyLike , but for higher-order effects.See the notes on Z for how to use this function. polysemyNA natural transformation from the handled effect to other effects already in 8.polysemyNA natural transformation from the handled effect to other effects already in 8.polysemyCA natural transformation from the handled effect to the new effect.polysemyCA natural transformation from the handled effect to the new effect.polysemyDA natural transformation from the handled effect to the new effects.polysemyDA natural transformation from the handled effect to the new effects.polysemyDA natural transformation from the handled effect to the new effects.polysemyDA natural transformation from the handled effect to the new effects.polysemyNA natural transformation from the handled effect to other effects already in 8.polysemyUnlike ,  does not consume any effects.polysemyNA natural transformation from the handled effect to other effects already in 8.polysemyUnlike ,  does not consume any effects. None&'-.14>DHSUVX_k~ polysemypolysemy is an environment in which you're capable of explicitly threading higher-order effect states to the final monad. This is a variant of Tactics (see O#), and usage is extremely similar.polysemy5Internal function to process Strategies in terms of P.polysemyQGet a natural transformation capable of potentially inspecting values inside of f. Binding the result of H produces a function that can sometimes peek inside values returned by .[This is often useful for running callback functions that are not managed by polysemy code. See also Qpolysemy=Get the stateful environment of the world at the moment the Strategy is to be run.Prefer , , , or * instead of using this function directly.polysemyEmbed a value into .polysemy(Lifts an action of the final monad into .Note: you don't need to use this function if you already have a monadic action with the functorial state threaded into it, by the use of  or %. In these cases, you need only use I to embed the action into the  environment.polysemyLifts a monadic action into the stateful environment, in terms of the final monad. The stateful environment will be the same as the one that the Strategy is initially run in.Use A if you'd prefer to explicitly manage your stateful environment.polysemy`Embed a kleisli action into the stateful environment, in terms of the final monad. You can use ( to get an effect parameter of the form a -> n b0 into something that can be used after calling  on an effect parameter n a. None&'-.14>DHSUVX_k} polysemy\An effect for embedding higher-order actions in the final target monad of the effect stack.nThis is very useful for writing interpreters that interpret higher-order effects in terms of the final monad. is more powerful than 3, but is also less flexible to interpret (compare R with "). If you only need the power of D, then you should use  instead.Beware: ] actions are interpreted as actions of the final monad, and the effectful state visible to  /  /  is that of 8all interpreters run in order to produce the final monad.,This means that any interpreter built using  will not respect local/global state semantics based on the order of interpreters run. You should signal interpreters that make use of  by adding a - suffix to the names of these.$State semantics of effects that are not interpreted in terms of the final monad will always appear local to effects that are interpreted in terms of the final monad.State semantics between effects that are interpreted in terms of the final monad depend on the final monad. For example, if the final monad is a monad transformer stack, then state semantics will depend on the order monad transformers are stacked.polysemyHThis represents a function which produces an action of the final monad m given:LThe initial effectful state at the moment the action is to be executed.A way to convert z (which is typically 8 r) to m/ by threading the effectful state through.xAn inspector that is able to view some value within the effectful state if the effectful state contains any values.A , provides these components, hence the name .polysemy}Allows for embedding higher-order actions of the final monad by providing the means of explicitly threading effects through 8 r to the final monad.Consider using V instead, which provides a more user-friendly interface, but is also slightly weaker.You are discouraged from using ^ directly in application code, as it ties your application code directly to the final monad.polysemy admits an implementation of D. Just like D:, you are discouraged from using this in application code.polysemy}Allows for embedding higher-order actions of the final monad by providing the means of explicitly threading effects through 8 r: to the final monad. This is done through the use of the  environment, which provides  and .You are discouraged from using T in application code, as it ties your application code directly to the final monad.polysemyLike Q, but may be used to interpret higher-order effects in terms of the final monad.& requires less boilerplate than using  together with  / , but is also less powerful. 5 does not provide any means of executing actions of 8 r as you interpret each action, and the provided interpreter is automatically recursively used to process higher-order occurences of 8 (e ': r) to 8 r.CIf you need greater control of how the effect is interpreted, use  together with  /  instead.Beware: Effects that aren't interpreted in terms of the final monad will have local state semantics in regards to effects interpreted using . See .polysemyLower a 8( containing only a single lifted, final ' into that monad.If you also need to process an  m! effect, use this together with .polysemy&Given natural transformations between m1 and m2, run a  m1# effect by transforming it into a  m2 effect.polysemy Transform an  m effect into a  m effectpolysemyDA natural transformation from the handled effect to the final monad.None&'-.14>DHSUVX_k. 678>?@ABDEFGHRSTYZ[\]^_yz.87EF6D>?@AByz GHZY[]^_\RSTNone&'-.14>DHSUVX_kpolysemyRun a   effect in terms of a final J instance.If you need to run a  ( effect purely, use this together with  ST.Note': This is subject to the same traps as J instances for monads with failure: this will throw an exception if you try to recursively use the result of a failed computation in an action whose effect may be observed even though the computation failed.\For example, the following program will throw an exception upon evaluating the final state: %bad :: (Int, Either () Int) bad = SU .  .  @ST . V @Int 1 . : $ mdo ? a a <- 3 () return a ] also operates under the assumption that any effectful state which can't be inspected using RA can't contain any values. For example, the effectful state for : is 3 e aQ. The inspector for this effectful state only fails if the effectful state is a K7 value, which therefore doesn't contain any values of a.This assumption holds true for all interpreters featured in this package, and is presumably always true for any properly implemented interpreter. N may throw an exception if it is used together with an interpreter that uses  W improperly.If  throws an exception for you, and it can't be due to any of the above, then open an issue over at the GitHub repository for polysemy.polysemyRun a   effect purely.Note: # is subject to the same caveats as .polysemyRun a  " effect in terms of an underlying J instance.Note: # is subject to the same caveats as .  None&'-.14>DHSUVX_kpolysemyGiven a natural transform from m1 to m2 run a Embed m1" effect by transforming it into a Embed m2 effect.DDNone&'-.14>DHSUVX_kpolysemy Given some 6 m, interpret all  m actions in that monad at once. This is useful for interpreting effects like databases, which use their own monad for describing actions.?This function creates a thread, and so should be compiled with  -threaded.polysemy The means of running this monad.None&'-.14>DHSUVX_k polysemy1An effect for spawning asynchronous computations.The L returned by . is due to the fact that we can't be sure an 2 effect didn't fail locally.polysemy5Perform a sequence of effectful actions concurrently.polysemy;A more flexible --- though less performant --- version of .$This function is capable of running > effects anywhere within an effect stack, without relying on  to lower it into (. Notably, this means that 70 effects will be consistent in the presence of . is unsafe if you're using A inside higher-order actions of other effects interpreted after . See  8https://github.com/polysemy-research/polysemy/issues/205 Issue #205.Prefer O unless you need to run pure, stateful interpreters after the interpreter for p. (Pure interpreters are interpreters that aren't expressed in terms of another effect or monad; for example, N.)polysemyRun an  effect in terms of M through final (.Beware.: Effects that aren't interpreted in terms of (0 will have local state semantics in regards to $ effects interpreted this way. See .Notably, unlike , this is not consistent with 7 unless XK is used. State that seems like it should be threaded globally throughout   will not be.Use S instead if you need to run pure, stateful interpreters after the interpreter for p. (Pure interpreters are interpreters that aren't expressed in terms of another effect or monad; for example, N.)polysemyRun an  effect in terms of M.polysemyStrategy for lowering a 8 action down to (&. This is likely some combination of F% and other interpreters composed via G. None&'-.14>DHSUVX_kpolysemy Upgrade an 3 into an  effect.polysemyA combinator doing D and 3 at the same time. Useful for interoperating with (.polysemyRun an  effect in the style of YZ.polysemyTransform one Z into another. This function can be used to aggregate multiple errors into a single type.polysemyRun an  effect as an ( N through final (4. This interpretation is significantly faster than .Beware.: Effects that aren't interpreted in terms of (0 will have local state semantics in regards to $ effects interpreted this way. See .polysemyRun an  effect as an ( N4. This interpretation is significantly faster than %, at the cost of being less flexible.polysemyStrategy for lowering a 8 action down to (&. This is likely some combination of F$ and other interpters composed via G. None&'-.14>DHPSUVX_k polysemy8An effect capable of emitting and intercepting messages.polysemy Transform a  o effect into a  (O o)( effect, right-associating all uses of P for o.This can be used together with ? in order to create -AssocR variants out of regular  interpreters.polysemy A variant of [ where an Q action is used instead of a R to commit s. None&'-.149>DHSUVX_k*SpolysemyA higher-order function receiving two parameters: a function to combine each solution with the rest of the solutions, and an action to run when no results are produced.polysemyRun a $ effect in terms of some underlying T f.polysemyRun a " effect in terms of an underlying LUnlike  , uses of UI will not execute the second branch at all if the first option succeeds.polysemy Transform a  effect into an  e. effect, through providing an exception that V may be mapped to. This allows U to handle  s of the  e effect.None&'-.14>DHSUVX_k0polysemyRun a  effect purely.polysemy Transform a  effect into an  eU effect, through providing a function for transforming any failure to an exception.polysemy Transform a  effect into a ) effect, through mapping any failure to V.polysemyRun a " effect in terms of an underlying W instance.None&'-.14>DHSUVX_kQpolysemyAn effect capable of providing X semantics. Interpreters for this will successfully run the deallocation action even in the presence of other short-circuiting effects.polysemyLike ?, but for the simple case of one computation to run afterward.polysemyLike ?, but for the simple case of one computation to run afterward.polysemyRun a  effect in terms of X through final (Beware.: Effects that aren't interpreted in terms of (0 will have local state semantics in regards to $ effects interpreted this way. See .Notably, unlike , this is not consistent with 7 unless \K is used. State that seems like it should be threaded globally throughout s  will not be.Use S instead if you need to run pure, stateful interpreters after the interpreter for p. (Pure interpreters are interpreters that aren't expressed in terms of another effect or monad; for example, N.)polysemyRun a  effect in terms of X.polysemyRun a  effect purely.polysemy5A more flexible --- though less safe --- version of $This function is capable of running d effects anywhere within an effect stack, without relying on an explicit function to lower it into (. Notably, this means that 70 effects will be consistent in the presence of .ResourceToIO' is safe whenever you're concerned about exceptions thrown by effects _already handled_ in your effect stack, or in ( code run directly inside of ~. It is not safe against exceptions thrown explicitly at the main thread. If this is not safe enough for your use-case, use  instead.?This function creates a thread, and so should be compiled with  -threaded.polysemycomputation to run firstpolysemy>computation to run afterward (even if an exception was raised)polysemycomputation to run firstpolysemy7computation to run afterward if an exception was raisedpolysemyStrategy for lowering a 8 action down to (&. This is likely some combination of F% and other interpreters composed via G. None&'-.14>DHSUVX_kk polysemy>An effect for providing statefulness. Note that unlike mtl's ]^#, there is no restriction that the $ effect corresponds necessarily to locala state. It could could just as well be interrpeted in terms of HTTP requests or database access.,Interpreters which require statefulness can  themselves in terms of , and subsequently call .polysemy A variant of 6 in which the computation is strict in the new state.polysemyRun a  effect with local state.polysemyRun a  effect with local state.polysemyRun a ! effect with local state, lazily.polysemyRun a ! effect with local state, lazily.polysemyRun a 3 effect by transforming it into operations over an Y.Note/: This is not safe in a concurrent setting, as I isn't atomic. If you need operations over the state to be atomic, use _ or ` instead.polysemyRun an # effect in terms of operations in (.&Internally, this simply creates a new Y, passes it to :, and then returns the result and the final value of the Y.Note/: This is not safe in a concurrent setting, as I isn't atomic. If you need operations over the state to be atomic, use a instead.Beware: As this uses an YO internally, all other effects will have local state semantics in regards to . effects interpreted this way. For example, 3 and @ will never revert  s, even if : is used after .polysemyHoist a  effect into a Z` monad transformer. This can be useful when writing interpreters that need to interop with MTL.None&'-.14>DHSUVX_k polysemyTAn effect capable of sending messages. Useful for streaming output and for logging.polysemyRun an 5 effect by transforming it into a list of its values.polysemyRun an ) effect by transforming it into a monoid.polysemyLike , but right-associates uses of P.CThis asymptotically improves performance if the time complexity of P for the [0 depends only on the size of the first argument.&You should always use this instead of # if the monoid is a list, such as \.polysemyRun an ; effect by transforming it into atomic operations over an Y.polysemyRun an : effect by transforming it into atomic operations over a R.polysemyRun an * effect in terms of atomic operations in (.&Internally, this simply creates a new Y, passes it to :, and then returns the result and the final value of the Y.Beware: As this uses an YO internally, all other effects will have local state semantics in regards to . effects interpreted this way. For example, 3 and @ will never revert  s, even if : is used after .polysemyLike , but right-associates uses of P.CThis asymptotically improves performance if the time complexity of P for the [0 depends only on the size of the first argument.&You should always use this instead of # if the monoid is a list, such as \.Beware: As this uses an YO internally, all other effects will have local state semantics in regards to . effects interpreted this way. For example, 3 and @ will never revert  s, even if : is used after .polysemyRun an  effect by ignoring it.polysemy Accumulate 6s so they are delayed until they reach at least size size.If sizeD is 0, this interpretation will not emit anything in the resulting  effect.polysemyRuns an < effect by running a monadic action for each of its values. None&'-.14>DHSUVX_kpolysemy^An effect which can provide input to an application. Useful for dealing with streaming input.polysemyRun an - effect by always giving back the same value.polysemyRun an G effect by providing a different element of a list each time. Returns @ after the list is exhausted.polysemyRuns an 8 effect by evaluating a monadic action for each request.None&'-.14>DHSUVX_k1polysemyAn effect corresponding to bc.polysemyRun a  effect with a constant value. polysemy Transform an  effect into a  effect.  None&'-.14>DHSUVX_k  polysemy A variant of ! that supports atomic operations. polysemy(Atomically reads and modifies the state.polysemypolysemy A variant of  G in which the computation is strict in the new state and return value.polysemy A variant of 6 in which the computation is strict in the new state.polysemyRun an  ; effect by transforming it into atomic operations over an Y.polysemyRun an  : effect by transforming it into atomic operations over a R.polysemyRun an  * effect in terms of atomic operations in (.&Internally, this simply creates a new Y, passes it to :, and then returns the result and the final value of the Y.Beware: As this uses an YO internally, all other effects will have local state semantics in regards to  . effects interpreted this way. For example, 3 and @ will never revert  s, even if : is used after .polysemy Transform an   effect to a - effect, discarding the notion of atomicity.        None&'-.14>DHSUVX_kpolysemyAn effect for logging strings.polysemyRun a + effect by printing the messages to stdout.polysemyRun a ( effect by ignoring all of its messages.polysemy Transform a  effect into a  \ effect.polysemyGet the result of a  effect as a list of \s.polysemy Transform an  \ effect into a  effect.None&'-.14>DHPSUVX_k polysemy!polysemy Transform an  effect into a  effect."polysemyRun a  effect in the style of de% (but without the nasty space leak!)#polysemyLike ", but right-associates uses of P.CThis asymptotically improves performance if the time complexity of P for the [0 depends only on the size of the first argument.&You should always use this instead of "# if the monoid is a list, such as \.$polysemy Transform a ' effect into atomic operations over a R through final (.%polysemyRun a A effect by transforming it into atomic operations through final (.&Internally, this simply creates a new R, passes it to $:, and then returns the result and the final value of the R.Beware.: Effects that aren't interpreted in terms of (0 will have local state semantics in regards to $ effects interpreted this way. See .&polysemyLike %. but right-associates uses of P.CThis asymptotically improves performance if the time complexity of P for the [0 depends only on the size of the first argument.&You should always use this instead of %# if the monoid is a list, such as \.Beware.: Effects that aren't interpreted in terms of (0 will have local state semantics in regards to $ effects interpreted this way. See . !"#$%& "#$%&!]##fgghijkllmnopqrst-u-v-w x y z { | } ~ "     W     1 !        O Q    +,+   F5<P=()*RI23@:;G     JKH7>? !"N#V$X%&66C'()*+,-./01123456789:;<=>>?@ABCDEF_`aGHH$%IJKLMNOP[QRSTUVWXSYZ[\]^_`a0b0cSTdSTeSfgVWhVWiSjk l mnopqrs t unov w xSyz {S|}+~++MSTS&SfSyS9SSTSSST/STSTSSS^STST'polysemy-1.2.2.0-6ZXrUz8rrvfJ6dvWJG6V0XPolysemyPolysemy.Fail.Type(Polysemy.Internal.CustomErrors.RedefinedPolysemy.FixpointPolysemy.Internal.FixpointPolysemy.Internal.KindPolysemy.Internal.CustomErrorsPolysemy.NonDetPolysemy.Internal.UnionPolysemy.InternalPolysemy.Internal.TacticsPolysemy.Internal.TH.CommonPolysemy.Internal.ForkliftPolysemy.Internal.CombinatorsPolysemy.FinalPolysemy.Internal.StrategyPolysemy.Embed Polysemy.IOPolysemy.AsyncPolysemy.ErrorPolysemy.WriterPolysemy.Internal.Writer Polysemy.FailPolysemy.ResourcePolysemy.StatePolysemy.OutputPolysemy.InputPolysemy.ReaderPolysemy.AtomicStatePolysemy.TracePolysemy.Embed.TypeSemembedMemberEmbedtrace traceToIOControl.Monad.FixmfixfixpointToFinal runFixpoint runFixpointMPolysemy.Internal.TH.EffectmakeSemPolysemy.Internal.NonDetControl.Applicative AlternativePolysemy.Internal.PluginLookupsendErrorthrowPolysemy.Interpretation reinterpretOutputStateControl.Exception ExceptionrunErrorerrorToIOFinalFinalrunFinalgetputcatchControl.Monad.State.Class MonadStateoutputControl.Monad.Class.Translift reinterpretH lowerError lowerResourceembedToMonadIOResourceBracket Data.TupleswaprunStateTacticalwithWeavingToFinal getInspectorT runEmbeddedData.Functor.IdentityIdentity runIdentity runLazyStateweave runStateIORefControl.Monad.Trans.ExceptExceptT runWriterTVarrunStateInIORefControl.Monad.Trans.StateStateTrunAtomicStateIORefrunAtomicStateTVaratomicStateToIOControl.Monad.Trans.ReaderReaderTControl.Monad.Trans.WriterWriterTunEmbedFail UnlessStuck WhenStuckAnythingOfAnyKindIfStuckFixpointbomb EffectRowEffectUnhandledEffect FirstOrder AmbiguousSendDefiningModuleForEffectDefiningModuleNonDetEmptyChooseSNatSZSSNatZSMemberWithErrorWeaving weaveEffect weaveState weaveDistrib weaveResult weaveInspectUnionhoistdecompextractabsurdUweakeninj injWeavingprj decompCoerce$fFunctorWeaving$fTestEqualityNatSNat$fFunctorUnion $fFindk:t $fFindk:t0InterpreterForMembersrunSemusingSemliftSemhoistSemraise raiseUnder raiseUnder2 raiseUnder3subsumerunrunM.@.@@$fPluginLookupTYPEPlugin $fMonadFixSem $fMonadIOSem$fMonadFailSem$fMonadPlusSem$fAlternativeSem $fMonadSem$fApplicativeSem $fFunctorSem InspectorinspectTacticsGetInitialStateHoistInterpretation GetInspector WithTacticsgetInitialStateTpureTrunTbindTliftT runTactics ConLiftInfoCLInfo cliEffName cliEffArgs cliEffRes cliConName cliFunName cliFunFixity cliFunArgs cliFunCxt cliUnionName:->getEffectMetadatamakeEffectTypemakeInterpreterTypemakeMemberConstraintmakeMemberConstraint' makeSemTypemakeUnambiguousSendcheckExtensions foldArrowTs splitArrowTs$fShowConLiftInfomakeSem_Forklift responseMVarrequestrunViaForklift withLowerToIO interpret interpretHstatefullazilyStateful reinterpret2H reinterpret2 reinterpret3H reinterpret3 intercept interceptH WithStrategy StrategicStrategy runStrategy getInspectorSgetInitialStateSpureSliftSrunSbindSWithWeavingToFinalThroughWeavingToFinal embedFinalwithStrategicToFinalinterpretFinal finalToFinal embedToFinal lowerEmbeddedAsyncAwaitasyncawaitsequenceConcurrently asyncToIOasyncToIOFinal lowerAsyncThrowCatch fromEither fromEitherMmapError$fExceptionWrappedExc$fShowWrappedExcWriterTellListenPasstelllistenpasswriterToEndoWriterrunWriterSTMAction runNonDetrunNonDetMaybe nonDetToError$fMonadNonDetC$fAlternativeNonDetC$fApplicativeNonDetC$fFunctorNonDetC$fFunctorNonDetStaterunFail failToError failToNonDet failToEmbedBracketOnErrorbracketbracketOnErrorfinally onExceptionresourceToIOFinal runResource resourceToIOGetPutgetsmodifymodify' evalState evalLazyState stateToIOhoistStateIntoStateT runOutputListrunOutputMonoidrunOutputMonoidAssocRrunOutputMonoidIORefrunOutputMonoidTVaroutputToIOMonoidoutputToIOMonoidAssocR ignoreOutputrunOutputBatched runOutputSemInputinput runInputConst runInputList runInputSemReaderAskLocalasklocalasks runReader inputToReader AtomicState AtomicGet atomicState atomicGet atomicGets atomicState' atomicPut atomicModify atomicModify'atomicStateToStateTrace ignoreTrace traceToOutput runTraceList outputToTracecensoroutputToWriter runWriterrunWriterAssocRwriterToIOFinalwriterToIOAssocRFinalbaseGHC.BaseMonadghc-prim GHC.TypesIO System.IOputStrLn3first-class-families-0.6.0.0-57cXSJxeSMHIB4QK5uTBckFcf.CoreEvalUnhandledEffectMsg ShowRQuoted UnstuckRState EffectRowCtorPlugin PluginLookupFunctorfmap Data.EitherEitherIntBoolControl.Monad.IO.ClassMonadIO makeCLInfoliftFunNameFromContemplate-haskellLanguage.Haskell.TH.SyntaxQghc-boot-th-8.6.3GHC.LanguageExtensions.Type ExtensioncapturableBasecapturableTVarsType replaceMArgtVarName GHC.MaybeNothing splitAtEndGHC.ListsplitAtgenFreergenSiggenDecinterpretInStateTinterpretInLazyStateTpureMonadFixLeftMaybe"async-2.2.2-JNOgs3QkEuXLm97AkAPhACControl.Concurrent.AsyncGHC.Exception.TypeData.Semigroup.InternalEndo<> GHC.Conc.SyncSTMTVar unNonDetC<|>emptyControl.Monad.Fail MonadFailControl.Exception.Base GHC.IORefIOReftransformers-0.5.5.0Control.Monad.Trans.State.LazyMonoidString