Be less picky about reporing inaccessible code
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 9 Sep 2016 16:42:42 +0000 (17:42 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 12 Sep 2016 15:20:35 +0000 (16:20 +0100)
commit03541cbae50f0d1cdf99120ab88698f29a278159
tree0cc7f0a0e7175505168afa3342a137fe11b9d78f
parent454033b54e2f7eef2354cc9d7ae7e7cba4dff09a
Be less picky about reporing inaccessible code

Triggered by the discussion on Trac #12466, this patch
makes GHC less aggressive about reporting an error when
there are insoluble Givens.

Being so agressive was making some libraries fail to
compile, and is arguably wrong in at least some cases.
See the discussion on the ticket.

Several test now pass when they failed before; see
the files-modified list for this patch.
18 files changed:
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcSMonad.hs
compiler/typecheck/TcSimplify.hs
testsuite/tests/ghci/scripts/Defer02.script
testsuite/tests/ghci/scripts/Defer02.stderr
testsuite/tests/typecheck/should_compile/T12466.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T12466a.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T
testsuite/tests/typecheck/should_fail/FDsFromGivens.hs
testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
testsuite/tests/typecheck/should_fail/T10715.hs
testsuite/tests/typecheck/should_fail/T10715.stderr
testsuite/tests/typecheck/should_fail/T5236.hs
testsuite/tests/typecheck/should_fail/T5236.stderr
testsuite/tests/typecheck/should_fail/T8392a.hs
testsuite/tests/typecheck/should_fail/T8392a.stderr
testsuite/tests/typecheck/should_fail/all.T
testsuite/tests/typecheck/should_run/Defer01.hs