category-extras-0.53.3: Various modules and constructs inspired by category theory

Portabilityportable
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Monad.Ideal

Contents

Description

 

Synopsis

Ideal Monads

class Functor m => MonadIdeal m whereSource

Methods

idealize :: m (Either a (m a)) -> m aSource

ideal :: Either a (f a) -> Ideal f aSource

destroyIdeal :: Algebra m a -> Ideal m a -> aSource

Mutual recursion for (co)ideal (co)monad (co)products

newtype Mutual p m n a Source

Constructors

Mutual 

Fields

runMutual :: m (p a (Mutual p n m a))
 

Instances

Ideal Monad Coproduct

type :+ m n = Mutual' Either m nSource