Use Cxt for deriving clauses in TH (#10819)
authorBen Gamari <bgamari.foss@gmail.com>
Mon, 14 Dec 2015 14:01:12 +0000 (15:01 +0100)
committerBen Gamari <ben@smart-cactus.org>
Mon, 14 Dec 2015 14:34:03 +0000 (15:34 +0100)
commit04ab55d9a6fe311b7cb544211738caca6c00c720
treef1e48296c1cbfd94eb7cafd935f2c2baf570eb61
parent65920c9e6a17094c3a0abbdbed5ab01f8524850e
Use Cxt for deriving clauses in TH (#10819)

Summary:
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
typeclasses.

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

Test Plan: validate

Reviewers: goldfire, spinda, austin

Reviewed By: goldfire, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1202

GHC Trac Issues: #10819
compiler/deSugar/DsMeta.hs
compiler/hsSyn/Convert.hs
docs/users_guide/7.12.1-notes.rst
libraries/template-haskell/Language/Haskell/TH/Lib.hs
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
testsuite/tests/rts/T7919A.hs
testsuite/tests/th/T10819.hs [new file with mode: 0644]
testsuite/tests/th/T10819_Lib.hs [new file with mode: 0644]
testsuite/tests/th/TH_dataD1.hs
testsuite/tests/th/all.T