
3 Jul
2012
3 Jul
'12
1:01 p.m.
On 3 July 2012 15:13, Christian Maeder
This type synonym is unsuitable for a Monad instance. Better would be: newtype Parser a = Parser (String -> [(a, String)]) but that would require to change your code below.
This is alluded to in the closing chapter remarks (section 8.9) of Graham Hutton's book and there is code available on the website that accompanies the book that "solves" the problem. Unfortunately, this chapter does seem to trip people up who use the book for self study.