Data.Type.Kind
Description
Algorithms and operations on type kinds.
Documentation
data Kind
succKind :: Kind -> KindSource
Adds -> *
to the end of a Kind
.
* ==> * -> * * -> * ==> * -> * -> * (* -> *) -> * ==> (* -> *) -> * -> *
recurseKind :: Kind -> KindSource
Transforms from k
to k -> *
.
* ==> * -> * * -> * ==> (* -> *) -> * (* -> *) -> * ==> ((* -> *) -> *) -> *
toParameters :: Kind -> [Kind]Source
Extract the parameters of a Kind
.
Reverse of fromParameters
.
fromParameters :: [Kind] -> KindSource
Combine parameter to form a type constructors Kind
.
Reverse of toParameters
.
kindSignature :: Kind -> StringSource
Get a kind signature from a Kind
.
readKindName :: String -> KindSource
Read the bastard string representation to Kind
.
Generates all possible Kind
s given the maximum StarK
s allowed.
1:1 1 * 2:1 2 *->* 3:2 4 *->*->* (*->*)->* 4:5 9 *->*->*->* (*->*)->*->* *->(*->*)->* (*->*->*)->* ((*->*)->*)->* 5:14 23 *->*->*->*->* (*->*)->(*->*)->* (*->*)->*->*->* *->(*->*)->*->* *->*->(*->*)->* (*->*->*)->*->* ((*->*)->*)->*->* *->(*->*->*)->* *->((*->*)->*)->* (*->*->*->*)->* ((*->*)->*->*)->* (*->(*->*)->*)->* ((*->*->*)->*)->* (((*->*)->*)->*)->*
The series continues: 1,1,2,5,14,42,132,429,1430,4862,...