How about a "deriving defaulted" deriving strategy

Andrew Martin andrew.thaddeus at
Mon Jan 14 16:12:47 UTC 2019

I was just doing the usual incantation for an exception type:

    data DatagramException = ...
      deriving stock (Eq,Show)
    instance Exception Datagram

And it suddenly hit me what a shame it was that I cannot put the Exception
instance in a deriving clause like the others. It would be more visually
pleasing to write:

    data DatagramException = ...
      deriving stock (Eq,Show)
      deriving defaulted (Exception)

-Andrew Thaddeus Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list