Do not quantify over deriving clauses
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 12 Oct 2017 08:25:25 +0000 (09:25 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 12 Oct 2017 08:25:25 +0000 (09:25 +0100)
commit82b77ec375ab74678ac2afecf55dc574fa24490f
treef108b73d253bdc08fb927e46096a7c6e5198e3b9
parent13fdca3d174ff15ac347c5db78370f457a3013ee
Do not quantify over deriving clauses

Trac #14331 showed that in a data type decl like

   data D = D deriving (C (a :: k))

we were quantifying D over the 'k' in the deriving clause.  Yikes.

Easily fixed, by deleting code in RnTypes.extractDataDefnKindVars

See the discussion on the ticket, esp comment:8.
compiler/rename/RnTypes.hs
testsuite/tests/deriving/should_compile/T14331.hs [new file with mode: 0644]
testsuite/tests/deriving/should_compile/all.T