Stability | experimental |
---|---|
Maintainer | byorgey@cis.upenn.edu |
Safe Haskell | None |
Types used for expressing generic structures when enumerating species.
- data Void a
- data Unit a = Unit
- newtype Const x a = Const x
- newtype Id a = Id a
- data (f :+: g) a
- data (f :*: g) a = (f a) :*: (g a)
- data (f :.: g) a = Comp {
- unComp :: f (g a)
- newtype Cycle a = Cycle {
- getCycle :: [a]
- newtype Set a = Set {
- getSet :: [a]
- data Star a
- data Mu f a = Mu {}
- type family Interp f self :: * -> *
Structure functors
Functors used in building up structures for species generation. Many of these functors are already defined elsewhere, in other packages; but to avoid a plethora of imports, inconsistent naming/instance schemes, etc., we just redefine them here.
The (constantly) void functor.
The (constantly) unit functor.
The constant functor.
Const x |
The identity functor.
Id a |
Functor coproduct.
Functor product.
(f a) :*: (g a) |
Functor composition.
Cycle structure. A value of type
is implemented as
Cycle
a[a]
, but thought of as a directed cycle.
Set structure. A value of type
is implemented as Set
a[a]
,
but thought of as an unordered set.