resumable-exceptions-0.0.0.20100920: A monad transformer for resumable exceptions

Portabilitynon-portable (GHC extensions)
Stabilityexperimental
Maintainernicolas.frisby@gmail.com

Control.Monad.Resumable.Scoped

Description

A class with an associated type for converting the phantom scope type of the ResumableT transformer.

Synopsis

Documentation

data Static Source

Token type for static scoping.

Constructors

Static 

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 

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

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)