Deal with large extra-contraints wildcards
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 21 Sep 2017 16:35:11 +0000 (17:35 +0100)
committerBen Gamari <ben@smart-cactus.org>
Tue, 26 Sep 2017 15:21:45 +0000 (11:21 -0400)
commit2e17259c57ff598ec87db545fb33702d86859462
tree3b18521d17c4260106a1a29b3ea89b832918496d
parent98f3bdd6af349bc020013335a1a9b17612d23115
Deal with large extra-contraints wildcards

For reasons explained in TcHsType
Note [Extra-constraint holes in partial type signatures],
if we had
  f :: (_) => blahs
and the '_' was filled in by more than a 62-tuple of contraints,
GHC crashed.

The same Note explains the hacky solution I have adopted to
evade this.  Maybe there is some better way, but I couldn't
see one that didn't involve a great deal of work. And the problem
is a very narrow one!  If the hack bites us we'll need to think
again.

(cherry picked from commit 3c74a51232813eb733b27c43c94ce005112a0ddb)
compiler/prelude/TysWiredIn.hs
compiler/typecheck/TcBinds.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcMType.hs
testsuite/tests/partial-sigs/should_compile/T14217.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/T14217.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/all.T