pointless-haskell-0.0.9: Pointless Haskell library

Copyright(c) 2008 University of Minho
LicenseBSD3
Maintainerhpacheco@di.uminho.pt
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell98

Generics.Pointless.Observe.RecursionPatterns

Contents

Description

Pointless Haskell: point-free programming with recursion patterns as hylomorphisms

This module redefines recursion patterns with support for GHood observation of intermediate data structures.

Synopsis

Recursion patterns with observation of intermediate data structures

hyloO :: (Mu b, Functor (PF b), FunctorO (PF b)) => Ann b -> (F b c -> c) -> (a -> F b a) -> a -> c Source

Redefinition of hylomorphisms with observation of the intermediate data type.

cataO :: (Mu a, Functor (PF a), FunctorO (PF a)) => Ann a -> (F a b -> b) -> a -> b Source

Redefinition of catamorphisms as observable hylomorphisms.

anaO :: (Mu b, Functor (PF b), FunctorO (PF b)) => Ann b -> (a -> F b a) -> a -> b Source

Redefinition of anamorphisms as observable hylomorphisms.

paraO :: (Mu a, Functor (PF a), FunctorO (PF a), Observable a, Typeable a) => Ann a -> (F a (b, a) -> b) -> a -> b Source

Redefinition of paramorphisms as observable hylomorphisms.

apoO :: (Mu b, Functor (PF b), FunctorO (PF b), Observable b, Typeable b) => Ann b -> (a -> F b (Either a b)) -> a -> b Source

Redefinition of apomorphisms as observable hylomorphisms.

zygoO :: (Mu a, Functor (PF a), FunctorO (PF a), Observable b, Typeable b, F a (a, b) ~ F (Zygo a b) a) => Ann a -> (F a b -> b) -> (F (Zygo a b) b -> b) -> a -> b Source

Redefinition of zygomorphisms as observable hylomorphisms.

accumO :: (Mu a, Functor (PF d), FunctorO (PF d), Observable b, Typeable b) => Ann d -> ((F a a, b) -> F d (a, b)) -> (F (Accum d b) c -> c) -> (a, b) -> c Source

Redefinition of accumulations as observable hylomorphisms.

histoO :: (Mu a, Functor (PF a), FunctorO (PF a), Observable a) => Ann a -> (F a (Histo a c) -> c) -> a -> c Source

Redefinition of histomorphisms as observable hylomorphisms.

futuO :: (Mu b, Functor (PF b), FunctorO (PF b), Observable b) => Ann b -> (a -> F b (Futu b a)) -> a -> b Source

Redefinition of futumorphisms as observable hylomorphisms.

dynaO :: (Mu b, Functor (PF b), FunctorO (PF b), Observable b) => Ann b -> (F b (Histo b c) -> c) -> (a -> F b a) -> a -> c Source

Redefinition of dynamorphisms as observable hylomorphisms.

chronoO :: (Mu c, Functor (PF c), FunctorO (PF c)) => Ann c -> (F c (Histo c b) -> b) -> (a -> F c (Futu c a)) -> a -> b Source

Redefinition of chronomorphisms as observable hylomorphisms.