Simon Marlow: Personally I find Parsec and the other parser combinator
libraries quite difficult to use when it comes to deciding where to put
'try'; ReadP is the exception here, because it does general backtracking and
doesn't make you decide where to use 'try'.
John D. Earle: I bet this has something to do with lazy verses strict
evaluation. ReadP alleviates the problem by doing the work for you. Lazy
evaluation fits nicely with the aims of high level language design. Lazy
evaluation gives more opportunities for a compiler to optimize the code
using non-domain specific optimizations. At some point in the compilation
process lazy becomes strict. When designing domain specific optimizations
you are working on the low level details at around the lazy-strict
transition boundary, however. Part of the problem appears to be that I do
not understand how to selectively carry out strict evaluation in Haskell.
Lazy evaluation is the default.
_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc