[Haskell-cafe] Parser question
lemming at henning-thielemann.de
Tue Mar 15 07:31:33 EST 2005
On Tue, 15 Mar 2005, Nicola Whitehead wrote:
> Hi folks,
> I have a parser problem. I have a basic calculator program (Graham Hutton's from Nottingham) which contains the following code:
> -- Define a parser to handle the input
> expr :: Parser Int
> expr = do t <- term
> do symbol "+"
> e <- expr
> return (t + e)
> +++ return t
I assume that the nested 'do' (before 'symbol') is too much.
More information about the Haskell-Cafe