<!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/48dfe535174a03da2cacc70e40accf005f6faf15">48dfe535</a></strong>
<div>
<span>by Richard Eisenberg</span>
<i>at 2019-06-20T03:30:53Z</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)
</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="#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="#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>
<li class="file-stats">
<a href="#4d74fd1fca1dffc354139c30e6fb84a8f788d5f5">
testsuite/tests/typecheck/should_fail/tcfail057.stderr
</a>
</li>
<li class="file-stats">
<a href="#e89698042b35378e88c999c6b2b35875983dea68">
testsuite/tests/typecheck/should_fail/tcfail058.stderr
</a>
</li>
<li class="file-stats">
<a href="#63f87eb16d76b18443cab432db1111d809f85fa4">
testsuite/tests/typecheck/should_fail/tcfail063.stderr
</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/commit/48dfe535174a03da2cacc70e40accf005f6faf15">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.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.haskell.org/ghc/ghc/commit/48dfe535174a03da2cacc70e40accf005f6faf15"}}</script>

</p>
</div>
</body>
</html>