Copyright | (c) 2009 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 a class of representable bifunctors.
- data Bifctr f where
- class Bifunctor f => Bifctrable f where
- fixB :: Bifctr f -> BFix f
- fctrB :: Bifctrable f => BFix f -> Bifctr f
Documentation
Functor GADT for polytypic recursive bifunctions.
At the moment it does not rely on a Typeable
instance for constants.
BI :: Bifctr BId | |
BK :: Bifctr (BConst c) | |
BP :: Bifctr BPar | |
(:*!|) :: (Bifunctor f, Bifunctor g) => Bifctr f -> Bifctr g -> Bifctr (f :*| g) | |
(:+!|) :: (Bifunctor f, Bifunctor g) => Bifctr f -> Bifctr g -> Bifctr (f :+| g) | |
(:@!|) :: (Bifunctor f, Bifunctor g) => Bifctr f -> Bifctr g -> Bifctr (f :@| g) |
class Bifunctor f => Bifctrable f where Source
Class of representable bifunctors.
Bifctrable BPar | |
Bifctrable BId | |
Bifctrable (BConst c) | |
(Bifunctor f, Bifctrable f, Bifunctor g, Bifctrable g) => Bifctrable ((:*|) f g) | |
(Bifunctor f, Bifctrable f, Bifunctor g, Bifctrable g) => Bifctrable ((:+|) f g) |
fctrB :: Bifctrable f => BFix f -> Bifctr f Source
The representation of the fixpoint of a representable functor.