[Haskell-cafe] <|> that short-circuits in IO ?
Kim-Ee Yeoh
ky3 at atamo.com
Fri Oct 31 21:22:28 UTC 2014
On Thu, Oct 30, 2014 at 8:50 PM, Roman Cheplyaka <roma at ro-che.info> wrote:
> >> liftA2 (<|>) b a
> >
> > B
> > A
> > Right 42
> >
> > (In the latter case I don't want A in the output…)
>
> Wrap it into ExceptT (from the latest transformers), as in
>
> runExceptT $ ExceptT a <|> ExceptT b
With the latest transformers, I still get
B
A
Right 42
i.e. the A hasn't been eliminated.
What am I missing?
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141101/f69bff3f/attachment.html>
More information about the Haskell-Cafe
mailing list