Re: [Haskell-cafe] trying to understand monad transformers....

2008-09-10 Thread wren ng thornton
wren ng thornton wrote: Daryoush Mehrtash wrote: The MaybeT transformer is defined as: newtype MaybeT m a = MaybeT {runMaybeT :: m (Maybe a)} Question: What does runMaybeT x mean? As for what does it do, I think everyone else has handled that pretty well. As far as what does it

[Haskell-cafe] trying to understand monad transformers....

2008-09-09 Thread Daryoush Mehrtash
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

Re: [Haskell-cafe] trying to understand monad transformers....

2008-09-09 Thread Magnus Therning
2008/9/9 Daryoush Mehrtash [EMAIL PROTECTED]: The MaybeT transformer is defined as: newtype MaybeT m a = MaybeT {runMaybeT :: m (Maybe a)} instance Functor m = Functor (MaybeT m) where fmap f x = MaybeT $ fmap (fmap f) $ runMaybeT x Question: What does runMaybeT x mean? If

Re: [Haskell-cafe] trying to understand monad transformers....

2008-09-09 Thread Ryan Ingram
2008/9/8 Daryoush Mehrtash [EMAIL PROTECTED]: The MaybeT transformer is defined as: newtype MaybeT m a = MaybeT {runMaybeT :: m (Maybe a)} Question: What does runMaybeT x mean? This is just shorthand for the following: newtype MaybeT m a = MaybeT (m (Maybe a)) runMaybeT :: MaybeT m a -

Re: [Haskell-cafe] trying to understand monad transformers....

2008-09-09 Thread Paul Johnson
Daryoush Mehrtash wrote: 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

Re: [Haskell-cafe] trying to understand monad transformers....

2008-09-09 Thread wren ng thornton
Daryoush Mehrtash wrote: The MaybeT transformer is defined as: newtype MaybeT m a = MaybeT {runMaybeT :: m (Maybe a)} Question: What does runMaybeT x mean? As for what does it do, I think everyone else has handled that pretty well. As far as what does it mean, it may help to think