<div dir="ltr">Good point!</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 9, 2016 at 11:48 AM, Ryan Ingram <span dir="ltr"><<a href="mailto:ryani.spam@gmail.com" target="_blank">ryani.spam@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think it's more like the non-keyworded default definitions of class methods, for the same reasons; the default definition has to potentially be valid for all instances of the class.<div><br></div><div>It's the difference between</div><div><br></div><div>class Applicative m => Monad m where</div><div> return :: a -> m a</div><div> return = pure -- always valid, but can be overridden in instance declarations</div><div><br></div><div>and</div><div><br></div><div>class Fuctor f => Applicative f where</div><div> (<*>) :: f (a -> b) -> f a -> f b</div><div> default (<*>) :: Monad f => f (a -> b) -> f a -> f b</div><div> (<*>) = ap -- only valid if matches the type signature above</div><div><br></div></div>
</blockquote></div><br></div>