<!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/backports
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/7795b53b6e7358fb6d27139bf666652277261930">7795b53b</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-05-30T16:17:46+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Create di_scoped_tvs for associated data family instances properly

See `Note [Associated data family instances and di_scoped_tvs]` in
`GHC.Tc.TyCl.Instance`, which explains all of the moving parts.

Fixes #18055.

(cherry picked from commit cd8409c26d4370bf2cdcd76801974e99a9adf7b0)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2923cfd64b009182fd8ea1f9a22493f21969c2d9">2923cfd6</a></strong>
<div>
<span>by Sebastian Graf</span>
<i>at 2020-05-30T16:17:46+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">PmCheck: Adjust recursion depth for inhabitation test

In #17977, we ran into the reduction depth limit of the typechecker.
That was only a symptom of a much broader issue: The recursion depth
of the coverage checker for trying to instantiate strict fields in the
`nonVoid` test was far too high (100, the `defaultMaxTcBound`).

As a result, we were performing quite poorly on `T17977`.
Short of a proper termination analysis to prove emptyness of a type,
we just arbitrarily default to a much lower recursion limit of 3.

Fixes #17977.

(cherry picked from commit ed58d4fdcbc7b4fa8fbdf3d638a8d53c444ef4f2)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2c54f842f0557bac937ae6e5623fec7f79a9aa44">2c54f842</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-05-30T16:17:46+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Run checkNewDataCon before constraint-solving newtype constructors

Within `checkValidDataCon`, we used to run `checkValidType` on the
argument types of a newtype constructor before running
`checkNewDataCon`, which ensures that the user does not attempt
non-sensical things such as newtypes with multiple arguments or
constraints. This works out in most situations, but this falls over
on a corner case revealed in #17955:

```hs
newtype T = Coercible () T => T ()
```

`checkValidType`, among other things, peforms an ambiguity check on
the context of a data constructor, and that it turn invokes the
constraint solver. It turns out that there is a special case in the
constraint solver for representational equalities (read: `Coercible`
constraints) that causes newtypes to be unwrapped (see
`Note [Unwrap newtypes first]` in `TcCanonical`). This special case
does not know how to cope with an ill formed newtype like `T`, so
it ends up panicking.

The solution is surprisingly simple: just invoke `checkNewDataCon`
before `checkValidType` to ensure that the illicit newtype
constructor context is detected before the constraint solver can
run amok with it.

Fixes #17955.

(cherry picked from commit a0d8e92e9c9b67426aa139d6bc46363d8940f992)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0071044d220daad20dafd59fe1436ffa825fa9a5">0071044d</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-05-30T16:17:46+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Improve skolemisation

This patch avoids skolemiseUnboundMetaTyVar making
up a fresh Name when it doesn't need to.

See Note [Skolemising and identity]

Improves error messsages for partial type signatures.

(cherry picked from commit d7002bccd7d131f8ee9b1ddcd83d62262622294d)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/fb58c8ef6952d9dfadb2624abbc74be6707a47a1">fb58c8ef</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-05-30T16:17:47+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Improve pretty-printing for TyConBinders

In particular, show their kinds.

(cherry picked from commit fa37940cd72f82abc460f5c0a5de64dd75cee6ae)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0e49e13e5d0d5cbc49710226bf21a6fe0d923084">0e49e13e</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-05-30T16:17:47+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix scoping of TyCon binders in TcTyClsDecls

This patch fixes #17566 by refactoring the way we decide the final
identity of the tyvars in the TyCons of a possibly-recursive nest
of type and class decls, possibly with associated types.

It's all laid out in
  Note [Swizzling the tyvars before generaliseTcTyCon]

Main changes:

* We have to generalise each decl (with its associated types)
  all at once: TcTyClsDecls.generaliseTyClDecl

* The main new work is done in TcTyClsDecls.swizzleTcTyConBndrs

* The mysterious TcHsSyn.zonkRecTyVarBndrs dies altogether

Other smaller things:

* A little refactoring, moving bindTyClTyVars from tcTyClDecl1
  to tcDataDefn, tcSynRhs, etc.  Clearer, reduces the number of
  parameters

* Reduce the amount of swizzling required.
  Specifically, bindExplicitTKBndrs_Q_Tv doesn't need
    to clone a new Name for the TyVarTv, and not
    cloning means that in the vasly common case,
    swizzleTyConBndrs is a no-op

  In detail:
    Rename newTyVarTyVar --> cloneTyVarTyVar
    Add newTyVarTyTyVar that doesn't clone
    Use the non-cloning newTyVarTyVar in
       bindExplicitTKBndrs_Q_Tv
       Rename newFlexiKindedTyVarTyVar
           --> cloneFlexiKindedTyVarTyVar

* Define new utility function and use it
     HsDecls.familyDeclName ::
        FamilyDecl (GhcPass p) -> IdP (GhcPass p)

Updates haddock submodule.

