[Haskell-cafe] Can't get Type 3" to work
Amy de Buitléir
amy at nualeargais.ie
Sun Dec 2 19:20:33 UTC 2018
I'm reading "Thinking with Types" by Sandy Maguire, and there's a bit of
code on p. 27 that I don't understand and can't get to work. The "Type
3" seems to have the effect of multiplying by 3.
> :set -XDataKinds
> :set -XTypeOperators
> :kind! (1 + 17) Type 3
(1 + 17) Type 3 :: Nat
= 54
But it doesn't work for me. When I try this, I get...
$ ghci --version
The Glorious Glasgow Haskell Compilation System, version 8.2.2
$ ghci
λ> :set -XDataKinds
λ> :set -XTypeOperators
λ> :kind! (1 + 17) Type 3
<interactive>:1:2: error:
Not in scope: type constructor or class '+'
<interactive>:1:10: error:
Not in scope: type constructor or class 'Type'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20181202/fff45fbf/attachment.html>
More information about the Haskell-Cafe
mailing list