rename: Disallow type signatures in patterns in plain Haskell
authorBen Gamari <bgamari.foss@gmail.com>
Tue, 29 Mar 2016 12:11:57 +0000 (14:11 +0200)
committerBen Gamari <ben@smart-cactus.org>
Tue, 29 Mar 2016 16:58:39 +0000 (18:58 +0200)
commitd5d6804d37960ece2652196f3661604a70c12ffc
treed3c6c22778b04abfa4c2a0855066917b62f340ae
parentcf768ec062dee47cf72cbddf42d69d9508ec3afb
rename: Disallow type signatures in patterns in plain Haskell

This should require -XScopedTypeVariables. It seems this was previously
handled by RnTypes.rnHsBndrSig which called RnTypes.badKindSigErr but
this was broken in Simon's refactor of wildcards,
1e041b7382b6aa329e4ad9625439f811e0f27232. Here we re-introduce a check
in RnPat. See #11663.

Test Plan: Validate with `T11663`

Reviewers: austin, simonpj

Reviewed By: austin

Subscribers: thomie

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

GHC Trac Issues: #11663
compiler/rename/RnTypes.hs
testsuite/tests/rename/should_fail/T11663.hs [new file with mode: 0644]
testsuite/tests/rename/should_fail/T11663.stderr [new file with mode: 0644]
testsuite/tests/rename/should_fail/all.T