Re: [Haskell-cafe] Parser question

2005-03-15 Thread Jules Bean
On 15 Mar 2005, at 12:38, Mark Carroll wrote: Variables (although why they're called that in Haskell I'm not sure) Because the value that they denote can vary between different calls of the same function? Jules ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Parser question

2005-03-15 Thread Mark Carroll
On Tue, 15 Mar 2005, Nicola Whitehead wrote: (snip) > term :: Parser Int > term = do f <- factor >do symbol "*" >e <- expr >return (f * t) > +++ return f (snip) > symbol and natural are defined elsewhere and work fine, but when I compile it

Re: [Haskell-cafe] Parser question

2005-03-15 Thread Henning Thielemann
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 "+"

[Haskell-cafe] Parser question

2005-03-15 Thread Nicola Whitehead
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 inputexpr :: Parser Intexpr = do t <- term  do symbol "+"   e <- expr