Portability | non-portable |
---|---|

Stability | experimental |

Maintainer | hpacheco@di.uminho.pt |

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

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

- hyloO :: (Mu b, Functor (PF b), FunctorO (PF b)) => b -> (F b c -> c) -> (a -> F b a) -> a -> c
- cataO :: (Mu a, Functor (PF a), FunctorO (PF a)) => a -> (F a b -> b) -> a -> b
- anaO :: (Mu b, Functor (PF b), FunctorO (PF b)) => b -> (a -> F b a) -> a -> b
- paraO :: (Mu a, Functor (PF a), FunctorO (PF a), Observable a, Typeable a) => a -> (F a (b, a) -> b) -> a -> b
- apoO :: (Mu b, Functor (PF b), FunctorO (PF b), Observable b, Typeable b) => b -> (a -> F b (Either a b)) -> a -> b
- 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 -> b
- 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) -> c
- histoO :: (Mu a, Functor (PF a), FunctorO (PF a), Observable a) => a -> (F a (Histo a c) -> c) -> a -> c
- futuO :: (Mu b, Functor (PF b), FunctorO (PF b), Observable b) => b -> (a -> F b (Futu b a)) -> a -> b
- dynaO :: (Mu b, Functor (PF b), FunctorO (PF b), Observable b) => b -> (F b (Histo b c) -> c) -> (a -> F b a) -> a -> c
- chronoO :: (Mu c, Functor (PF c), FunctorO (PF c)) => c -> (F c (Histo c b) -> b) -> (a -> F c (Futu c a)) -> a -> b

# 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.