has-transformers-0.1.0.4: This library 'Has' transformers
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Monad.Trans.Has

Synopsis
  • class Has (t :: (* -> *) -> * -> *) m where

Documentation

class Has (t :: (* -> *) -> * -> *) m where Source #

The transformer stack m contains the transformer t.

Explicitly, m = t1 (t2 (t3 ... (tN m)...)), and t is one of these t1, t2, ...s.

Methods

liftH :: (forall n. Monad n => t n a) -> m a Source #

Insert an action of this transformer into an arbitrary position in the stack.

This will apply lift as many times as necessary to insert the action. The higher-rank type involving forall n basically says: "The action to lift must only use the structure of the transformer, not of a specific monad, and is thus definable for any monad n".

Instances

Instances details
(Monad m, MonadTrans t1, Has t m) => Has t (t1 m) Source #

If the target transformer t is under a different layer t1, lift once and recurse.

Instance details

Defined in Control.Monad.Trans.Has

Methods

liftH :: (forall (n :: Type -> Type). Monad n => t n a) -> t1 m a Source #

Monad m => Has t (t m) Source #

If the transformer is outermost, the action can be inserted as-is.

Instance details

Defined in Control.Monad.Trans.Has

Methods

liftH :: (forall (n :: Type -> Type). Monad n => t n a) -> t m a Source #