Copyright | (c) Michael Szvetits 2020 |
---|---|
License | BSD3 (see the file LICENSE) |
Maintainer | typedbyte@qualified.name |
Stability | stable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
newtype Via (eff :: Effect) (t :: Transformer) m a Source #
This type indicates that an effect (i.e., a type class) eff
is handled by
a specific monad transformer t
. The type is a simple wrapper around the
monad transformer itself. The whole purpose of this type is to guide the type
system to pick the instance of type class eff
given by the type t
, and
to delegate all other effects that are not eff
to their handlers which are
located somewhere further down the monad transformer stack.
Instances
Control (RWS' tag r w s) t m => RWS' (tag :: k) r w s (Via eff t m) Source # | |
Defined in Control.Effect.RWS | |
Handle (RWS' tag r w s) t m => RWS' (tag :: k) r w s (Via (RWS' tag r w s) t m) Source # | |
Defined in Control.Effect.RWS ask' :: Via (RWS' tag r w s) t m r Source # local' :: (r -> r) -> Via (RWS' tag r w s) t m a -> Via (RWS' tag r w s) t m a Source # tell' :: w -> Via (RWS' tag r w s) t m () Source # listen' :: Via (RWS' tag r w s) t m a -> Via (RWS' tag r w s) t m (w, a) Source # censor' :: (w -> w) -> Via (RWS' tag r w s) t m a -> Via (RWS' tag r w s) t m a Source # | |
Lift (Map' tag k2 v) t m => Map' (tag :: k1) k2 v (Via eff t m) Source # | |
Handle (Map' tag k2 v) t m => Map' (tag :: k1) k2 v (Via (Map' tag k2 v) t m) Source # | |
Control (Error' tag e) t m => Error' (tag :: k) e (Via eff t m) Source # | |
Defined in Control.Effect.Error throwError' :: e -> Via eff t m a Source # catchError' :: Via eff t m a -> (e -> Via eff t m a) -> Via eff t m a Source # | |
Handle (Error' tag e) t m => Error' (tag :: k) e (Via (Error' tag e) t m) Source # | |
Defined in Control.Effect.Error | |
Control (Reader' tag r) t m => Reader' (tag :: k) r (Via eff t m) Source # | |
Handle (Reader' tag r) t m => Reader' (tag :: k) r (Via (Reader' tag r) t m) Source # | |
Lift (State' tag s) t m => State' (tag :: k) s (Via eff t m) Source # | |
Handle (State' tag s) t m => State' (tag :: k) s (Via (State' tag s) t m) Source # | |
Control (Writer' tag w) t m => Writer' (tag :: k) w (Via eff t m) Source # | |
Handle (Writer' tag w) t m => Writer' (tag :: k) w (Via (Writer' tag w) t m) Source # | |
Handle (Cont' tag) t m => Cont' (tag :: k) (Via (Cont' tag) t m) Source # | |
Control (Cont' tag) t m => Cont' (tag :: k) (Via eff t m) Source # | |
Control (Resource' tag) t m => Resource' (tag :: k) (Via eff t m) Source # | |
Handle (Resource' tag) t m => Resource' (tag :: k) (Via (Resource' tag) t m) Source # | |
Defined in Control.Effect.Resource bracket' :: Via (Resource' tag) t m a -> (a -> Via (Resource' tag) t m c) -> (a -> Via (Resource' tag) t m b) -> Via (Resource' tag) t m b Source # bracketOnError' :: Via (Resource' tag) t m a -> (a -> Via (Resource' tag) t m c) -> (a -> Via (Resource' tag) t m b) -> Via (Resource' tag) t m b Source # | |
(Monad (t m), MonadBase b m, MonadTrans t) => MonadBase b (Via eff t m) Source # | |
Defined in Control.Effect.Machinery.Via | |
(Monad (t m), MonadBaseControl b m, MonadTransControl t) => MonadBaseControl b (Via eff t m) Source # | |
Lift (Embed n) t m => Embed n (Via eff t m) Source # | |
Defined in Control.Effect.Embed | |
Handle (Embed n) t m => Embed n (Via (Embed n) t m) Source # | |
MonadTrans t => MonadTrans (Via eff t) Source # | |
Defined in Control.Effect.Machinery.Via | |
MonadTransControl t => MonadTransControl (Via eff t) Source # | |
Monad (t m) => Monad (Via eff t m) Source # | |
Functor (t m) => Functor (Via eff t m) Source # | |
Applicative (t m) => Applicative (Via eff t m) Source # | |
Defined in Control.Effect.Machinery.Via | |
MonadIO (t m) => MonadIO (Via eff t m) Source # | |
Defined in Control.Effect.Machinery.Via | |
type StT (Via eff t) a Source # | |
Defined in Control.Effect.Machinery.Via | |
type StM (Via eff t m) a Source # | |
Defined in Control.Effect.Machinery.Via |
This type is used as tag for all untagged effects. In order words, every
effect is tagged, even untagged ones, but all the untagged ones simply have
the same tag G
(short for "Global", because you can view tags as some
kind of namespace mechanism, and all untagged effects live in the same
global namespace).
If you don't want to use tagged effects (i.e., you write effect type classes without a tag type parameter), you can ignore this type completely.