in-other-words-0.1.1.0: A higher-order effect system where the sky's the limit
Safe HaskellNone
LanguageHaskell2010

Control.Effect.Type.Unravel

Synopsis

Documentation

data Unravel p :: Effect where Source #

A primitive effect which allows you to break a computation into layers. This is the primitive effect underlying Intercept and InterceptCont.

Note: ThreadsEff instances are not allowed to assume that p is a functor.

Unravel is typically used as a primitive effect. If you define a Carrier that relies on a novel non-trivial monad transformer t, then you need to make a ThreadsEff t (Unravel p) instance (if possible).

The following threading constraints accept Unravel:

Constructors

Unravel :: p a -> (m a -> a) -> m a -> Unravel p m a 

Instances

Instances details
ThreadsEff ListT (Unravel p) Source # 
Instance details

Defined in Control.Monad.Trans.List.Church

Methods

threadEff :: Monad m => (forall x. Unravel p m x -> m x) -> Unravel p (ListT m) a -> ListT m a Source #

(FirstOrder e, Carrier m, Threaders '[SteppedThreads] m p) => PrimHandler InterceptH (Unravel (InterceptB e)) (SteppedC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Intercept

ThreadsEff (ExceptT e) (Unravel p) Source # 
Instance details

Defined in Control.Effect.Type.Unravel

Methods

threadEff :: Monad m => (forall x. Unravel p m x -> m x) -> Unravel p (ExceptT e m) a -> ExceptT e m a Source #

ThreadsEff (ReaderT i) (Unravel p) Source # 
Instance details

Defined in Control.Effect.Type.Unravel

Methods

threadEff :: Monad m => (forall x. Unravel p m x -> m x) -> Unravel p (ReaderT i m) a -> ReaderT i m a Source #

ThreadsEff (FreeT f) (Unravel p) Source # 
Instance details

Defined in Control.Monad.Trans.Free.Church.Alternate

Methods

threadEff :: Monad m => (forall x. Unravel p m x -> m x) -> Unravel p (FreeT f m) a -> FreeT f m a Source #