<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>


<style>img {
max-width: 100%; height: auto;
}
body {
font-size: 0.875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px;
}
body {
font-family: var(--default-regular-font, "GitLab Sans"),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px; font-family: var(--default-regular-font, "GitLab Sans"),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">

<h3 style="margin-top: 20px; margin-bottom: 10px;">
Vladislav Zavialov pushed to branch wip/int-index/term-capture at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
Commits:
</h4>
<ul>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1d6f4ba2765a28a357b159bb8a1fba935e96442e">1d6f4ba2</a></strong>
<div>
<span> by Vladislav Zavialov </span> <i> at 2023-11-26T03:07:58+03:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #333238; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Term variable capture (#23740)

This patch changes type variable lookup rules (lookupTypeOccRn) and
implicit quantification rules (filterInScope) so that variables bound
in the term namespace can be captured at the type level

  {-# LANGUAGE RequiredTypeArguments #-}
  f1 x = g1 @x                -- `x` used in a type application
  f2 x = g2 (undefined :: x)  -- `x` used in a type annotation
  f3 x = g3 (type x)          -- `x` used in an embedded type
  f4 x = ...
    where g4 :: x -> x        -- `x` used in a type signature
          g4 = ...

This change alone does not allow us to accept examples shown above,
but at least it gets them past the renamer.
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
30 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#86d694037d496c511e28b2c09c8410f67dc19596">
compiler/GHC/Rename/Env.hs
</a>
</li>
<li class="file-stats">
<a href="#892acbb198a9095c917740d3c1297b56df4e3b7e">
compiler/GHC/Rename/HsType.hs
</a>
</li>
<li class="file-stats">
<a href="#7dd1cd0f6f2164a14c83d9aa564dd32bc30e447a">
compiler/GHC/Rename/Module.hs
</a>
</li>
<li class="file-stats">
<a href="#1dd9c7a6bbc222c976a6ec1c4b772232ae60f7e5">
compiler/GHC/Tc/Errors/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#6b3cd9d1473c3d051b8e6eb1d32fd53ca0c18c62">
compiler/GHC/Tc/Errors/Types/PromotionErr.hs
</a>
</li>
<li class="file-stats">
<a href="#9355bef855426caf5f526925edf351b20f9a86c4">
compiler/GHC/Tc/Gen/HsType.hs
</a>
</li>
<li class="file-stats">
<a href="#9ea832ccdb4b5f7508a1efd6caedeafa16b269e7">
compiler/GHC/Tc/Gen/Splice.hs
</a>
</li>
<li class="file-stats">
<a href="#f021c52a6ccf306e88c9f760b2aee33b180ba341">
compiler/GHC/Tc/Utils/Env.hs
</a>
</li>
<li class="file-stats">
<a href="#2937d23144454625b5830e39f20bc1cede74d24e">
testsuite/tests/diagnostic-codes/codes.stdout
</a>
</li>
<li class="file-stats">
<a href="#95f1c0688b6cdf18e38c71182982cde17d9b74cb">
testsuite/tests/rename/should_compile/T22513a.stderr
</a>
</li>
<li class="file-stats">
<a href="#1811c48f1701ae8b5d9719c4e45431117694740e">
testsuite/tests/rename/should_compile/T22513b.stderr
</a>
</li>
<li class="file-stats">
<a href="#2412dd5de068268f7ee42f9de83d8a99dc585295">
testsuite/tests/rename/should_compile/T22513c.stderr
</a>
</li>
<li class="file-stats">
<a href="#c68e40b2617eceaa1a81268471c7c8807d4684b9">
testsuite/tests/rename/should_compile/T22513d.stderr
</a>
</li>
<li class="file-stats">
<a href="#aa11e5f809583faafff2c9367ab4d6e198192e85">
testsuite/tests/rename/should_compile/T22513e.stderr
</a>
</li>
<li class="file-stats">
<a href="#9aad59147192377138d9ca3be4cb46fc9650d629">
testsuite/tests/rename/should_compile/T22513f.stderr
</a>
</li>
<li class="file-stats">
<a href="#e958d02ac7d5a11f7c68b8856e7ffb744347473e">
testsuite/tests/rename/should_compile/T22513g.hs
</a>
</li>
<li class="file-stats">
<a href="#84ca38136a38eca6dc47869de778fa7b6ec8a4b2">
testsuite/tests/rename/should_compile/T22513g.stderr
</a>
</li>
<li class="file-stats">
<a href="#6b2c51c23508883177e59599d76162045abef604">
testsuite/tests/rename/should_compile/T22513h.stderr
</a>
</li>
<li class="file-stats">
<a href="#ec0b9bb6170bfbf86c8f87bcd109ea1b9b9aaa97">
testsuite/tests/rename/should_compile/T22513i.stderr
</a>
</li>
<li class="file-stats">
<a href="#fae16f0cf5d8802ce832e2ea724fe4eabe0086f0">
<span class="new-file">
+
testsuite/tests/rename/should_compile/T22513j.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#4ba67b30b7cf4b2385161ba6b426a4322dbd3201">
<span class="new-file">
+
testsuite/tests/rename/should_compile/T22513j.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#a4162a155076487da39ef091cacc50c633652a4d">
testsuite/tests/rename/should_compile/all.T
</a>
</li>
<li class="file-stats">
<a href="#a3ed76309d0b6e04c5f464a4ab789b72907a96f6">
<span class="deleted-file">

testsuite/tests/rename/should_fail/T12686.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#feb28abf746a9b5b8700f9deae927bf8fbe215e4">
<span class="deleted-file">

testsuite/tests/rename/should_fail/T12686.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#5fca34b727b169da5a1ce4e6485c551e9920d0d4">
<span class="new-file">
+
testsuite/tests/rename/should_fail/T12686a.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#e144be7ed70728249e83732ee6e01e31b9a63b26">
<span class="new-file">
+
testsuite/tests/rename/should_fail/T12686a.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#2e21f1a81dd79c9979b257e64d82ca4791aecf02">
<span class="new-file">
+
testsuite/tests/rename/should_fail/T12686b.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#43540fe70cd8931acd631644e5084fc35eb893aa">
<span class="new-file">
+
testsuite/tests/rename/should_fail/T12686b.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#a9186b62bd2ab5632fe1dc099451ae197fd7b9f5">
<span class="new-file">
+
testsuite/tests/rename/should_fail/T12686c.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#d9cbf2555a79fb0d58635d8cc8897ab96200bd21">
<span class="new-file">
+
testsuite/tests/rename/should_fail/T12686c.stderr
</span>
</a>
</li>
</ul>
<h5 style="margin-top: 10px; margin-bottom: 10px; font-size: 0.875rem;">
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: #737278;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1d6f4ba2765a28a357b159bb8a1fba935e96442e">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.haskell.org">gitlab.haskell.org</a>. <a href="https://gitlab.haskell.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.haskell.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<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/1d6f4ba2765a28a357b159bb8a1fba935e96442e"}}</script>


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