<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Feb 19, 2017 at 11:51 PM, Rui Azevedo <span dir="ltr"><<a href="mailto:ruihfazevedo@gmail.com" target="_blank">ruihfazevedo@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I don't know if there is some extension that already does this, or any other method of doing it.<br>
My search on deriving ghc mechanisms and extensions gave me no satisfactory results.<br>
<br>
the point is to have some "help" on derivation or some sort of derivation.<br>
actual derivation schema seems to require that all members (constructor arguments) instantiate the deriving class. This is the way of doing it for classes like Eq, works for Show and Ord but eventually it is a very strong requirement even for Eq sometimes. Of course I can do a manual derivation to state something else, and that sometimes can be frustrating because the derivations are way trivial and susceptible of automation.<br>
<br>
There is no fancy things added, its all standard haskell, user could laboriously type this.<br></blockquote><div><br></div><div>You might be interested in <a href="https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/DerivingStrategies">https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/DerivingStrategies</a>; a first cut is slated for ghc 8.2.1, for which a first release candidate is planned for later this month.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>