Use Cxt for deriving clauses in TH (#10819)

Authored by bgamari on Sep 1 2015, 10:26 PM.



Deriving clauses in the TH representations of data, newtype, data
instance, and newtype instance declarations previously were just [Name],
which didn't allow for more complex derived classes, eg. multi-parameter

This switches out [Name] for Cxt, representing the derived classes as
types instead of names.

Test Plan


Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
spinda retitled this revision from to Use Cxt for deriving clauses in TH (#10819).Sep 1 2015, 10:26 PM
spinda updated this object.
spinda edited the test plan for this revision. (Show Details)
spinda added a reviewer: austin.
spinda updated the Trac tickets for this revision.
spinda updated this object.Sep 2 2015, 1:04 PM
goldfire accepted this revision.Sep 3 2015, 1:36 AM

Macro applause:

1 ↗(On Diff #4011)

Did you mean for this to be here?

spinda updated this revision to Diff 4044.Sep 3 2015, 1:51 AM

Remove unintentionally-included file

1 ↗(On Diff #4011)

Oh dear, no I did not. That's from when I was experimenting with bypassing Safe Haskell (Trac #10826). Looks like I saved it in the wrong directory.

austin accepted this revision.Sep 6 2015, 4:13 PM




Please rebase this patch onto current master, so it can be validated.

bgamari added a comment.EditedSep 18 2015, 4:44 AM

@spinda, do you think you could rebase this?

edit: oops, looks like @thomie already asked. Take your time.

bgamari requested changes to this revision.Sep 21 2015, 5:56 AM

Bumping from review queue.

This revision now requires changes to proceed.Sep 21 2015, 5:56 AM
bgamari commandeered this revision.Dec 7 2015, 8:26 AM
bgamari edited reviewers, added: spinda; removed: bgamari.
This revision is now accepted and ready to land.Dec 7 2015, 8:26 AM
bgamari updated this revision to Diff 5563.Dec 8 2015, 7:55 AM
bgamari marked an inline comment as done.

Fix TH

bgamari updated this revision to Diff 5566.Dec 8 2015, 9:14 AM

Should compile now

bgamari updated this revision to Diff 5567.Dec 8 2015, 9:18 AM
  • Fix release notes
bgamari updated this revision to Diff 5623.Dec 11 2015, 7:08 PM
  • Fix
  • Fix tests
  • Fix release notes
  • Fix

@goldfire, any last requests on this?

No. Ship it!

This revision was automatically updated to reflect the committed changes.