<!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 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: -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: -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/ppr-tick at <a href="https://gitlab.haskell.org/ghc/ghc" style="color: #1068bf;">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/b66a68a38098eb9215b3ae99aa2d31ba3d0b87d6" style="color: #1068bf;">b66a68a3</a></strong>
<div>
<span> by Vladislav Zavialov </span> <i> at 2022-11-24T19:07:27+03:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "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: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>Print unticked promoted data constructors (#20531)

Before this patch, GHC unconditionally printed ticks before promoted
data constructors:

        ghci> type T = True  -- unticked (user-written)
        ghci> :kind! T
        T :: Bool
        = 'True              -- ticked (compiler output)

After this patch, GHC prints ticks only when necessary:

        ghci> type F = False    -- unticked (user-written)
        ghci> :kind! F
        F :: Bool
        = False                 -- unticked (compiler output)

        ghci> data False        -- introduce ambiguity
        ghci> :kind! F
        F :: Bool
        = 'False                -- ticked by necessity (compiler output)

The old behavior can be enabled by -fprint-redundant-promotion-ticks.

Summary of changes:
* Rename PrintUnqualified to NamePprCtx
* Add QueryPromotionTick to it
* Consult the GlobalRdrEnv to decide whether to print a tick (see mkPromTick)
* Introduce -fprint-redundant-promotion-ticks

