
26 Jul
2004
26 Jul
'04
12:03 p.m.
Martin Sjögren
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. Regards, Malcolm