Copyright | (c) 2011 University of Minho |
---|---|
License | BSD3 |
Maintainer | hpacheco@di.uminho.pt |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell98 |
Pointless Haskell: point-free programming with recursion patterns as hylomorphisms
This module defines polymorphic data types as fixed points of higher-order functor.
- type (:~>) s v = forall a. s a -> v a
- newtype Functor f => HId f a = IdH {
- unIdH :: f a
- newtype HConst c f a = ConsH {
- unConsH :: c
- newtype HParam f a = HPar {
- unParH :: a
- newtype Functor g => HFun g f a = HFun {
- unFunH :: g a
- data (g :+~: h) f a
- data (g :*~: h) f a = ProdH (g f a) (h f a)
- data (g :@~: h) f a = CompH {
- unCompH :: g (h f a)
- newtype HFix f a = HInn {}
- data AnnH f
- type family HRep g f :: * -> *
- type family App f g :: (* -> *) -> * -> *
- type family HF t :: (* -> *) -> * -> *
- type H t a = HRep (HF t) a
- class Hu t where
- class FMonoid f where
- class HFoldable f where
Documentation
Higher-order functors
Constant higher-order functor
Parameter higher-order functor
The fixpoint of an higher-order functor is a regular functor
Annotations of higher-order functors, only to provide type-level information to the compiler
Application of higher-order functors to a regular functor
Functor composition as the fixpoint of an higher-order functor (using the fixpoint of the first functor)
User-defined polymorphic types as fixed points of higher-order functors
Foldable higher-order functors
Polymorphic monoid class