[Haskell-cafe] maybeToM

Joachim Breitner mail at joachim-breitner.de
Mon Dec 18 12:34:04 EST 2006


Hi,

Am Montag, den 18.12.2006, 09:22 -0800 schrieb Stefan O'Rear:
> module Data.Generics.Serialization.Standard ...
> 
> -- |Convert a 'Maybe' object into any monad, using the imbedding defined by
> -- fail and return.
> fromMaybeM :: Monad m => String -> Maybe a -> m a
> fromMaybeM st = maybe (fail st) return

I can’t find that module anywhere (with neither [gh]oogle). But I guess
that is another indicator that it’s useful to use Maybe in other Monads.

Greetings,
Joachim

-- 
Joachim "nomeata" Breitner
  mail: mail at joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
  JID: joachimbreitner at amessage.de | http://www.joachim-breitner.de/
  Debian Developer: nomeata at debian.org


More information about the Haskell-Cafe mailing list