The Eff monad provides the implementation of a computation that performs
an arbitrary set of effects. In Eff es a, es is a type-level list that
contains all the effects that the computation may perform. For example, a
computation that produces an Integer by consuming a String from the
global environment and acting upon a single mutable value of type Bool
would have the following type:
(Reader String :> es, State Bool :> es) => Eff es Integer
Abstracting over the list of effects with (:>):
Allows the computation to be used in functions that may perform other effects.
Allows the effects to be handled in any order.
Instances19MonadBase, MonadBaseControl, Monad, Functor, MonadFix, MonadFail, …
IOE :> es => MonadBase IO (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadInstance included for compatibility with existing code.
Usage of liftIO is preferrable as it's a standard.
IOE :> es => MonadBaseControl IO (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadInstance included for compatibility with existing code.
Usage of withEffToIO is preferrable as it allows specifying the UnliftStrategy on a case-by-case basis and has better error reporting.
Note: the unlifting strategy for liftBaseWith is taken from the IOE context (see unliftStrategy).
Monad (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadFunctor (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadMonadFix (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadFail :> es => MonadFail (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadApplicative (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadNonDet :> es => Alternative (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadNonDet :> es => MonadPlus (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadIOE :> es => MonadIO (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadMonadCatch (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadMonadMask (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadMonadThrow (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadPrim :> es => PrimMonad (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadIOE :> es => MonadUnliftIO (Eff es)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadInstance included for compatibility with existing code.
Usage of withEffToIO is preferrable as it allows specifying the UnliftStrategy on a case-by-case basis and has better error reporting.
Note: the unlifting strategy for withRunInIO is taken from the IOE context (see unliftStrategy).
Semigroup a => Semigroup (Eff es a)Defined in effectful-core-2.3.0.1 · Effectful.Internal.MonadMonoid a => Monoid (Eff es a)Defined in effectful-core-2.3.0.1 · Effectful.Internal.Monadtype PrimState (Eff es) = PrimStateEffDefined in effectful-core-2.3.0.1 · Effectful.Internal.Monadtype StM (Eff es) a = aDefined in effectful-core-2.3.0.1 · Effectful.Internal.Monad