Safe Haskell | None |
---|---|
Language | Haskell2010 |
Effectful.Internal.MTL
Contents
Description
Definitions and instances for MTL compatibility.
This module is intended for internal use only, and may change without warning in subsequent releases.
Synopsis
- data Error e (a :: Type -> Type) b where
- ThrowErrorWith :: forall e (a :: Type -> Type) b. (e -> String) -> e -> Error e a b
- CatchError :: forall (a :: Type -> Type) b e. a b -> (CallStack -> e -> a b) -> Error e a b
- data Reader r (a :: Type -> Type) b where
- data State s (a :: Type -> Type) b where
- data Writer w (a :: Type -> Type) b where
Documentation
data Error e (a :: Type -> Type) b where Source #
Provide the ability to handle errors of type e
.
Constructors
ThrowErrorWith :: forall e (a :: Type -> Type) b. (e -> String) -> e -> Error e a b | Since: 2.4.0.0 |
CatchError :: forall (a :: Type -> Type) b e. a b -> (CallStack -> e -> a b) -> Error e a b |
Instances
type DispatchOf (Error e) Source # | |
Defined in Effectful.Internal.MTL |
data Reader r (a :: Type -> Type) b where Source #
Constructors
Ask :: forall r (a :: Type -> Type). Reader r a r | |
Local :: forall r (a :: Type -> Type) b. (r -> r) -> a b -> Reader r a b |
Instances
type DispatchOf (Reader r) Source # | |
Defined in Effectful.Internal.MTL |
data State s (a :: Type -> Type) b where Source #
Provide access to a mutable value of type s
.
Constructors
Get :: forall s (a :: Type -> Type). State s a s | |
Put :: forall s (a :: Type -> Type). s -> State s a () | |
State :: forall s b (a :: Type -> Type). (s -> (b, s)) -> State s a b | |
StateM :: forall s (a :: Type -> Type) b. (s -> a (b, s)) -> State s a b |
Instances
type DispatchOf (State s) Source # | |
Defined in Effectful.Internal.MTL |
data Writer w (a :: Type -> Type) b where Source #
Provide access to a write only value of type w
.
Constructors
Tell :: forall w (a :: Type -> Type). w -> Writer w a () | |
Listen :: forall (a :: Type -> Type) a1 w. a a1 -> Writer w a (a1, w) |
Instances
type DispatchOf (Writer w) Source # | |
Defined in Effectful.Internal.MTL |
Orphan instances
(Show e, Error e :> es, MonadError e (Eff es)) => MonadError e (Eff es) Source # | Instance included for compatibility with existing code. |
(Reader r :> es, MonadReader r (Eff es)) => MonadReader r (Eff es) Source # | Instance included for compatibility with existing code. |
(State s :> es, MonadState s (Eff es)) => MonadState s (Eff es) Source # | Instance included for compatibility with existing code. |
(Monoid w, Writer w :> es, MonadWriter w (Eff es)) => MonadWriter w (Eff es) Source # | Instance included for compatibility with existing code. |