Co-authored-by: Artyom Kuznetsov <hi@wzrd.ht>
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
30 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#d0d96a6d03668aeab20ebe05e2c4ccb798c7e64c" style="color: #1068bf;">
compiler/GHC.hs
</a>
</li>
<li class="file-stats">
<a href="#36a42448a83a9d1f6df8475f03ead2eed199dd8e" style="color: #1068bf;">
compiler/GHC/Core/Lint.hs
</a>
</li>
<li class="file-stats">
<a href="#9aae8d40d1a22cf73eaec14fd86dfc6917ce10e5" style="color: #1068bf;">
compiler/GHC/Core/Opt/Monad.hs
</a>
</li>
<li class="file-stats">
<a href="#bd153f89bc48f3fd5079b51fb799808aacbd750c" style="color: #1068bf;">
compiler/GHC/Core/Opt/Pipeline.hs
</a>
</li>
<li class="file-stats">
<a href="#f168a93cde5e2aec2441d6331dfe500172df4af3" style="color: #1068bf;">
compiler/GHC/Core/Opt/Simplify.hs
</a>
</li>
<li class="file-stats">
<a href="#4aad0050db1a8a20db8bbca149111de99cb299c9" style="color: #1068bf;">
compiler/GHC/Core/TyCon.hs
</a>
</li>
<li class="file-stats">
<a href="#dbce6cb5e8f3d5287103c66d1a56ad63bbbd11a9" style="color: #1068bf;">
compiler/GHC/Driver/Backpack.hs
</a>
</li>
<li class="file-stats">
<a href="#574ab192f6f9c7baf983610e701fedce9fffda66" style="color: #1068bf;">
compiler/GHC/Driver/Config/Core/Lint.hs
</a>
</li>
<li class="file-stats">
<a href="#2c680115d7e70b54a18c48be02dce2d676eaf4f8" style="color: #1068bf;">
compiler/GHC/Driver/Errors.hs
</a>
</li>
<li class="file-stats">
<a href="#2e5692f568fd7b67a6b172e2a60469da8392508c" style="color: #1068bf;">
compiler/GHC/Driver/Flags.hs
</a>
</li>
<li class="file-stats">
<a href="#9a679a2680ef6061397f1987091ea9f96ffe095d" style="color: #1068bf;">
compiler/GHC/Driver/Main.hs
</a>
</li>
<li class="file-stats">
<a href="#c1ebbd8dd9934a9830cc2a4690e75465600f1554" style="color: #1068bf;">
compiler/GHC/Driver/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#774d88050336ef660c7a219fb06c480c2fc639bc" style="color: #1068bf;">
compiler/GHC/Driver/Session.hs
</a>
</li>
<li class="file-stats">
<a href="#dd79b5199bc3b425c4536c633b39006df111a7ef" style="color: #1068bf;">
compiler/GHC/HsToCore.hs
</a>
</li>
<li class="file-stats">
<a href="#c8a27621f82549165d8946ae8e9f467660958059" style="color: #1068bf;">
compiler/GHC/HsToCore/Monad.hs
</a>
</li>
<li class="file-stats">
<a href="#648f978c68cdea9aa07ff6362494dbc95b04d4e6" style="color: #1068bf;">
compiler/GHC/HsToCore/Pmc/Utils.hs
</a>
</li>
<li class="file-stats">
<a href="#b2fd0f5f3e0bc9dcc507931c0b7388bf10e925c2" style="color: #1068bf;">
compiler/GHC/HsToCore/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#05179f6a260af85dabe0cfb5ed2204da64dadd33" style="color: #1068bf;">
compiler/GHC/Iface/Errors.hs
</a>
</li>
<li class="file-stats">
<a href="#7d51edda4fa76a202cce0bca672ef300249ba8ea" style="color: #1068bf;">
compiler/GHC/Iface/Load.hs
</a>
</li>
<li class="file-stats">
<a href="#f2b2b84d138b362920ab9f144f58bf16254aab64" style="color: #1068bf;">
compiler/GHC/Iface/Type.hs
</a>
</li>
<li class="file-stats">
<a href="#1811a3b055be891f22cd203b90bf886f60b34dc7" style="color: #1068bf;">
compiler/GHC/Runtime/Context.hs
</a>
</li>
<li class="file-stats">
<a href="#8354467a9f7f92c6aafb2f9edbc73a0cdbeeec3c" style="color: #1068bf;">
compiler/GHC/Runtime/Debugger.hs
</a>
</li>
<li class="file-stats">
<a href="#c6e4263ee64c68e57b7525127d98243fce38b1ea" style="color: #1068bf;">
compiler/GHC/Tc/Utils/Monad.hs
</a>
</li>
<li class="file-stats">
<a href="#c9446951223982bc58852a8f524a62b6011c482f" style="color: #1068bf;">
compiler/GHC/Types/Error.hs
</a>
</li>
<li class="file-stats">
<a href="#0f578f1fe8a9ec5a67a0f6fa165f2aa15f113682" style="color: #1068bf;">
compiler/GHC/Types/Name/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#74503129756c368c70bd530fb0beb4292889db5e" style="color: #1068bf;">
compiler/GHC/Utils/Error.hs
</a>
</li>
<li class="file-stats">
<a href="#b62120081f64009b94c12d04ded5c68870d8c647" style="color: #1068bf;">
compiler/GHC/Utils/Logger.hs
</a>
</li>
<li class="file-stats">
<a href="#d3cf57b6a5ebc234dc7689db38ef9b6cf2259c0f" style="color: #1068bf;">
compiler/GHC/Utils/Outputable.hs
</a>
</li>
<li class="file-stats">
<a href="#af1d9e2647379d23697be69f8b7fc568ed0294c5" style="color: #1068bf;">
docs/users_guide/using.rst
</a>
</li>
<li class="file-stats">
<a href="#c30f4ac98f08779ad1bd5a02a27802862c1e9521" style="color: #1068bf;">
ghc/GHCi/UI.hs
</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: #666;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b66a68a38098eb9215b3ae99aa2d31ba3d0b87d6" style="color: #1068bf;">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" style="color: #1068bf;">gitlab.haskell.org</a>. <a href="https://gitlab.haskell.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link" style="color: #1068bf;">Manage all notifications</a> · <a href="https://gitlab.haskell.org/help" target="_blank" rel="noopener noreferrer" class="help-link" style="color: #1068bf;">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/b66a68a38098eb9215b3ae99aa2d31ba3d0b87d6"}}</script>


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