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
> welcome).

textLine = manyTill anyChar (char '\n')
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to