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.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to