[Haskell-beginners] about kind of (->)
es at ertes.de
Sat Jun 16 16:43:10 CEST 2012
Song Zhang <vxanica at gmail.com> wrote:
> a function has also a kind. According to haskell report 2010 4.1.2 it
> is * -> * -> *, which is easy to understand. However in ghci I type :k
> (->). the output is ?? -> ? -> *. I want to know what do ?? and ?
> mean. Thanks
This has to do with primitive types like Int#. It basically says that
the input type can be a primitive type, and if it is, then the output
type must also be primitive.
In fact since GHC 7.4 (or perhaps earlier) the kind is
* -> * -> *
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: not available
More information about the Beginners