yael-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Yael.Eff.Builder

Contents

Synopsis

Documentation

runEffTWith :: EffStack f => Builder f m -> EffT (EffList (ToEffList f)) m a -> m a Source #

Run an effectful computation using a set of effect handlers that are implemented in terms of each other.

wrapping :: (f m -> g m -> g m) -> (f m -> g m) -> f m -> g m infixr 9 Source #

Helper datatypes and classes in case you want to write EffStack instances by hand (but hint: you shouldn't)

data EffList fs m where Source #

Constructors

EffNil :: EffList '[] m 
EffCons :: f m -> EffList fs m -> EffList (f ': fs) m 
Instances
Project (EffList fs) f => Project (EffList (g ': fs)) f Source # 
Instance details

Defined in Yael.Eff.Builder

Methods

prj :: Lens' (EffList (g ': fs) m) (f m) Source #

Project (EffList (f ': fs)) f Source # 
Instance details

Defined in Yael.Eff.Builder

Methods

prj :: Lens' (EffList (f ': fs) m) (f m) Source #

class EffStack f where Source #

Minimal complete definition

Nothing

Associated Types

type ToEffList f :: [(* -> *) -> *] Source #

Methods

build :: Builder f m -> EffList (ToEffList f) m Source #

build :: (GTo (Rep (f (EffectIdentity m))) (Rep (f EffectProxy)) m, GApply (Rep (Builder f m)) (Rep (f (EffectIdentity m))) (GToEffList (Rep (f EffectProxy))) m, Generic (f (EffectIdentity m)), Generic (Builder f m), ToEffList f ~ GToEffList (Rep (f EffectProxy))) => Builder f m -> EffList (ToEffList f) m Source #

toEffList :: f (EffectIdentity m) -> EffList (ToEffList f) m Source #

toEffList :: (Generic (f (EffectIdentity m)), GTo (Rep (f (EffectIdentity m))) (Rep (f EffectProxy)) m, ToEffList f ~ GToEffList (Rep (f EffectProxy))) => f (EffectIdentity m) -> EffList (ToEffList f) m Source #

data EffectBuilder s (m :: * -> *) Source #

type family Effect f t where ... Source #

Equations

Effect (EffectIdentity m) t = t m 
Effect (EffectBuilder s m) t = EffList (ToEffList s) m -> t m 
Effect EffectProxy t = Proxy t