<div dir="ltr">I&#39;m having a bit of trouble getting my brain around that, but if anybody cares about attracting new users, that might be relevant in itself. Perhaps I could be seen as an example of your swing-state. I&#39;m no Haskell expert but I&#39;d like to push it if I could cos I&#39;m so sick of seeing huge codebases land in the dustbin due to the evils of imperative coding. The version-controlled modules thing is immediately comforting for me cos I know what it is and I could fire it at the manager next door who doesn&#39;t know much but fancies my job. </div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 3 May 2013 22:54, Guy <span dir="ltr">&lt;<a href="mailto:guytsalmaves-h@yahoo.com" target="_blank">guytsalmaves-h@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">David Thomas wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;d also like to see these two.  It occurs to me there may be language tweak that could reduce breakage and add some<br>
convenience in both cases.  It would not surprise me at all if this has been thought of, examined, and discarded, but I<br>
don&#39;t have time to dig so I&#39;ll just lay it out quickly, and if it has been discussed before someone will probably know<br>
where.<br>
<br>
The idea is to allow definitions of superclass operations in subclass instances.  If there are such definitions, it&#39;s<br>
treated as if there were instances defined for each class (potentially a source translation, even).  I think default<br>
definitions of superclass operations in the subclass would be used last (that is, only for the automatic instance of the<br>
superclass, and only if the superclass didn&#39;t have a default for that).<br>
<br>
This should allow existing instances of Num to just work (and I think Monad too, with some care).  It would also mean if<br>
you&#39;re making something that&#39;s a Monad or a Num you could just lay out the one instance in all one place, reducing a bit<br>
of boilerplate.  At the same time, you&#39;d have the flexibility to just use the superclasses where you just want pieces.<br>
</blockquote>
<br>
</div><a href="http://hackage.haskell.org/trac/ghc/wiki/DefaultSuperclassInstances" target="_blank">http://hackage.haskell.org/<u></u>trac/ghc/wiki/<u></u>DefaultSuperclassInstances</a><br>
<br>
I&#39;m surprised that the various superclass proposals haven&#39;t got more attention, seeing as it would allow for this kind of class hierarchy clean-up without breaking lots of code.<div class="HOEnZb"><div class="h5">
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>