Request for feedback: deriving strategies syntax

Richard Eisenberg eir at cis.upenn.edu
Mon Jul 18 13:17:44 UTC 2016


> On Jul 18, 2016, at 2:54 AM, Andres Loeh <mail at andres-loeh.de> wrote:
> 
> There's nothing obviously wrong with option 3, but it seems relatively
> verbose (I'd prefer Richard's syntax), and feels more ad-hoc. I don't
> mind "builtin" to refer to the deriving mechanism, but again, I also
> don't mind Richard's suggestion of using "bespoke". Another suggestion
> would be to use "magic".

I thought about verbosity here, and it's not clear which one is more verbose. For example, I frequently define a new newtype and then wish to use GND to derive a whole host of instances. In this case (is it common?), `deriving (X, Y) deriving newtype (A,B,C,D,E,F)` is shorter than putting newtype on each class name.

I suppose we could provide both options, but that may be one bridge too far.

Richard


More information about the ghc-devs mailing list