effin-0.2.0.0: A Typeable-free implementation of extensible effects

Safe HaskellNone
LanguageHaskell2010

Control.Effect.Scope

Documentation

class MemberEffect Scope (Scope t s) l => ScopeEffect t s l

Instances

MemberEffect (ScopeType * -> * -> * -> *) Scope (Scope t s) l => ScopeEffect t s l 

data Scope t s a

Instances

Functor (Scope t s) 
type Is (ScopeType * -> * -> * -> *) Scope f 

data ScopeType s

Constructors

Master 
Slave s 

Instances

type Is (ScopeType * -> * -> * -> *) Scope f 

runScope :: (forall s. Effect (Scope Master s :+ l) a) -> Effect l a

scope :: ScopeEffect t s l => (forall s'. Effect (Scope t s :- (Scope (Slave s) s' :+ l)) a) -> Effect l a

reset :: ScopeEffect t s l => (forall s'. Effect (Scope t s :- (Scope Master s' :+ l)) a) -> Effect l a

data Scoped s

withScoped :: ScopeEffect t s l => Scoped s -> Effect l a -> Effect l a

capture :: ScopeEffect (Slave s) s' l => Scoped s -> Effect l (Scoped s')

escape :: ScopeEffect (Slave s) s' l => Scoped s' -> Effect l (Scoped s)