Hello everyone,

I have some operations that have to be done in sequence, with
each one having the result of the previous as input.
They can fail, so they have signature 
a -> Maybe b
Checking for error can be quite tedious so I use monadic operations:

f :: a -> Maybe b
do      y <- foo x
        z <- boo y
        moo z

The problems arise when I try to do the same thing within the IO Monad,
i.e. the functions have signature
a->IO (Maybe b)

How can I achieve the same effect (if it is ever possible)?
I feel like it should be something almost trivial, but I really can't get it.

Thanks
Marco



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

Reply via email to