2009/05/30 Bartosz Wójcik <[email protected]>:
> ...reading RWH I could not memorize what those liftM funtions
> meant.
The basic one, `liftM`, means `fmap`, though specialized for
functors that are monads.
Prelude Control.Monad> :t liftM
liftM :: forall a b (m :: * -> *). (Monad m) => (a -> b) -> m a -> m b
Prelude Control.Monad> :t fmap
fmap :: forall a b (f :: * -> *). (Functor f) => (a -> b) -> f a -> f b
I think we have `liftM` either to help the inferencer or due
to the absence of a `(Functor m)` constraint in the definition
of the `Monad` typeclass.
--
Jason Dusek
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe