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

Portabilitynon-portable (rank-2 polymorphism)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Functor.HigherOrder

Description

Neil Ghani and Particia Johann''s higher order functors from http://crab.rutgers.edu/~pjohann/tlca07-rev.pdf

Documentation

class HFunctor f whereSource

Methods

ffmap :: Functor g => (a -> b) -> f g a -> f g bSource

hfmap :: (g :~> h) -> f g :~> f hSource

class HFunctor m => HPointed m whereSource

Methods

hreturn :: Functor f => f a -> m f aSource

class HFunctor w => HCopointed w whereSource

Methods

hextract :: Functor f => w f a -> f aSource

type HAlgebra f g = f g :~> gSource

type HCoalgebra f g = g :~> f gSource

newtype FixH f a Source

Constructors

InH 

Fields

outH :: f (FixH f) a
 

newtype LowerH h f a Source

Constructors

LowerH 

Fields

liftH :: h f a
 

Instances

(HFunctor h, Functor f) => Functor (LowerH h f) 
(HCopointed h, Copointed f) => Copointed (LowerH h f) 
(HPointed h, Pointed f) => Pointed (LowerH h f)