Re: [Haskell-cafe] Simple Parsec example, question

2010-09-15 Thread Peter Schmitz
Antoine, Thank you very much for your reply. Adding type sigs did help me think about it. I got it to work. I replaced: eol = char '\n' textLines = endBy eol with: textLine :: Parser String textLine = do x - many (noneOf \n) char '\n' return x textLines :: Parser [String]

Re: [Haskell-cafe] Simple Parsec example, question

2010-09-15 Thread Daniel Fischer
On Wednesday 15 September 2010 23:01:34, Peter Schmitz wrote: textLine :: Parser String textLine = do    x - many (noneOf \n)    char '\n'    return x textLines :: Parser [String] textLines = many textLine And it can probably be coded more succinctly that that (suggestions

Re: [Haskell-cafe] Simple Parsec example, question

2010-09-15 Thread Peter Schmitz
Daniel, Thanks much; the more I learn Haskell and Parsec, the more I like them. -- Peter On Wed, Sep 15, 2010 at 4:02 PM, Daniel Fischer daniel.is.fisc...@web.de wrote: On Wednesday 15 September 2010 23:01:34, Peter Schmitz wrote: textLine :: Parser String textLine = do    x - many

[Haskell-cafe] Simple Parsec example, question

2010-09-14 Thread Peter Schmitz
Simple Parsec example, question I am learning Parsec and have been studying some great reference and tutorial sites I have found (much thanks to the authors), including: http://legacy.cs.uu.nl/daan/download/parsec/parsec.html#UserGuide

Re: [Haskell-cafe] Simple Parsec example, question

2010-09-14 Thread Antoine Latter
Hi Peter, On Tue, Sep 14, 2010 at 8:23 PM, Peter Schmitz ps.hask...@gmail.com wrote: Simple Parsec example, question I am learning Parsec and have been studying some great reference and tutorial sites I have found (much thanks to the authors), including: