[Haskell-beginners] Functional Parses
stephen.tetley at gmail.com
Tue Jul 3 19:01:32 CEST 2012
On 3 July 2012 15:13, Christian Maeder <Christian.Maeder at dfki.de> wrote:
> 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.
More information about the Beginners