úÎ!Æ–Œ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º» Safe ÎNone-.HMUV5ú capabilityCompose two accessors.wThis is not necessary in deriving via clauses, but in places where a transformer is expected as a type argument. E.g.  . capability,Skip one level in a monad transformer stack.SNote, that instances generated with this strategy can incur a performance penalty.Example: newtype MyStates a = MyStates (StateT Int (State Bool) a) deriving (HasState "foo" Bool) via Lift (StateT Int (MonadState (State Bool)))  Uses the    instance of  StateT Int to lift the   "foo" Bool instance of the underlying  (State Bool) over the  StateT Int monad transformer.  capability8Choose the given constructor in the sum-type in context m.Example: Çdata MyError = ErrA String | ErrB String newtype MyExcept a = MyExcept (ExceptT MyError Identity a) deriving (HasThrow "ErrB" String) via Ctor "ErrB" () (MonadError (ExceptT MyError Identity))  Converts the  () "MyError" instance of  (ExceptT MyError Identity) to a  "ErrB" String instance by wrapping thrown String s in the ErrB constructor.  capabilityAccess the value at position pos in the context m.Example: †newtype MyReader a = MyReader (Reader (Int, Bool) a) deriving (HasReader 1 Int) via Pos 1 () (MonadReader (Reader (Int, Bool)))  Converts the  () (Int, Bool) instance of  (Reader (Int, Bool)) to a  1 Int9 instance by focusing on the first element of the tuple.LThe implied number tag can be renamed to a more descriptive name using the  combinator: •newtype MyReader a = MyReader (Reader (Int, Bool) a) deriving (HasReader "foo" Int) via Rename 1 (Pos 1 () (MonadReader (Reader (Int, Bool))))  capabilityAccess the record field field in the context m.Example: ždata Foo = Foo { foo :: Int } newtype MyReader a = MyReader (Reader Foo a) deriving (HasReader "foo" Int) via Field "foo" () (MonadReader (Reader Foo))  Converts the  () Foo instance of  (Reader Foo) to a  "foo" Int$ instance by focusing on the field foo in the Foo record.See  for a way to change the tag. capabilityRename the tag.Example: ~newtype MyReader a = MyReader (Reader Int a) deriving (HasReader "foo" Int) via Rename "bar" (MonadReader (Reader Int))  Converts the  "bar" Int instance of  (Reader Int) to a  "foo" Int instance by renaming the tag. Note, that ! itself does not fix a tag, and Rename is redundant in this example.See   below for a common use-case. capabilityCoerce the type in the context m to to.Example: ˜newtype MyInt = MyInt Int newtype MyReader a = MyReader (Reader Int a) deriving (HasReader "a" MyInt) via Coerce MyInt (MonadReader (Reader Int))  Converts the  "a" Int instance of  (Reader Int) to a  "a" MyInt instance using Coercible Int MyInt.   9 9 None-./1;<=?@ACFHMSUVXkqiø6 capabilityDerive HasError" using the functionality from the unliftio package.8 capabilityDerive HasError" using the functionality from the safe-exceptions package.: capabilityDerive 'HasCatch from m,'s 'Control.Monad.Catch.MonadCatch instance.< capabilityDerive C from m's  instance.> capabilityDerive 'HasError from m's  instance.@ capability'Capability to catch exceptions of type e under tag.HasThrow/HasCatchj capabilities at different tags should be independent. In particular, the following program should throw  SomeError and not return (). > example :: > (HasThrow Left SomeError m, HasCatch Right3 SomeError m) > => m () > example = > catch Left > (throw Right SomeError) > _ -> pure ()See H8 for a way to combine multiple exception types into one.A capabilityyFor technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of  HasReader#. Otherwise, you will want to use F. See F for more documentation.B capabilityyFor technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of  HasReader#. Otherwise, you will want to use G. See G for more documentation.C capability'Capability to throw exceptions of type e under tag.HasThrow/HasCatch< capabilities at different tags should be independent. See @.D capabilityyFor technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of  HasReader#. Otherwise, you will want to use E. See E for more documentation.E capability9Throw an exception in the specified exception capability.F capability_Provide a handler for exceptions thrown in the given action in the given exception capability.G capabilityLike FB, but only handle the exception if the provided function returns Œ.H capabilityWrap exceptions inner> originating from the given action according to the accessor t.Example: ÈwrapError @"AppError" @"ComponentError" @(Ctor "ComponentError" "AppError") component component :: HasError "ComponentError" ComponentError m => m () data AppError = ComponentError ComponentError:This function is experimental and subject to change. See  -https://github.com/tweag/capability/issues/46.I capability,Lift one layer in a monad transformer stack.J capabilityWrap the exception e with the constructor ctor to throw an exception of type sum.K capabilityRename the tag.Apply cautiously. See @ newtag e ( oldtag m).L capability,Lift one layer in a monad transformer stack.M capabilityCatch an exception of type sum if its constructor matches ctor.N capabilityRename the tag.dApply cautiously. E.g. the following code produces colliding instances, where exceptions thrown in "Foo"4 cannot be distinguished from exceptions thrown in "Bar" and vice-versa. ÿnewtype Bad a = Bad (IO a) deriving (Functor, Applicative, Monad) deriving ( HasThrow "Foo" m , HasCatch "Foo" m ) via Rename () (MonadUnliftIO SomeError IO) deriving ( HasThrow "Bar" m , HasCatch "Bar" m ) via Rename () (MonadUnliftIO SomeError IO)q capabilityCompose two accessors.r capabilityCompose two accessors.& 6789:;<=>?@ABCDEFGHCDE@ABFGH>?<=:;8967None-.@ACFHSXkq‰k s capabilityReader capabilitybAn instance should fulfill the following laws. At this point these laws are not definitive, see  'https://github.com/haskell/mtl/issues/5.k <*> ask @t = ask @t <**> kask @t *> m = m = m <* ask @t%local @t f (ask @t) = fmap f (ask @t)*local @t f . local @t g = local @t (g . f)local @t f (pure x) = pure xFlocal @t f (m >>= \x -> k x) = local @t f m >>= \x -> local @t f (k x)reader @t f = f <$> ask @tt capabilityyFor technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of s#. Otherwise, you will want to use w. See w for more documentation.u capabilityyFor technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of s#. Otherwise, you will want to use y. See y for more documentation.v capabilityyFor technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of s#. Otherwise, you will want to use z. See z for more documentation.w capabilityask @tag5 retrieves the environment of the reader capability tag.x capability asks @tag retrieves the image by f. of the environment of the reader capability tag.asks @tag f = f <$> ask @tagy capabilitylocal @tag f m runs the monadic action m in a modified environment e' = f e , where e- is the environment of the reader capability tag. Symbolically: return e = ask @tag.z capabilityreader @tag act. lifts a purely environment-dependent action act, to a monadic action in an arbitrary monad m with capability  HasReader.It happens to coincide with asks:  reader = asks.{ capabilityoExecute the given reader action on a sub-component of the current context as defined by the given transformer t.See .:This function is experimental and subject to change. See  -https://github.com/tweag/capability/issues/46. stuvwxyz{None-.@ACFHSXkq­l | capabilityState capabilitybAn instance should fulfill the following laws. At this point these laws are not definitive, see  'https://github.com/haskell/mtl/issues/5.Pget @t >>= \s1 -> get @t >>= \s2 -> pure (s1, s2) = get @t >>= \s -> pure (s, s)$get @t >>= \_ -> put @t s = put @t s"put @t s1 >> put @t s2 = put @t s2'put @t s >> get @t = put @t s >> pure sFstate @t f = get @t >>= \s -> let (a, s') = f s in put @t s' >> pure a} capability¥For technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of 'HasState. Otherwise, you will want to use €. See € for more documentation.~ capability¥For technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of 'HasState. Otherwise, you will want to use . See  for more documentation. capability¥For technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of 'HasState. Otherwise, you will want to use ‚. See ‚ for more documentation.€ capabilityget @tag5 retrieve the current state of the state capability tag. capability put @tag s4 replace the current state of the state capability tag with s.‚ capability state @tag f! lifts a pure state computation f, to a monadic action in an arbitrary monad m with capability HasState.Given the current state s of the state capability tag and  (a, s') = f s, update the state to s' and return a.ƒ capability modify @tag f given the current state s of the state capability tag and s' = f s&, updates the state of the capability tag to s'.„ capabilitySame as ƒ but strict in the new state.… capability gets @tag f retrieves the image, by f/ of the current state of the state capability tag.gets @tag f = f <$> get @tag† capabilitylExecute the given state action on a sub-component of the current state as defined by the given transformer t.Example: ±zoom @"foobar" @"foo" @(Field "foo" "foobar") foo :: HasState "foobar" FooBar m => m () foo :: HasState "foo" Int m => m () data FooBar = FooBar { foo :: Int, bar :: String }:This function is experimental and subject to change. See  -https://github.com/tweag/capability/issues/46. |}~€‚ƒ„…†None-./1;<=?@AFHMSUVXkqŸV ‡ capability*Convert a state monad into a reader monad.7Use this if the monad stack allows catching exceptions.See ‰.‰ capability Convert a pure! state monad into a reader monad.Pure} meaning that the monad stack does not allow catching exceptions. Otherwise, an exception occurring in the action passed to yD could cause the context to remain modified outside of the call to y. E.g. Jlocal @tag (const r') (throw MyException) `catch` \MyException -> ask @tagreturns r' instead of the previous value.Note, that no MonadIO@ instance is provided, as this would allow catching exceptions.See ‡.‹ capabilityDerive s from m's  instance.œ capability,Lift one layer in a monad transformer stack.Ÿ capability!Zoom in on the field at position pos of type v in the environment struct.¿ capabilityZoom in on the record field field of type v in the environment record.À capabilityRename the tag.Á capability,Convert the environment using safe coercion. capabilityCompose two accessors.‡ˆ‰Š‹ŒNoneŸ¥ stuvwxyz{‡ˆ‰Š‹Œstuvwxyz{‹Œ‰Š‡ˆNone-./1;<=?@AFHMSUVXkqÓE  capability<Derive a state monad from a reader over a mutable reference.&Mutable references are available in a Ã. The corresponding  has to match the ÄR of the reference. This constraint makes a stand-alone deriving clause necessary.Example: önewtype MyState m a = MyState (ReaderT (IORef Int) m a) deriving (Functor, Applicative, Monad) deriving via ReaderRef (MonadReader (ReaderT (IORef Int) m)) instance (PrimMonad m, PrimState m ~ PrimState IO) => HasState "foo" Int (MyState m)See  for a specialized version over Å. capability+Derive a state monad from a reader over an Å.Example: žnewtype MyState m a = MyState (ReaderT (IORef Int) m a) deriving (Functor, Applicative, Monad) deriving HasState "foo" Int via ReaderIORef (MonadReader (ReaderT (IORef Int) m))See  for a more generic strategy.‘ capabilityDerive | from m's  instance.Æ capability,Lift one layer in a monad transformer stack.Ç capability!Zoom in on the field at position pos of type v in the state struct.È capabilityZoom in on the record field field of type v in the state record.É capabilityRename the tag.Ê capability&Convert the state using safe coercion.Ë capabilityCompose two accessors.Ž‘’NoneӔ |}~€‚ƒ„…†Ž‘’|}~€‚ƒ„…†‘’ŽNone-./1;<=?@ACFHMSUVXkqö • capabilityWriter capabilitybAn instance should fulfill the following laws. At this point these laws are not definitive, see  'https://github.com/haskell/mtl/issues/5.%listen @t (pure a) = pure (a, mempty)0listen @t (tell @t w) = tell @t w >> pure (w, w)klisten @t (m >>= k) = listen @t m >>= \(a, w1) -> listen @t (k a) >>= \(b, w2) -> pure (b, w1 `mappend` w2)<pass @t (tell @t w >> pure (a, f)) = tell @t (f w) >> pure a&writer @t (a, w) = tell @t w >> pure a– capabilityyFor technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of  HasReader#. Otherwise, you will want to use š. See š for more documentation.— capabilityyFor technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of  HasReader#. Otherwise, you will want to use ›. See › for more documentation.˜ capabilityyFor technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of  HasReader#. Otherwise, you will want to use œ. See œ for more documentation.™ capabilityyFor technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of  HasReader#. Otherwise, you will want to use . See  for more documentation.š capabilitywriter @tag (a, w) lifts a pure writer action (a, w), to a monadic action in an arbitrary monad m with capability  HasWriter.Appends w( to the output of the writer capability tag and returns the value a.› capability tell @tag w appends w( to the output of the writer capability tag.œ capability listen @tag m executes the action m and returns the output of m in the writer capability tag along with result of m. Appends the output of m( to the output of the writer capability tag. capability pass @tag m executes the action m . Assuming m returns (a, f) and appends w( to the output of the writer capability tag.  pass @tag m instead appends w' = f w to the output and returns a.€ capabilityCompose two accessors. “”•–—˜™š›œ •–—˜™š›œ“”None-.1;<=>?@ACFHMUVXkqi¥ capabilityAAccumulate streamed values in forward order in a difference list.§ capability3Accumulate streamed values in a reverse order list.© capabilityStreaming capability.QAn instance does not need to fulfill any additional laws besides the monad laws.ª capabilityyFor technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of  HasReader#. Otherwise, you will want to use «. See « for more documentation.« capability yield @tag a emits a in the stream capability tag.¬ capability,Lift one layer in a monad transformer stack.º capabilityCompose two accessors. ¥Š§š©ª«©ª«§š¥ŠNone /=?@AFSXk’» capability,Lift one layer in a monad transformer stack.Note, that if the • instance is based on HasState&, then it is more efficient to apply < to the underlying state capability. E.g. you should favour Yderiving (HasWriter tag w) via WriterLog (Lift (SomeTrans (MonadState SomeStateMonad)))over Yderiving (HasWriter tag w) via Lift (SomeTrans (WriterLog (MonadState SomeStateMonad)))Ì !"#"$"%"&''(())**++,,--./0123456789:;<=>?@ABCDEFGHIJKLMNOPQQRRSSTUVWXYZ [\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹Œ Ž‘’“”•––——˜˜™™šš›œžŸ ¡¢£€¥Š§š©ª««¬¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕ)capability-0.1.0.0-BN1idYBeIQj65gmiYxSexQCapability.ErrorCapability.AccessorsCapability.ReaderCapability.StateCapability.WriterCapability.StreamCapability.Writer.Discouraged CapabilityHasError wrapErrorControl.Monad.Trans.Class MonadTransHasState MonadStateHasThrow MonadError HasReader MonadReaderControl.Monad.Catch MonadThrowControl.Monad.Except Capability.Reader.Internal.ClasszoomCapability.State.Internal.Class%Capability.Reader.Internal.StrategiesControl.Monad.Reader.Class$Capability.State.Internal.StrategiesControl.Monad.Primitive PrimStateControl.Monad.State.ClassbaseData.Typeable.InternalTypeableGHC.Exception.TypedisplayException fromException toException Exception:.:LiftCtorPosFieldRenameCoerce$fFunctorCoerce$fApplicativeCoerce $fMonadCoerce$fMonadIOCoerce$fPrimMonadCoerce$fFunctorRename$fApplicativeRename $fMonadRename$fMonadIORename$fPrimMonadRename$fFunctorField$fApplicativeField $fMonadField$fMonadIOField$fPrimMonadField $fFunctorPos$fApplicativePos $fMonadPos $fMonadIOPos$fPrimMonadPos $fFunctorCtor$fApplicativeCtor $fMonadCtor $fMonadIOCtor$fPrimMonadCtor $fFunctorLift$fApplicativeLift $fMonadLift $fMonadIOLift$fPrimMonadLift $fFunctor:.:$fApplicative:.: $fMonad:.: $fMonadIO:.:$fPrimMonad:.: MonadUnliftIOSafeExceptions MonadCatchHasCatchcatch_ catchJust_throw_throwcatch catchJust$fHasThrowktageLift$fHasThrowSymbolctoreCtor$fHasThrowknewtageRename$fHasCatchktageLift$fHasCatchSymbolctoreCtor$fHasCatchknewtageRename$fHasCatchktageMonadError$fHasThrowktageMonadError$fHasThrowktageMonadThrow$fHasCatchktageMonadCatch$fHasCatchktageSafeExceptions$fHasThrowktageSafeExceptions$fHasCatchktageMonadUnliftIO$fHasThrowktageMonadUnliftIO$fFunctorMonadError$fApplicativeMonadError$fMonadMonadError$fMonadIOMonadError$fPrimMonadMonadError$fFunctorMonadThrow$fApplicativeMonadThrow$fMonadMonadThrow$fMonadIOMonadThrow$fPrimMonadMonadThrow$fFunctorMonadCatch$fApplicativeMonadCatch$fMonadMonadCatch$fMonadIOMonadCatch$fPrimMonadMonadCatch$fHasThrowMonadCatch$fFunctorSafeExceptions$fApplicativeSafeExceptions$fMonadSafeExceptions$fMonadIOSafeExceptions$fPrimMonadSafeExceptions$fFunctorMonadUnliftIO$fApplicativeMonadUnliftIO$fMonadMonadUnliftIO$fMonadIOMonadUnliftIO$fPrimMonadMonadUnliftIO $fHasCatch:.: $fHasThrow:.:ask_local_reader_askaskslocalreadermagnifyget_put_state_getputstatemodifymodify'gets ReadState ReadStatePure ReaderRef ReaderIORef WriterLog HasWriterwriter_tell_listen_pass_writertelllistenpass$fHasWriterktagwWriterLog$fFunctorWriterLog$fApplicativeWriterLog$fMonadWriterLog$fMonadIOWriterLog$fPrimMonadWriterLog$fHasWriter:.: StreamDList StreamStack HasStreamyield_yield$fHasStreamktagaLift$fHasStreamktagaStream$fHasStreamktagaStreamStack$fHasStreamktagaStreamDList$fFunctorStreamStack$fApplicativeStreamStack$fMonadStreamStack$fMonadIOStreamStack$fPrimMonadStreamStack$fFunctorStreamDList$fApplicativeStreamDList$fMonadStreamDList$fMonadIOStreamDList$fPrimMonadStreamDList$fHasStream:.:$fHasWriterTYPEtagwLift GHC.MaybeJust$fHasReaderktagrLift$fHasReaderNattagvPos$fHasReaderSymboltagvField$fHasReaderknewtagrRename$fHasReaderktagtoCoerce$fHasReader:.:(primitive-0.6.4.0-1mvPxVOk6Q6KOkWCZxqESf PrimMonad/mutable-containers-0.3.4-5pu6AIQhI1E9m5Mq8ThKvcData.Mutable.ClassMCState GHC.IORefIORef$fHasStatektagsLift$fHasStateNattagvPos$fHasStateSymboltagvField$fHasStateknewtagsRename$fHasStatektagtoCoerce $fHasState:.: