
On Fri, 23 Jul 2004 17:21:34 -0700, John Meacham
Any chance a couple of changes could be made to ReadP
1. let the type of tokens be an argument 2. give Fail a String argument and have it preserve the string passed to 'fail'.
I don't think either will adversly affect performance, yet will make it possible to use ReadP as a simple standard (as in comes with the libraries) very lightweight parsing monad without compromising its main goal of implementing a faster Read.
While we're discussing changes, is there an overwhelmingly good reason for the use of local quantification beyond making the type signatures simpler? Writing newtype ReadP r a = R ((a -> P r) -> P r) (like in ContT) would make ReadP completely Haskell98 as far as I can tell. /Martin