[Git][ghc/ghc][wip/ghc-8.8-merges] 5 commits: ErrUtils: Emit progress messages to eventlog
Ben Gamari
gitlab at gitlab.haskell.org
Fri Jun 21 21:20:42 UTC 2019
Ben Gamari pushed to branch wip/ghc-8.8-merges at Glasgow Haskell Compiler / GHC
Commits:
abf568dd by Ben Gamari at 2019-06-16T15:32:08Z
ErrUtils: Emit progress messages to eventlog
(cherry picked from commit 1bef62c38d3737b5f5d7ebbb479f3c1a12b1aa09)
- - - - -
048d4d22 by Ben Gamari at 2019-06-16T15:32:08Z
Emit GHC timing events to eventlog
(cherry picked from commit ebfa35284741fca47719f531f0996261441f75b0)
- - - - -
ce6a492b by Simon Peyton Jones at 2019-06-19T16:39:50Z
Fail fast in solveLocalEqualities
This patch makes us fail fast in TcSimplify.solveLocalEqualities,
and in TcHsType.tc_hs_sig_type, if there are insoluble constraints.
Previously we ploughed on even if there were insoluble constraints,
leading to a cascade of hard-to-understand type errors. Failing
eagerly is much better; hence a lot of testsuite error message
changes. Eg if we have
f :: [Maybe] -> blah
f xs = e
then trying typecheck 'f x = e' with an utterly bogus type
is just asking for trouble.
I can't quite remember what provoked me to make this change,
but I think the error messages are notably improved, by
removing confusing clutter and focusing on the real error.
(cherry picked from commit 5c1f268e2744fab2d36e64c163858995451d7095)
- - - - -
4a5ab8f0 by Richard Eisenberg at 2019-06-19T16:39:50Z
Fix #16517 by bumping the TcLevel for method sigs
There were actually two bugs fixed here:
1. candidateQTyVarsOfType needs to be careful that it does not
try to zap metavariables from an outer scope as "naughty"
quantification candidates. This commit adds a simple check
to avoid doing so.
2. We weren't bumping the TcLevel in kcHsKindSig, which was used
only for class method sigs. This mistake led to the acceptance
of
class C a where
meth :: forall k. Proxy (a :: k) -> ()
Note that k is *locally* quantified. This patch fixes the
problem by using tcClassSigType, which correctly bumps the
level. It's a bit inefficient because tcClassSigType does other
work, too, but it would be tedious to repeat much of the code
there with only a few changes. This version works well and is
simple.
And, while updating comments, etc., I noticed that tcRnType was
missing a pushTcLevel, leading to #16767, which this patch also
fixes, by bumping the level. In the refactoring here, I also
use solveEqualities. This initially failed ghci/scripts/T15415,
but that was fixed by teaching solveEqualities to respect
-XPartialTypeSignatures.
This patch also cleans up some Notes around error generation that
came up in conversation.
Test case: typecheck/should_fail/T16517, ghci/scripts/T16767
(cherry picked from commit a22e51ea6f7a046c87d57ce30d143eef6abee9ff)
(cherry picked from commit 19ab32c5fb3ebd88927b94acf6b348facc1552a2)
- - - - -
92543601 by Ben Gamari at 2019-06-21T21:17:46Z
Merge branch 'wip/backport-MR951' into wip/ghc-8.8-merges
- - - - -
30 changed files:
- compiler/main/ErrUtils.hs
- compiler/typecheck/TcCanonical.hs
- compiler/typecheck/TcErrors.hs
- compiler/typecheck/TcHsType.hs
- compiler/typecheck/TcMType.hs
- compiler/typecheck/TcRnDriver.hs
- compiler/typecheck/TcRnTypes.hs
- compiler/typecheck/TcSimplify.hs
- compiler/typecheck/TcTyClsDecls.hs
- compiler/typecheck/TcType.hs
- testsuite/tests/dependent/should_fail/DepFail1.stderr
- testsuite/tests/ghci/scripts/T15898.stderr
- + testsuite/tests/ghci/scripts/T16767.script
- + testsuite/tests/ghci/scripts/T16767.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/indexed-types/should_fail/T13877.stderr
- testsuite/tests/partial-sigs/should_fail/T11976.stderr
- testsuite/tests/partial-sigs/should_fail/T12634.stderr
- testsuite/tests/patsyn/should_fail/T15289.stderr
- testsuite/tests/polykinds/T12593.stderr
- testsuite/tests/polykinds/T15577.stderr
- testsuite/tests/typecheck/should_fail/T11112.stderr
- testsuite/tests/typecheck/should_fail/T13819.stderr
- testsuite/tests/typecheck/should_fail/T14232.stderr
- + testsuite/tests/typecheck/should_fail/T16517.hs
- + testsuite/tests/typecheck/should_fail/T16517.stderr
- testsuite/tests/typecheck/should_fail/T3540.stderr
- testsuite/tests/typecheck/should_fail/T7778.stderr
- testsuite/tests/typecheck/should_fail/T8806.stderr
- testsuite/tests/typecheck/should_fail/VtaFail.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/0f1266b1f44434ec960dee31ece22bb480ec912d...92543601915d2386c5f80e460330a173a4ab0ace
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/0f1266b1f44434ec960dee31ece22bb480ec912d...92543601915d2386c5f80e460330a173a4ab0ace
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190621/2f16f277/attachment.html>
More information about the ghc-commits
mailing list