Don't lint erroneous programs. ghc-8.6.2-release
authorRichard Eisenberg <rae@cs.brynmawr.edu>
Thu, 1 Nov 2018 22:03:21 +0000 (18:03 -0400)
committerBen Gamari <ben@smart-cactus.org>
Fri, 2 Nov 2018 15:00:36 +0000 (11:00 -0400)
commit41f0f6c2f571ea05c49f9f6ed64beebdc5a9f9fc
treedfe05f6c60bb0743d274cc355f28effb5c30dfde
parent7a439e7b13f350e1ac6163f1bfa60e30924dbeea
Don't lint erroneous programs.

newFamInst lints its types. This is good. But it's not so good
when there have been errors and thus recovery tycons are about.
So we now don't.

Fixes #15796.

Test case: typecheck/should_fail/T15796

(cherry picked from commit 1f72a1c81368e34387aac38c0b1c59521cec58ec)
compiler/typecheck/FamInst.hs
testsuite/tests/typecheck/should_fail/T15796.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T15796.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T