Combinators for ReadP

Malcolm Wallace Malcolm.Wallace at
Mon Jul 26 12:03:42 EDT 2004

Martin Sjögren <msjogren at> writes:

> > I think you'll find that without the local universal quantifier,
> > you cannot make ReadP a (useful) instance of Monad, because your
> > 'r' parameter would be fixed across >>=, whereas it really needs to
> > be variable.
> Uhh. But it works for ContT, so why not for ReadP? The only point time
> you have to fix the r is when you want to "run" the parser, all other
> parsers will be polymorphic in r:

OK, cool.  If you can successfully convert ReadP to Haskell'98, we'd
all be delighted.  But Koen and Simon PJ are the people most likely
to be able to give relevant comment on whether any subtle properties
will be lost.


More information about the Libraries mailing list