Refactoring Semigroup/Monoid (was: instance Applicative Data.Map)

Edward Kmett ekmett at gmail.com
Tue Nov 20 19:57:40 CET 2012


On Mon, Nov 19, 2012 at 12:25 PM, Tyson Whitehead <twhitehead at gmail.com>wrote:

>   instance Monad m => Applicative m where
>     applicative_map = monad_map
>     applicative_pure = monad_pure
>     applicative_apply = monad_apply
>

With this instance you are already dead in the water. Once you have it you
can't safely add *any* new instances in another module and be able to rely
on them being seen by the type system, so no, it doesn't work ;)

-Edward
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20121120/25e308ae/attachment.htm>


More information about the Libraries mailing list