Possible Duplicate:
Haskell Weird Kinds: Kind of (->) is ?? -> ? -> *
In GHCi (version 7.0.2), if I ask for the kind of the function type, the result has question marks:
Prelude> :kind (->)
(->) :: ?? -> ? -> *
Why does the kind include question marks instead of just 开发者_运维技巧asterisks * -> * -> *
? What do the question marks mean? Why do other types just use asterisks?
Prelude> :kind (,)
(,) :: * -> * -> *
The ?
and ??
kinds refer to GHC extensions, specifically unboxed types. http://hackage.haskell.org/trac/ghc/wiki/IntermediateTypes has a diagram showing relationships between the extended kinds ?
(all possible types), #
(unboxed types), ??
(boxed or normal unboxed types — "least upper bound of #
and *
"), (#)
(unboxed tuples, which can only be used in a small number of contexts). (The standard kind *
refers to normal boxed types.)
精彩评论