tsuraan <[email protected]> wrote:
> Is there a more concise way to do this?
I use
someIO >>= f where
f Opt1 = ...
If it's a common pattern, you can even do
opts f _ _ (Opt1 x) = f x
opts _ g _ (Opt2 x) = g x
opts _ _ h (Opt3 x) = h x
. Functions are easier to mess around with than case expressions.
--
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe