Applicative and parsec3

Christian Maeder Christian.Maeder at
Fri Jan 28 18:45:45 CET 2011

Am 28.01.2011 17:52, schrieb Edward Kmett:
> While you're hacking around on parsec a nice improvement would be to
> relax the type on the language generators in
> Text.ParserCombinators.Parsec.Language. (This one could be done without
> so drastic a change as bumping from 3 to 4):

In parsec3 this would be Text.Parsec.Language. (Text.ParserCombinators.*
is removed in parsec3.)

Furthermore, I'm no friend of the Parsec.{Token,Language} modules,
therefore I've removed them in parsec1.

I would rather see separate helper functions for lexing and comment
skipping than having them bundled as TokenParser or LanguageDef.


> They can all be instantiated for Monad m => GenLanguageDef String s m
> instead of LanguageDef, this would greatly extend their usability.
> You could even go a little farther and relax them so they can work over
> Bytestrings, etc.
> I for one always feel a little twinge when I'm forced to copy and paste
> them and change the signature just because I'm working in a parser that
> provides state, uses _any_ base monad, or consumes some other Char source.
> -Edward Kmett

More information about the Libraries mailing list