Hoogle Search

Within LTS Haskell 24.51 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. newtype ReaderT r (m :: Type -> Type) a

    can-i-haz Control.Monad.Reader.Has

    The reader monad transformer, which adds a read-only environment to the given monad. The return function ignores the environment, while m >>= k passes the inherited environment to both subcomputations:

  2. ReaderT :: (r -> m a) -> ReaderT r (m :: Type -> Type) a

    can-i-haz Control.Monad.Reader.Has

    No documentation available.

  3. module Capability.Reader

    Defines a capability type class for a reader effect. A reader provides an environment, say an initialization context or a configuration. The environment held in the reader effect can be changed (with local) within the scope of a sub-computation. Contrary to the Capability.State, such a change is local, and does not persist when the local call ends.

  4. newtype ReadState (m :: Type -> Type) a

    capability Capability.Reader

    Convert a state monad into a reader monad. Use this if the monad stack allows catching exceptions. See ReadStatePure.

  5. ReadState :: m a -> ReadState (m :: Type -> Type) a

    capability Capability.Reader

    No documentation available.

  6. newtype ReadStatePure (m :: Type -> Type) a

    capability Capability.Reader

    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 local could cause the context to remain modified outside of the call to local. E.g.

    local @tag (const r') (throw MyException)
    `catch` \MyException -> ask @tag
    
    returns r' instead of the previous value. Note, that no MonadIO instance is provided, as this would allow catching exceptions. See ReadState.

  7. ReadStatePure :: m a -> ReadStatePure (m :: Type -> Type) a

    capability Capability.Reader

    No documentation available.

  8. newtype ReadState (m :: Type -> Type) a

    capability Capability.Source

    Convert a state monad into a reader monad. Use this if the monad stack allows catching exceptions. See ReadStatePure.

  9. ReadState :: m a -> ReadState (m :: Type -> Type) a

    capability Capability.Source

    No documentation available.

  10. newtype ReadStatePure (m :: Type -> Type) a

    capability Capability.Source

    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 local could cause the context to remain modified outside of the call to local. E.g.

    local @tag (const r') (throw MyException)
    `catch` \MyException -> ask @tag
    
    returns r' instead of the previous value. Note, that no MonadIO instance is provided, as this would allow catching exceptions. See ReadState.

Page 412 of many | Previous | Next