Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

- newtype Fix m a where
- 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

# 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 `Fix`

`threadFixViaClass`

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 # | |

# 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 `Fix`

`t`

lifts `MonadFix`

.