Tony, you're missing the point... Alexey isn't making a complete patch to GHC/base libraries, just a hacky-looking demonstration. Alexey is saying that in a class hierarchy (such as if Functor => Monad were a hierarchy, or for that matter "XFunctor"=>"XMonad" or Eq => Ord), it is still possible to define the superclass functions (fmap) in terms of the subclass functions (return and >>=) (such as writing a functor instance in which "fmap f m = m >>= (return . f)"). This has always been true in Haskell, it just might not have been obvious.

_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to