multirec-0.7.7: Generic programming for families of recursive datatypes

Copyright(c) 2008--2010 Universiteit Utrecht
LicenseBSD3
Maintainergenerics@haskell.org
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Generics.MultiRec.Compos

Contents

Description

The compos operator, inspired by

B. Bringert and A. Ranta A pattern for almost compositional functions ICFP 2006

Synopsis

Compos

compos :: (Fam phi, HFunctor phi (PF phi)) => (forall ix. phi ix -> ix -> ix) -> phi ix -> ix -> ix Source

Normal version.

composM :: (Fam phi, HFunctor phi (PF phi), Monad m) => (forall ix. phi ix -> ix -> m ix) -> phi ix -> ix -> m ix Source

Monadic version of compos.

composA :: (Fam phi, HFunctor phi (PF phi), Applicative a) => (forall ix. phi ix -> ix -> a ix) -> phi ix -> ix -> a ix Source

Applicative version of compos.