Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Basic functors.
Definitions of the type-level equivalents of
const
, id
, and (.
), and a definition of
the lifted function space.
These datatypes are generally useful, but in this
library, they're primarily used as parameters for
the NP
, NS
, POP
, and SOP
types.
We define own variants of Const
,
Identity
and Compose
for
various reasons.
Const
andCompose
become kind polymorphic only inbase-4.9.0.0
(transformers-0.5.0.0
).- Shorter names are convenient, and pattern synonyms aren't (yet) powerful enough, particularly exhaustiveness check doesn't work properly. See https://ghc.haskell.org/trac/ghc/ticket/8779.
Documentation
The constant type functor.
Like Constant
, but kind-polymorphic
in its second argument and with a shorter name.
K a |