[Haskell-beginners] parsec question
Stephen Tetley
stephen.tetley at gmail.com
Mon Jul 19 05:40:13 EDT 2010
Parsec has the CharParser - /integer/ - to avoid "many1 digit" and the like.
You have to instantiate a TokenParser to use it - but for all but
simplest parser the effort pays for itself.
On 19 July 2010 09:14, David Virebayre <dav.vire+haskell at gmail.com> wrote:
>
> That can be shortened to :
>
> digitList :: Parser [Int]
> digitList = map ( read.(:[])) `fmap` many digit
>
More information about the Beginners
mailing list