resumable-exceptions-0.0.0.20100313: A monad transformer for resumable exceptionsSource codeContentsIndex
Control.Monad.Resumable.Scoped
Portabilitynon-portable (GHC extensions)
Stabilityexperimental
Maintainernicolas.frisby@gmail.com
Description
A class with an associated type for converting the phantom scope type of the ResumableT transformer.
Synopsis
data Static = Static
data Dynamic = Dynamic
asStatic :: ResumableT Static req res m a -> ResumableT Static req res m a
asDynamic :: ResumableT Dynamic req res m a -> ResumableT Dynamic req res m a
statically :: Scoped Static m => (ScopedAs Static m a -> ScopedAs Static m b) -> m a -> m b
dynamically :: Scoped Dynamic m => (ScopedAs Dynamic m a -> ScopedAs Dynamic m b) -> m a -> m b
class Scoped scope m where
type ScopedAs scope m :: * -> *
scoped :: scope -> (ScopedAs scope m a -> ScopedAs scope m b) -> m a -> m b
Documentation
data Static Source
Token type for static scoping.
Constructors
Static
show/hide Instances
(Monoid w, MonadReader r m, MonadState s m, MonadWriter w m) => MonadRWS r w s (ResumableT Static req res m)
Monad m => MonadResumable req res (ResumableT Static req res m)
MonadReader r m => MonadReader r (ResumableT Static req res m)
MonadError e m => MonadError e (ResumableT Static req res m)
data Dynamic Source
Token type for dynamic scoping.
Constructors
Dynamic
show/hide Instances
(Monoid w, MonadReader r m, MonadState s m, MonadWriter w m) => MonadRWS r w s (ResumableT Dynamic req res m)
Monad m => MonadResumable req res (ResumableT Dynamic req res m)
MonadReader r m => MonadReader r (ResumableT Dynamic req res m)
MonadError e m => MonadError e (ResumableT Dynamic req res m)
asStatic :: ResumableT Static req res m a -> ResumableT Static req res m aSource
Ascribes the Static scoping token to a ResumableT transformer.
asDynamic :: ResumableT Dynamic req res m a -> ResumableT Dynamic req res m aSource
Ascribes the Dynamic scoping token to a ResumableT transformer.
statically :: Scoped Static m => (ScopedAs Static m a -> ScopedAs Static m b) -> m a -> m bSource
Ascribes the Static scoping token to a monad transformer stack.
dynamically :: Scoped Dynamic m => (ScopedAs Dynamic m a -> ScopedAs Dynamic m b) -> m a -> m bSource
Ascribes the Dynamic scoping token to a monad transformer stack.
class Scoped scope m whereSource
Type class with an associated type for setting the scope phantom of the ResumableT transformer.
Associated Types
type ScopedAs scope m :: * -> *Source
Methods
scoped :: scope -> (ScopedAs scope m a -> ScopedAs scope m b) -> m a -> m bSource
show/hide Instances
Scoped scope m => Scoped scope (ListT m)
Scoped scope m => Scoped scope (WriterT w m)
Scoped scope m => Scoped scope (StateT s m)
Scoped scope m => Scoped scope (ReaderT r m)
Scoped scope m => Scoped scope (ErrorT e m)
Scoped scope m => Scoped scope (ContT r m)
Scoped scope m => Scoped scope (RWST r w s m)
Scoped scope (ResumableT scope' req res m)
Produced by Haddock version 2.6.0