<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<h3>
Ben Gamari pushed to branch wip/backport-MR951
at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/a03619a03845bd27a2a97f2885855c817fa96b6e">a03619a0</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2019-06-13T22:43:49Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">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)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/5857463c709faebd376d04ea90382ac76335e006">5857463c</a></strong>
<div>
<span>by Richard Eisenberg</span>
<i>at 2019-06-13T22:47:54Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">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)
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#9f8e9eab0dc8b12ae9f92fbb76ddca15c817667a">
compiler/typecheck/TcCanonical.hs
</a>
</li>
<li class="file-stats">
<a href="#c573dfc3158e7ec41ecc0965becd5f1e6e92a2e6">
compiler/typecheck/TcErrors.hs
</a>
</li>
<li class="file-stats">
<a href="#350c4076427c611b8f14e875a4ca553041c2b847">
compiler/typecheck/TcHsType.hs
</a>
</li>
<li class="file-stats">
<a href="#367db94fc37c8c7548dbe545a5302c7a5108e41e">
compiler/typecheck/TcMType.hs
</a>
</li>
<li class="file-stats">
<a href="#2799ba786adc98d485fad6003334b913a0069bdc">
compiler/typecheck/TcRnDriver.hs
</a>
</li>
<li class="file-stats">
<a href="#d2ddf5ce2d076f8584d9825af8ea0d7ea0a38813">
compiler/typecheck/TcRnTypes.hs
</a>
</li>
<li class="file-stats">
<a href="#75d517f701402b106e4d98d255eb24b57ba72aab">
compiler/typecheck/TcSimplify.hs
</a>
</li>
<li class="file-stats">
<a href="#bdfa0cc139f61d1236abc1598c5d684b43c357f9">
compiler/typecheck/TcTyClsDecls.hs
</a>
</li>
<li class="file-stats">
<a href="#341fd962c5f2c9fcf8be3dbdaa9a14ee1538af07">
compiler/typecheck/TcType.hs
</a>
</li>
<li class="file-stats">
<a href="#d06c53a0af9d8d4ce3926a972ef14e23ec2f1062">
testsuite/tests/dependent/should_fail/DepFail1.stderr
</a>
</li>
<li class="file-stats">
<a href="#e478b581c89507742104c63ac6f5592864c6d62b">
testsuite/tests/ghci/scripts/T15898.stderr
</a>
</li>
<li class="file-stats">
<a href="#13b8cf7619096f55d161ef6f6892fd8b6399f187">
<span class="new-file">
+
testsuite/tests/ghci/scripts/T16767.script
</span>
</a>
</li>
<li class="file-stats">
<a href="#8c9b98ada81eb0b5ce37764a0ca63adffb8549d6">
<span class="new-file">
+
testsuite/tests/ghci/scripts/T16767.stdout
</span>
</a>
</li>
<li class="file-stats">
<a href="#080fb38cc741d3f1a476696b3373ab7cf48c2aaa">
testsuite/tests/ghci/scripts/all.T
</a>
</li>
<li class="file-stats">
<a href="#24ca8cd4c0ac4e73381870c51317218146fea7df">
testsuite/tests/indexed-types/should_fail/T13877.stderr
</a>
</li>
<li class="file-stats">
<a href="#a82df923dec09987f3a14caa3525962008923e77">
testsuite/tests/partial-sigs/should_fail/T11976.stderr
</a>
</li>
<li class="file-stats">
<a href="#7b3fa4219629deca61547940ba980e3b3c31651c">
testsuite/tests/partial-sigs/should_fail/T12634.stderr
</a>
</li>
<li class="file-stats">
<a href="#ba5c02381b0da2db4623be4ed43702101c3653cb">
testsuite/tests/patsyn/should_fail/T15289.stderr
</a>
</li>
<li class="file-stats">
<a href="#2decae25fbbeca46eab4f4f54da8d350dd1e9060">
testsuite/tests/polykinds/T12593.stderr
</a>
</li>
<li class="file-stats">
<a href="#8b56a17b55cf3da82391b6b397cc115eca8f8d19">
testsuite/tests/polykinds/T15577.stderr
</a>
</li>
<li class="file-stats">
<a href="#d06366af09dac2319faf3d5f80d9277c9d388b10">
testsuite/tests/typecheck/should_fail/T11112.stderr
</a>
</li>
<li class="file-stats">
<a href="#42c1e0f9d29dc6568d2c966810d3b3c06e29b17d">
testsuite/tests/typecheck/should_fail/T13819.stderr
</a>
</li>
<li class="file-stats">
<a href="#4e1e6ab56fd4526988234b71e8b75ace2cfe1284">
testsuite/tests/typecheck/should_fail/T14232.stderr
</a>
</li>
<li class="file-stats">
<a href="#f80799ecc01331b244dad18a881729fbb1f7bfb5">
<span class="new-file">
+
testsuite/tests/typecheck/should_fail/T16517.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#5a9a1ea6f14d9aad857ca084d18ff53bec57a93b">
<span class="new-file">
+
testsuite/tests/typecheck/should_fail/T16517.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#ee5638cfd504321fce6e2940014a1287a50304bf">
testsuite/tests/typecheck/should_fail/T3540.stderr
</a>
</li>
<li class="file-stats">
<a href="#a4a43dfb1406d69f629765b0ee68e7d61a3101e4">
testsuite/tests/typecheck/should_fail/T7778.stderr
</a>
</li>
<li class="file-stats">
<a href="#10b02e0ce0cf4b13af6bc375776be417cbdcc1fb">
testsuite/tests/typecheck/should_fail/T8806.stderr
</a>
</li>
<li class="file-stats">
<a href="#cb3d3efbd5d0fed4097b161b6c4dfb41c42fc868">
testsuite/tests/typecheck/should_fail/VtaFail.stderr
</a>
</li>
<li class="file-stats">
<a href="#b9e86d897a62509b0114d81d5e736630d6f68f43">
testsuite/tests/typecheck/should_fail/all.T
</a>
</li>
</ul>
<h5>The diff was not included because it is too large.</h5>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">
—
<br>
<a href="https://gitlab.haskell.org/ghc/ghc/compare/19ab32c5fb3ebd88927b94acf6b348facc1552a2...5857463c709faebd376d04ea90382ac76335e006">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.haskell.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.
</p>
</div>
</body>
</html>