[Haskell-cafe] <|> that short-circuits in IO ?
Chris Wong
lambda.fairy at gmail.com
Sat Nov 1 06:09:44 UTC 2014
> With the latest transformers, I still get
>
> B
> A
> Right 42
>
> i.e. the A hasn't been eliminated.
>
> What am I missing?
Can you show us your code?
Looking at the source:
http://hackage.haskell.org/package/transformers-0.4.1.0/docs/src/Control-Monad-Trans-Except.html#line-169
http://hackage.haskell.org/package/transformers-0.4.1.0/docs/src/Control-Monad-Trans-Error.html#line-217
both ExceptT and ErrorT have short-circuiting <|> and mplus.
Chris
More information about the Haskell-Cafe
mailing list