
4 Sep
2012
4 Sep
'12
12:40 p.m.
The code for the book is written in Haskell '98, but recent versions of GHC default to Haskell2010. A salient difference between H98 and H2012 is the removed of n + k patterns which generates the error you are seeing. I can't find the exact command to use in the GHC docs to enable H98, but you could try the following old flag which disables GHCs extensions:
ghci -fno-glasgow-exts