[Haskell-beginners] how to skip pattern match error when applying a mapM_

PICCA Frederic-Emmanuel frederic-emmanuel.picca at synchrotron-soleil.fr
Tue Jan 17 19:44:31 UTC 2017

> I don't know if 'row' contains any side effects that should also be
> executed if the returned 'Maybe' is 'Nothing', if this isn't the case,
> then you might be able to switch the return type of 'row' from
> 'IO (Maybe ...)' to 'Maybe (IO ...)' and then you could get the
> described behaviour for 'Maybe'.

As soon as one side effect return Nothing, it should stop the IO monad.
so I should definitiely switch to Maybe IO

now how can I know the behaviour in between the line of a Monad.
I aimagine that this is the purpose of the bind method (>>=).

Where is this  defined  for Maybe and IO ?



More information about the Beginners mailing list