fixpoint-0.1: Data types as fixpointsSource codeContentsIndex
Data.Fixpoint
Synopsis
class Functor (Pre t) => Fixpoint t where
data Pre t :: * -> *
project :: t -> Pre t t
inject :: Pre t t -> t
cata :: Fixpoint t => (Pre t s -> s) -> t -> s
fold :: Fixpoint t => (Pre t s -> s) -> t -> s
ana :: Fixpoint t => (s -> Pre t s) -> s -> t
unfold :: Fixpoint t => (s -> Pre t s) -> s -> t
hylo :: Fixpoint t => (Pre t s -> s) -> (p -> Pre t p) -> p -> s
para :: Fixpoint t => (Pre t (t, s) -> s) -> t -> s
Documentation
class Functor (Pre t) => Fixpoint t whereSource
The class of data types representable by fixpoints.
Associated Types
data Pre t :: * -> *Source
Methods
project :: t -> Pre t tSource
inject :: Pre t t -> tSource
show/hide Instances
Fixpoint ([] a)
cata :: Fixpoint t => (Pre t s -> s) -> t -> sSource
Catamorphism (same as fold)
fold :: Fixpoint t => (Pre t s -> s) -> t -> sSource
Catamorphism (same as cata)
ana :: Fixpoint t => (s -> Pre t s) -> s -> tSource
Anamorphism (same as unfold)
unfold :: Fixpoint t => (s -> Pre t s) -> s -> tSource
Anamorphism (same as ana)
hylo :: Fixpoint t => (Pre t s -> s) -> (p -> Pre t p) -> p -> sSource
Hylomorphism
para :: Fixpoint t => (Pre t (t, s) -> s) -> t -> sSource
Paramorphism
Produced by Haddock version 2.3.0