| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Control.Effect.Fix
Synopsis
- newtype Fix m a where
- module Control.Monad.Fix
- fixToFinal :: (Carrier m, MonadFix m) => FixToFinalC m a -> m a
- threadFixViaClass :: Monad m => (RepresentationalT t, forall b. MonadFix b => MonadFix (t b)) => (forall x. Fix m x -> m x) -> Fix (t m) a -> t m a
- type FixToFinalC = InterpretPrimC FixToFinalH Fix
Effects
newtype Fix m a where Source #
An effect corresponding to the MonadFix type class.
Effly's MonadFix instance is based
on this effect; by having access to Fix, you're able to
use recursive do notation inside of effect handlers.
Fix 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 instance (if possible).
ThreadsEff t FixthreadFixViaClass can help you with that.
The following threading constraints accept Fix:
Instances
| ThreadsEff (ExceptT e) Fix Source # | |
| Monoid s => ThreadsEff (WriterT s) Fix Source # | |
| ThreadsEff (StateT s) Fix Source # | |
| ThreadsEff (ReaderT i) Fix Source # | |
| ThreadsEff (StateT s) Fix Source # | |
| Monoid s => ThreadsEff (WriterT s) Fix Source # | |
| ThreadsEff (WriterT s) Fix Source # | |
| (Reifies s (ReifiedEffAlgebra Fix m), Monad m) => MonadFix (ViaAlg s Fix m) Source # | |
module Control.Monad.Fix
Interpretations
fixToFinal :: (Carrier m, MonadFix m) => FixToFinalC m a -> m a Source #
Threading utilities
threadFixViaClass :: Monad m => (RepresentationalT t, forall b. MonadFix b => MonadFix (t b)) => (forall x. Fix m x -> m x) -> Fix (t m) a -> t m a Source #
A valid definition of threadEff for a instance,
given that ThreadsEff t Fixt lifts MonadFix.
Carriers
type FixToFinalC = InterpretPrimC FixToFinalH Fix Source #