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
Song Zhang <vxanica@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 * -> * -> * as expected. Greets, Ertugrul
participants (2)
-
Ertugrul Söylemez -
Song Zhang