
On Fri, 2011-09-23 at 22:25 +0200, Maciej Marcin Piechotka wrote:
The problem of backward compatibility have been the main obstacle against adopting Functor f => (Pointed f =>?) => Applicative f => Monad f.
This proposition is to add following default instances[1]:
default fmap :: Applicative f => (a -> b) -> f a -> f b f `fmap` m = pure f <*> m default pure :: Monad f => a -> f a pure = return default (<*>) :: Monad f => f (a -> b) -> f a -> f b (<*>) = liftM2 ($)
The proposition is intended as step towards implementing whole hierarchy of Functor f => (Pointed f =>?) => Applicative f => Monad f[2]
Discussion period: 2 weeks
Regards
[1] It's using DefaultSuperclassInstances extentions: http://hackage.haskell.org/trac/ghc/wiki/DefaultSuperclassInstances [2] Trivial implementation is shown here: http://thread.gmane.org/gmane.comp.lang.haskell.libraries/16196
I believe that in such case the Pointed instance comes at nearly zero cost. _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
Sorry for overdue summary. From what I understend there was neither much oposition nor support for the proposal. What's the procedure in such case? Regards