Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Sum and product functors, with the usual instances. You can in principle use these to extend existing expressions, for example
type ExtendedExpression = Mu (Expr :+: Custom)
This module uses the TypeOperators language extension for convenience.
Documentation
data (f :+: g) a infixl 6 Source #
Sum of two functors
(Functor f, Functor g) => Functor ((:+:) f g) Source # | |
(Foldable f, Foldable g) => Foldable ((:+:) f g) Source # | |
(Traversable f, Traversable g) => Traversable ((:+:) f g) Source # | |
(ShowF f, ShowF g) => ShowF ((:+:) f g) Source # | |
(OrdF f, OrdF g) => OrdF ((:+:) f g) Source # | |
(EqF f, EqF g) => EqF ((:+:) f g) Source # | |
(Eq (f a), Eq (g a)) => Eq ((:+:) f g a) Source # | |
(Ord (f a), Ord (g a)) => Ord ((:+:) f g a) Source # | |
(Show (f a), Show (g a)) => Show ((:+:) f g a) Source # | |
data (f :*: g) a infixl 7 Source #
Product of two functors
(f a) :*: (g a) infixl 7 |
(Functor f, Functor g) => Functor ((:*:) f g) Source # | |
(Foldable f, Foldable g) => Foldable ((:*:) f g) Source # | |
(Traversable f, Traversable g) => Traversable ((:*:) f g) Source # | |
(ShowF f, ShowF g) => ShowF ((:*:) f g) Source # | |
(OrdF f, OrdF g) => OrdF ((:*:) f g) Source # | |
(EqF f, EqF g) => EqF ((:*:) f g) Source # | |
(Eq (f a), Eq (g a)) => Eq ((:*:) f g a) Source # | |
(Ord (f a), Ord (g a)) => Ord ((:*:) f g a) Source # | |
(Show (f a), Show (g a)) => Show ((:*:) f g a) Source # | |