pointless-haskell-0.0.4: Pointless Haskell library

Portabilitynon-portable
Stabilityexperimental
Maintainerhpacheco@di.uminho.pt

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)) => b -> (F b c -> c) -> (a -> F b a) -> a -> cSource

Redefinition of hylomorphisms with observation of the intermediate data type.

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

Redefinition of catamorphisms as observable hylomorphisms.

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

Redefinition of anamorphisms as observable hylomorphisms.

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

Redefinition of paramorphisms as observable hylomorphisms.

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

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) => a -> (F a b -> b) -> (F (Zygo a b) b -> b) -> a -> bSource

Redefinition of zygomorphisms as observable hylomorphisms.

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

Redefinition of accumulations as observable hylomorphisms.

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

Redefinition of histomorphisms as observable hylomorphisms.

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

Redefinition of futumorphisms as observable hylomorphisms.

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

Redefinition of dynamorphisms as observable hylomorphisms.

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

Redefinition of chronomorphisms as observable hylomorphisms.