
On Fri, Oct 9, 2009 at 4:25 PM, David Menendez
On Fri, Oct 9, 2009 at 6:47 PM, staafmeister
wrote: Daniel Peebles wrote:
I vaguely remember on IRC someone pointing out that the Parsec monad broke one of the laws. I think return _|_ >> x === _|_ which could be causing your problem. I may be wrong though.
Confirmed, working in the parsec monad
Prelude Text.Parsec> runP (do {x <- return undefined; return 10}) () "" "" *** Exception: Prelude.undefined
In the IO Monad Prelude Text.Parsec> do {x <- return undefined; return 10} 10
Should be fixed.
It looks like the problem is a strict field in the definition of GenParser (specifically in Reply). From what I can tell, Parsec 3.0.1 should not have this problem.
-- Dave Menendez
http://www.eyrie.org/~zednenem/ _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
It works with Parsec 3.0.1 for me. Alex