category-extras-0.44.1: Various modules and constructs inspired by category theory.

Portabilitynon-portable (rank-2 polymorphism)
MaintainerEdward Kmett <>




Traditional operators, shown here to show how to roll your own


Unfold Sugar

apo :: Functor f => CoAlgM f (Apo f) a -> a -> Fix fSource

g_apo :: Functor f => CoAlg f b -> CoAlgM f (GApo b) a -> a -> Fix fSource

type Apo f a = Either (Fix f) aSource

type ApoT f m a = EitherT (Fix f) m aSource

type GApo b a = Either b aSource

type GApoT b m a = EitherT b m aSource

Distributive Law Combinators

distGApo :: Functor f => CoAlg f b -> Dist (Either b) fSource

distGApoT :: (Functor f, Monad m) => CoAlgM f m b -> Dist m f -> Dist (EitherT b m) fSource

distApoT :: (Functor f, Monad m) => Dist m f -> Dist (ApoT f m) fSource