<!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>
Richard Eisenberg pushed to branch wip/no-coholes
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/11ea299ea4f079c5e2ec7eb859dcde6f900902b5">11ea299e</a></strong>
<div>
<span>by Richard Eisenberg</span>
<i>at 2020-03-18T13:26:08Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Simplify treatment of heterogeneous equality

Previously, if we had a [W] (a :: k1) ~ (rhs :: k2), we would
spit out a [D] k1 ~ k2 and part the W as irreducible, hoping for
a unification. But we needn't do this. Instead, we now spit out
a [W] co :: k2 ~ k1 and then use co to cast the rhs of the original
Wanted. This means that we retain the connection between the
spat-out constraint and the original.

The problem with this new approach is that we cannot use the
casted equality for substitution; it's too like wanteds-rewriting-
wanteds. So, we forbid CTyEqCans that mention coercion holes.

All the details are in Note [Equalities with incompatible kinds]
in TcCanonical.

There are a few knock-on effects, documented where they occur.

While debugging an error in this patch, Simon and I ran into
infelicities in how patterns and matches are printed; we made
small improvements.

This patch includes mitigations for #17828, which causes spurious
pattern-match warnings. When #17828 is fixed, these lines should
be removed.
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#783e5dae6e86931f06700fc088fb7d48c8a07386">
compiler/GHC/Core/Coercion.hs
</a>
</li>
<li class="file-stats">
<a href="#578c7c3857d66d963736ff6742f3433a0e8d01b7">
compiler/GHC/Core/TyCo/Rep.hs
</a>
</li>
<li class="file-stats">
<a href="#cc97d81e7223ad4a3a5e801156ca632f9fa75654">
compiler/GHC/Hs/Expr.hs
</a>
</li>
<li class="file-stats">
<a href="#0bae7e7e67b5f9b6ba2a371f8917cf74423a0c6f">
compiler/GHC/Hs/Pat.hs
</a>
</li>
<li class="file-stats">
<a href="#ac0a6473a902628a18b3a470122e5cc1ce09de14">
compiler/GHC/HsToCore/PmCheck.hs
</a>
</li>
<li class="file-stats">
<a href="#19210880480e56b52b9b65a684bb8ff015096891">
compiler/typecheck/Constraint.hs
</a>
</li>
<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="#1b594d79ffc66b4bbbefcc4dccef85df99efbb84">
compiler/typecheck/TcFlatten.hs
</a>
</li>
<li class="file-stats">
<a href="#350c4076427c611b8f14e875a4ca553041c2b847">
compiler/typecheck/TcHsType.hs
</a>
</li>
<li class="file-stats">
<a href="#d23139540613ebf7bf5370064db5a6eff767783f">
compiler/typecheck/TcInteract.hs
</a>
</li>
<li class="file-stats">
<a href="#367db94fc37c8c7548dbe545a5302c7a5108e41e">
compiler/typecheck/TcMType.hs
</a>
</li>
<li class="file-stats">
<a href="#6afe03b46383f3ff9d03e297c01649111ca9b736">
compiler/typecheck/TcOrigin.hs
</a>
</li>
<li class="file-stats">
<a href="#d9c89b044466ae3def730ce7a0c3ee976b76b5d0">
compiler/typecheck/TcPluginM.hs
</a>
</li>
<li class="file-stats">
<a href="#088b49348926372d4b44b4f836a02df001856987">
compiler/typecheck/TcSMonad.hs
</a>
</li>
<li class="file-stats">
<a href="#75d517f701402b106e4d98d255eb24b57ba72aab">
compiler/typecheck/TcSimplify.hs
</a>
</li>
<li class="file-stats">
<a href="#af690a15749edb3506c0c35c3c3591d30f3299c4">
compiler/typecheck/TcUnify.hs
</a>
</li>
<li class="file-stats">
<a href="#5d788cf3a1e26fad65c0dcc4c801c6ea4e6e1299">
testsuite/tests/dependent/should_fail/BadTelescope5.stderr
</a>
</li>
<li class="file-stats">
<a href="#0d647858d1d2e71b327d84edff0e95a928d59c92">
testsuite/tests/dependent/should_fail/T14066.stderr
</a>
</li>
<li class="file-stats">
<a href="#3a3191d9f091d02c92fd2912102449b4d22ac948">
testsuite/tests/dependent/should_fail/T14066e.stderr
</a>
</li>
<li class="file-stats">
<a href="#be3176dd680b038f442161581e992924140d0404">
testsuite/tests/ghci.debugger/scripts/break012.stdout
</a>
</li>
<li class="file-stats">
<a href="#bc015367eeefc72e7c1e447bde540fe2ff2a7b1a">
testsuite/tests/indexed-types/should_fail/T14887.stderr
</a>
</li>
<li class="file-stats">
<a href="#15c8e4e356746b542d334e3e9ccf3c5bc00672e8">
testsuite/tests/indexed-types/should_fail/T3330c.stderr
</a>
</li>
<li class="file-stats">
<a href="#76e7406560d015eade7137a04ff001cd01e1d8ff">
testsuite/tests/partial-sigs/should_fail/T14584.stderr
</a>
</li>
<li class="file-stats">
<a href="#bc4ffdf271cd138b7e3e72937084080b70f4e95b">
testsuite/tests/patsyn/should_fail/T15685.stderr
</a>
</li>
<li class="file-stats">
<a href="#b37208b88586421af1e9bff92752a43407edcdad">
testsuite/tests/polykinds/T11399.stderr
</a>
</li>
<li class="file-stats">
<a href="#34d37b5ebbb0ce152cb1f63cadad0b0feb50173d">
testsuite/tests/polykinds/T14846.stderr
</a>
</li>
<li class="file-stats">
<a href="#9c4302fde700e5ff96cc73b414d1aa5dea593d0d">
testsuite/tests/polykinds/T17841.stderr
</a>
</li>
<li class="file-stats">
<a href="#2d4290a407e34ea1c8a51b0e2c3640caf7c7221a">
testsuite/tests/polykinds/T7278.stderr
</a>
</li>
<li class="file-stats">
<a href="#e0ba84ddffe18bac3f36402188c9464e74aca4a5">
testsuite/tests/polykinds/T8616.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/11ea299ea4f079c5e2ec7eb859dcde6f900902b5">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/11ea299ea4f079c5e2ec7eb859dcde6f900902b5"}}</script>


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