Safe Haskell | None |
---|---|
Language | Haskell2010 |
Higher-order (and poly-kinded) implementation of Data Types à la Carte [1]
[1] W. Swierstra. Data Types à la Carte. Journal of Functional Programming, 18(4):423-436, 2008, http://dx.doi.org/10.1017/S0956796808006758.
Documentation
data (f :+: g) a b infixr 9 Source
Coproducts
(:<:) k k1 f h => (:<:) k k f ((:+:) k k g h) Source | |
(:<:) k k f ((:+:) k k f g) Source | |
(HFunctor k k1 h1, HFunctor k k1 h2) => HFunctor k k ((:+:) (k -> *) k h1 h2) Source | |
(Interp i1 m, Interp i2 m) => Interp ((:+:) (* -> *) * i1 i2) m Source | |
(Functor (f a), Functor (g a)) => Functor ((:+:) k * f g a) Source |
A constraint f
expresses that the signature :<:
gf
is subsumed by
g
, i.e. f
can be used to construct elements in g
.