functor-friends-0.1.0.0: Friendly helpers for your recursion schemes.

Safe HaskellSafe
LanguageHaskell2010

Data.Functor.Decomposed

Synopsis

Documentation

class Decomposed d where Source #

A type class for types d :: (* -> *) -> * -> * that represent compositions of functors. For a functor f :: * -> *, d f t should look like some functor applied to the type f t, and fmap1 is just fmap for that functor.

Minimal complete definition

fmap1

Methods

fmap1 :: (f t -> g t) -> d f t -> d g t Source #

Instances

Decomposed HoleF Source # 

Methods

fmap1 :: (f t -> g t) -> HoleF f t -> HoleF g t Source #

Decomposed (AnnotatedF a) Source # 

Methods

fmap1 :: (f t -> g t) -> AnnotatedF a f t -> AnnotatedF a g t Source #

natmap :: (Functor f, Functor g) => (forall t. f t -> g t) -> Fix f -> Fix g Source #

Given a natural transformation between functors, produce a function between the fixpoints of those functors.