(cherry picked from commit b9605396f1f1560aea94792646b835cadcb49f45)
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#75bfcd03f3ba9315d33104fcb0424c6bfeb4e334">
compiler/GHC/Hs/Decls.hs
</a>
</li>
<li class="file-stats">
<a href="#8d8e5922fde8bc19ffa2bc9cae6b6720abb88564">
compiler/GHC/HsToCore/PmCheck/Oracle.hs
</a>
</li>
<li class="file-stats">
<a href="#e41a2a88012b97213e3706fe27159af08ba0bf30">
compiler/typecheck/TcHsSyn.hs
</a>
</li>
<li class="file-stats">
<a href="#350c4076427c611b8f14e875a4ca553041c2b847">
compiler/typecheck/TcHsType.hs
</a>
</li>
<li class="file-stats">
<a href="#4c1af4850cb90ab2963edb06b69b57e87ccdf9c1">
compiler/typecheck/TcInstDcls.hs
</a>
</li>
<li class="file-stats">
<a href="#367db94fc37c8c7548dbe545a5302c7a5108e41e">
compiler/typecheck/TcMType.hs
</a>
</li>
<li class="file-stats">
<a href="#bdfa0cc139f61d1236abc1598c5d684b43c357f9">
compiler/typecheck/TcTyClsDecls.hs
</a>
</li>
<li class="file-stats">
<a href="#02ab52057b25cd107220549e7027dd4c9a6ba32c">
compiler/types/TyCon.hs
</a>
</li>
<li class="file-stats">
<a href="#36a6579ad6acf1e0db82a8dae6edcb33d8717111">
<span class="new-file">
+
testsuite/tests/deriving/should_compile/T18055.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#e7bc29da08da2be1b3bd264c751322dc3e8c1905">
testsuite/tests/deriving/should_compile/all.T
</a>
</li>
<li class="file-stats">
<a href="#5c594a243fe4c6ec3314ffbdf9b6cf9a6c8f23dd">
testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr
</a>
</li>
<li class="file-stats">
<a href="#2430cf6bd49f7c94008b89548971a935c1b1cd77">
testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
</a>
</li>
<li class="file-stats">
<a href="#396a6e11945f5b15dae3aaf5293c6d36321aefa0">
testsuite/tests/partial-sigs/should_compile/T10519.stderr
</a>
</li>
<li class="file-stats">
<a href="#5bc71bc0886d0f8575f09e4641db9cc39e7882c7">
testsuite/tests/partial-sigs/should_compile/T12844.stderr
</a>
</li>
<li class="file-stats">
<a href="#f1eecc598d7f9764bf831257d1a6e1455250570e">
testsuite/tests/partial-sigs/should_compile/T13482.stderr
</a>
</li>
<li class="file-stats">
<a href="#440df5c176256febfc9ea86170fe9a6e2fe71003">
testsuite/tests/partial-sigs/should_compile/T14217.stderr
</a>
</li>
<li class="file-stats">
<a href="#1fd9911bd422ea4464eced9af36c9431a3d05a83">
testsuite/tests/partial-sigs/should_compile/T14715.stderr
</a>
</li>
<li class="file-stats">
<a href="#878ef3ba1cf918b5b2965eda2ae8cf40ff010de0">
testsuite/tests/partial-sigs/should_compile/T15039a.stderr
</a>
</li>
<li class="file-stats">
<a href="#fae2de9bac037e18e09e1f43299719469d7283b5">
testsuite/tests/partial-sigs/should_compile/T15039c.stderr
</a>
</li>
<li class="file-stats">
<a href="#b16a1ffd67ffd8fd4e68341503bf44c581910108">
testsuite/tests/partial-sigs/should_compile/T16728.stderr
</a>
</li>
<li class="file-stats">
<a href="#befe36efee69935add9af6dc4b7a849aa1be3241">
testsuite/tests/partial-sigs/should_compile/T16728b.stderr
</a>
</li>
<li class="file-stats">
<a href="#72591d8a9816dfacd07c55a758fcdbd7f21aa477">
testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr
</a>
</li>
<li class="file-stats">
<a href="#06555ff9ba080afba9c1d5d7226c55f7f5339e1e">
testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
</a>
</li>
<li class="file-stats">
<a href="#68e538366fb1e2e205d75a66580af76bc1e59d16">
testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.stderr
</a>
</li>
<li class="file-stats">
<a href="#ed1f05744d893fe6cb1a4836519afee57f7050b1">
testsuite/tests/partial-sigs/should_fail/T10615.stderr
</a>
</li>
<li class="file-stats">
<a href="#663ab451580f16183c98da78f0b907b78cc04ad6">
<span class="new-file">
+
testsuite/tests/pmcheck/should_compile/T17977.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#ec6535bd36d396fc3581c997cf5b85dcaa7c9b7e">
<span class="new-file">
+
testsuite/tests/pmcheck/should_compile/T17977b.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#33807fd4b8ca5e4ac745a4d2f1cf105aa1d22e7f">
<span class="new-file">
+
testsuite/tests/pmcheck/should_compile/T17977b.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#a52966ece03f9e76a93a2c4ea96b9fb25368723d">
testsuite/tests/pmcheck/should_compile/all.T
</a>
</li>
<li class="file-stats">
<a href="#8002e66eed40ca81c468dbef70930ddc68b86514">
testsuite/tests/polykinds/T11203.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/-/compare/ec0968e3cd6757501c6b79bdec62b16a5bafc833...0e49e13e5d0d5cbc49710226bf21a6fe0d923084">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>