Suggest how to fix illegally nested foralls in GADT constructor type signatures
authorRyan Scott <ryan.gl.scott@gmail.com>
Thu, 17 Aug 2017 14:07:03 +0000 (10:07 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Thu, 17 Aug 2017 14:07:03 +0000 (10:07 -0400)
commit039fa1b994a8b0d6be25eb1bc711904db9661db2
tree1ed9bec64b6aab32dbdcb4d13975424a86951ec9
parent38260a9e9f8c38edd25f4b4c06e0ea5d88fc6bf2
Suggest how to fix illegally nested foralls in GADT constructor type signatures

Summary:
Although the code from #12087 isn't accepted by GHC, we can at least
do a better job of letting users know what the problem is, and how to fix it.

Test Plan: make test TEST=T12087

Reviewers: goldfire, austin, bgamari

Reviewed By: goldfire

Subscribers: rwbarton, thomie

GHC Trac Issues: #12087

Differential Revision: https://phabricator.haskell.org/D3851
compiler/typecheck/TcTyClsDecls.hs
testsuite/tests/gadt/T12087.hs [new file with mode: 0644]
testsuite/tests/gadt/T12087.stderr [new file with mode: 0644]
testsuite/tests/gadt/all.T