[Haskell-cafe] trying to understand monad transformers....
Daryoush Mehrtash
dmehrtash at gmail.com
Tue Sep 9 02:39:45 EDT 2008
The MaybeT transformer is defined as:
newtype MaybeT m a = MaybeT {runMaybeT :: m (Maybe
<http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:Maybe>
a)}
instance Functor
<http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:Functor>
m => Functor <http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:Functor>
(MaybeT m) where
fmap <http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:fmap>
f x = MaybeT $ <http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:.>
fmap <http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:fmap>
(fmap <http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:fmap>
f) $ <http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:.>
runMaybeT x
....
Question: What does "runMaybeT x" mean?
Thanks,
Daryoush
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080908/fce08296/attachment.htm
More information about the Haskell-Cafe
mailing list