[Haskell-cafe] Different semantics in "identical" do statement?
staafmeister
g.c.stavenga at uu.nl
Fri Oct 9 18:47:35 EDT 2009
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.
--
View this message in context: http://www.nabble.com/Different-semantics-in-%22identical%22-do-statement--tp25828319p25829017.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe
mailing list