[Haskell-beginners] Parsing an integer

Tim Baumgartner baumgartner.tim at googlemail.com
Sun Nov 21 10:19:48 EST 2010

Hi Stephen,

yes, it's Parsec, but I write this parser only for learning the
language, so I don't care if I rewrite existing code. But thanks for
the advice regarding performance. Patrick's answer was perfect for me
and I will get used to

<$> = fmap



2010/11/21 Stephen Tetley <stephen.tetley at gmail.com>:
> Where is the Parser monad coming from?
> If its Parsec, a "seasoned Haskeller" would avoid read (which is
> re-parsing already parsed data) and use the integer parser from
> Parsec's Token parser module.[*]
> [*] The one caveat is that the number parsers in this module follow
> Haskell's lexical rules - you might not always want this.
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners

More information about the Beginners mailing list