[Haskell-cafe] <|> that short-circuits in IO ?

Kim-Ee Yeoh ky3 at atamo.com
Sun Nov 2 14:01:38 UTC 2014


Chris, thank you for the links. I now understand ExceptT a lot better.

Roman, thank you for the full program. What happened was I copy-pasted

runExceptT $ ExceptT a <|> ExceptT b

from your email into ghci. But you said the latest transformers was
required, so I did the install. Finally, I saw an "A" printed out and
went "Hey, that's not right!"

Returning to the mail client, I referred back to Semen's original
query and copy-pasted from there.

But really it was A then B that I saw and not B then A.

So mea culpa.

Truth be told, all that while I was figuring out how to get Semen's
"liftA2 (<|>)" to work and suffered cognitively from the lazy I/O
solution I pursued.

-- Kim-Ee


More information about the Haskell-Cafe mailing list