Safe Haskell | Trustworthy |
---|---|

Language | Haskell2010 |

- newtype Mortal f g a = Mortal {}
- mortal :: (forall x. f x -> EitherT a m (x, Mortal f m a)) -> Mortal f m a
- mortal_ :: Object f (EitherT () g) -> Mortal f g ()
- runMortal :: Mortal f m a -> f x -> EitherT a m (x, Mortal f m a)
- immortal :: Monad m => Object f m -> Mortal f m x
- apprise :: (Witherable t, Monad m, Applicative m) => f a -> StateT (t (Mortal f m r)) m ([a], [r])
- apprises :: (Witherable t, Monad m, Applicative m, Monoid r) => f a -> (a -> r) -> (b -> r) -> StateT (t (Mortal f m b)) m r
- apprises' :: (Witherable t, Monad m, Applicative m, Monoid r) => f a -> (a -> r) -> StateT (t (Mortal f m b)) m r
- apprises_ :: (Witherable t, Monad m, Applicative m, Monoid r) => f a -> (b -> r) -> StateT (t (Mortal f m b)) m r
- gatherFst :: Monoid r => (a -> r) -> ((a -> r) -> (b -> r) -> k) -> k
- gatherSnd :: Monoid r => (b -> r) -> ((a -> r) -> (b -> r) -> k) -> k
- buildSingle :: Functor f => ((a -> Endo [a]) -> f (Endo [a])) -> f [a]
- buildBoth :: Functor f => ((a -> (Endo [a], Endo [b])) -> (b -> (Endo [a], Endo [b])) -> f (Endo [a], Endo [b])) -> f ([a], [b])

# Documentation

Object with a final result.

Object f g ≡ Mortal f g Void

mortal :: (forall x. f x -> EitherT a m (x, Mortal f m a)) -> Mortal f m a Source

Construct a mortal in a `Object`

construction manner.

mortal_ :: Object f (EitherT () g) -> Mortal f g () Source

Restricted `Mortal`

constuctor which can be applied to `transit`

, `fromFoldable`

without ambiguousness.

immortal :: Monad m => Object f m -> Mortal f m x Source

Turn an immortal into a mortal with eternal life.

apprise :: (Witherable t, Monad m, Applicative m) => f a -> StateT (t (Mortal f m r)) m ([a], [r]) Source

Send a message to mortals in a container.

apprises :: (Witherable t, Monad m, Applicative m, Monoid r) => f a -> (a -> r) -> (b -> r) -> StateT (t (Mortal f m b)) m r Source

Send a message to mortals in a container.

apprises' :: (Witherable t, Monad m, Applicative m, Monoid r) => f a -> (a -> r) -> StateT (t (Mortal f m b)) m r Source

Like apprises, but ignores the final results.

apprises_ :: (Witherable t, Monad m, Applicative m, Monoid r) => f a -> (b -> r) -> StateT (t (Mortal f m b)) m r Source

Like apprises, but ignores the result.

# Combinators

buildSingle :: Functor f => ((a -> Endo [a]) -> f (Endo [a])) -> f [a] Source