<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>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.</p>
<p>> :set -XDataKinds<br />> :set -XTypeOperators<br />> :kind! (1 + 17) Type 3</p>
<p>(1 + 17) Type 3 :: Nat<br />= 54</p>
<p>But it doesn't work for me. When I try this, I get...</p>
<p>$ ghci --version<br />The Glorious Glasgow Haskell Compilation System, version 8.2.2</p>
<p>$ ghci</p>
<p>λ> :set -XDataKinds<br />λ> :set -XTypeOperators<br />λ> :kind! (1 + 17) Type 3<br /><br /><interactive>:1:2: error:<br /> Not in scope: type constructor or class ‘+’<br /><br /><interactive>:1:10: error:<br /> Not in scope: type constructor or class ‘Type’</p>
</body></html>