-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Data types as fixpoints -- -- This package allows data types to be seen and manipulated as fixpoints -- of their underlying functors. It is mostly based on Functional -- Programming with Bananas, Lenses, Envelopes and Barbed Wire by -- Erik Meijer, Maarten Fokkinga and Ross Paterson -- (http://citeseer.ist.psu.edu/meijer91functional.html). It makes -- essential use of associated types and related extensions. @package fixpoint @version 0.1.1 module Data.Fixpoint.Algorithms size :: (Fixpoint t, Foldable (Pre t)) => t -> Int module Data.Fixpoint -- | The class of data types representable by fixpoints. class Functor (Pre t) => Fixpoint t where { data family Pre t :: * -> *; } project :: Fixpoint t => t -> Pre t t inject :: Fixpoint t => Pre t t -> t -- | Catamorphism (same as fold) cata :: Fixpoint t => (Pre t s -> s) -> t -> s -- | Catamorphism (same as cata) fold :: Fixpoint t => (Pre t s -> s) -> t -> s -- | Anamorphism (same as unfold) ana :: Fixpoint t => (s -> Pre t s) -> s -> t -- | Anamorphism (same as ana) unfold :: Fixpoint t => (s -> Pre t s) -> s -> t -- | Hylomorphism hylo :: Fixpoint t => (Pre t s -> s) -> (p -> Pre t p) -> p -> s -- | Paramorphism para :: Fixpoint t => (Pre t (t, s) -> s) -> t -> s