[ghc-steering-committee] GHC2021: DeriveAnyClass

Alejandro Serrano Mena trupill at gmail.com
Mon Nov 30 19:42:29 UTC 2020


Dear all,
I’ve found as a surprise that several members of the Committee have voted
against, or even marked as dangerous, the DeriveAnyClass extension. Given
that I am a great fan of it, I would like to open the debate about the
particular extension.

In my case, most of my uses are to derive ToJSON and FromJSON from the
Aeson package. I find it very nice to be able to pack all the information
about auto-derived instances in a small block, instead of including Eq and
Show in the deriving block, and then a few empty instance declarations
below. This is definitely mainly a aesthetic reason.

The other reason for adoption is that it makes classes such as Eq or Show
less “special”, so one does not have to explain to beginners that some
classes can be derived in this way, some others in that other way, and so
on. So my other reason for inclusion would be a uniformity one.

Regards,
Alejandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20201130/13edbed6/attachment.html>


More information about the ghc-steering-committee mailing list