<!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>
Ryan Scott pushed to branch wip/T16762-chunks-2-and-3
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/7ab6ab093c86227b6d33a5185ebbd11928ac9754">7ab6ab09</a></strong>
<div>
<span>by Richard Eisenberg</span>
<i>at 2020-05-06T04:39:32-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Refactor hole constraints.

Previously, holes (both expression holes / out of scope variables and
partial-type-signature wildcards) were emitted as *constraints* via
the CHoleCan constructor. While this worked fine for error reporting,
there was a fair amount of faff in keeping these constraints in line.
In particular, and unlike other constraints, we could never change
a CHoleCan to become CNonCanonical. In addition:
 * the "predicate" of a CHoleCan constraint was really the type
   of the hole, which is not a predicate at all
 * type-level holes (partial type signature wildcards) carried
   evidence, which was never used
 * tcNormalise (used in the pattern-match checker) had to create
   a hole constraint just to extract it again; it was quite messy

The new approach is to record holes directly in WantedConstraints.
It flows much more nicely now.

Along the way, I did some cleaning up of commentary in
GHC.Tc.Errors.Hole, which I had a hard time understanding.

This was instigated by a future patch that will refactor
the way predicates are handled. The fact that CHoleCan's
"predicate" wasn't really a predicate is incompatible with
that future patch.

No test case, because this is meant to be purely internal.

It turns out that this change improves the performance of
the pattern-match checker, likely because fewer constraints
are sloshing about in tcNormalise. I have not investigated
deeply, but an improvement is not a surprise here:

-------------------------
Metric Decrease:
    PmSeriesG
-------------------------
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/420b957df9d831632a3edab682778b11734255f1">420b957d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-05-06T04:40:08-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Zero block flags with -DZ

Block flags are very useful for determining the state of a block.
However, some block allocator users don't touch them, leading to
misleading values. Ensure that we zero then when zero-on-gc is set. This
is safe and makes the flags more useful during debugging.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/740b3b8df76dabd88bdb3474aad2b287b0960f07">740b3b8d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-05-06T04:40:08-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">nonmoving: Fix incorrect failed_to_evac value during deadlock gc

Previously we would incorrectly set the failed_to_evac flag if we
evacuated a value due to a deadlock GC. This would cause us to mark more
things as dirty than strictly necessary. It also turned up a nasty but
which I will fix next.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b2d72c758233830446230800d0045badc01b42ca">b2d72c75</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-05-06T04:40:08-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">nonmoving: Fix handling of dirty objects

Previously we (incorrectly) relied on failed_to_evac to be "precise".
That is, we expected it to only be true if *all* of an object's fields
lived outside of the non-moving heap. However, does not match the
behavior of failed_to_evac, which is true if *any* of the object's
fields weren't promoted (meaning that some others *may* live in the
non-moving heap).

This is problematic as we skip the non-moving write barrier for dirty
objects (which we can only safely do if *all* fields point outside of
the non-moving heap).

Clearly this arises due to a fundamental difference in the behavior
expected of failed_to_evac in the moving and non-moving collector.
e.g., in the moving collector it is always safe to conservatively say
failed_to_evac=true whereas in the non-moving collector the safe value
is false.

This issue went unnoticed as I never wrote down the dirtiness
invariant enforced by the non-moving collector. We now define this
invariant as

    An object being marked as dirty implies that all of its fields are
    on the mark queue (or, equivalently, update remembered set).

To maintain this invariant we teach nonmovingScavengeOne to push the
fields of objects which we fail to evacuate to the update remembered
set. This is a simple and reasonably cheap solution and avoids the
complexity and fragility that other, more strict alternative invariants
would require.

All of this is described in a new Note, Note [Dirty flags in the
non-moving collector] in NonMoving.c.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9f3e6884e338015f2953c4c0844e04d467f53dd5">9f3e6884</a></strong>
<div>
<span>by Zubin Duggal</span>
<i>at 2020-05-06T04:41:08-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Allow atomic update of NameCache in readHieFile

The situation arises in ghcide where multiple different threads may need to
update the name cache, therefore with the older interface it could happen
that you start reading a hie file with name cache A and produce name cache
A + B, but another thread in the meantime updated the namecache to A +
C. Therefore if you write the new namecache you will lose the A' updates
from the second thread.

Updates haddock submodule
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/edec6a6c205378caf15d1d874d7e901ba76dd293">edec6a6c</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-05-06T04:41:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Make isTauTy detect higher-rank contexts

Previously, `isTauTy` would only detect higher-rank `forall`s, not
higher-rank contexts, which led to some minor bugs observed
in #18127. Easily fixed by adding a case for
`(FunTy InvisArg _ _)`.

Fixes #18127.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/a95e7fe02efd2fdeec91ba46de64bc78c81381eb">a95e7fe0</a></strong>
<div>
<span>by Ömer Sinan Ağacan</span>
<i>at 2020-05-06T04:42:39-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">ELF linker: increment curSymbol after filling in fields of current entry

The bug was introduced in a8b7cef4d45 which added a field to the
`symbols` array elements and then updated this code incorrectly:

    - oc->symbols[curSymbol++] = nm;
    + oc->symbols[curSymbol++].name = nm;
    + oc->symbols[curSymbol].addr = symbol->addr;
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/cab1871ab93feeacf2bf9a1c65b1c919ca9c5399">cab1871a</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-05-06T04:43:21-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Move LeadingUnderscore into Platform (#17957)

Avoid direct use of DynFlags to know if symbols must be prefixed by an
underscore.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/94e7c563ab24fe452a16900a6777349970df1945">94e7c563</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-05-06T04:43:21-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Don't use DynFlags in showLinkerState (#17957)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9afd92512b41cf6c6de3a17b474d8d4bb01158c3">9afd9251</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-05-06T04:43:58-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Refactoring: Use bindSigTyVarsFV in rnMethodBinds

`rnMethodBinds` was explicitly using `xoptM` to determine if
`ScopedTypeVariables` is enabled before bringing type variables
bound by the class/instance header into scope. However, this `xoptM`
logic is already performed by the `bindSigTyVarsFV` function. This
patch uses `bindSigTyVarsFV` in `rnMethodBinds` to reduce the number
of places where we need to consult if `ScopedTypeVariables` is on.

This is purely refactoring, and there should be no user-visible
change in behavior.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6f6d72b2c382860a5f7a08779b2405da8473814c">6f6d72b2</a></strong>
<div>
<span>by Brian Foley</span>
<i>at 2020-05-08T15:29:25-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Remove further dead code found by a simple Python script.

Avoid removing some functions that are part of an API even
though they're not used in-tree at the moment.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/78bf8bf967551f8667b766328504cfbd24df9bfb">78bf8bf9</a></strong>
<div>
<span>by Julien Debon</span>
<i>at 2020-05-08T15:29:28-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add doc examples for Bifoldable

See #17929
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/66f0a847255f15ec656a37d639556b7918f6aac2">66f0a847</a></strong>
<div>
<span>by Julien Debon</span>
<i>at 2020-05-08T15:29:29-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">doc (Bitraversable): Add examples to Bitraversable

* Add examples to Data.Bitraversable
* Fix formatting for (,) in Bitraversable and Bifoldable
* Fix mistake on bimapAccumR documentation

See #17929
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9749fe1223d182b1f8e7e4f7378df661c509f396">9749fe12</a></strong>
<div>
<span>by Baldur Blöndal</span>
<i>at 2020-05-08T15:29:32-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Specify kind variables for inferred kinds in base.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4e9aef9ea732e8157ee0b7fbb85b2cdfbf49de5f">4e9aef9e</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-05-08T15:29:36-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">HsSigWcTypeScoping: Pull in documentation from stray location
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f4d5c6df56a28be5448acf43e4f45b1695ae9eb5">f4d5c6df</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-05-08T15:29:36-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Rename local `real_fvs` to `implicit_vs`

It doesn't make sense to call the "free" variables we are about to
implicitly bind the real ones.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/20570b4b5e741912d1dc3f1826ee1f78e33f3b90">20570b4b</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-05-08T15:29:36-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">A few tiny style nits with renaming

 - Use case rather than guards that repeatedly scrutenize same thing.

 - No need for view pattern when `L` is fine.

 - Use type synnonym to convey the intent like elsewhere.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/09ac8de5777d5ca953279a6c0ee42a6fba0fcba6">09ac8de5</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-05-08T15:29:36-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add `forAllOrNothing` function with note
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/bb35c0e573b0bc8fe6a28c00734fa124da02a755">bb35c0e5</a></strong>
<div>
<span>by Joseph C. Sible</span>
<i>at 2020-05-08T15:29:40-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Document lawlessness of Ap's Num instance</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/cdd229fff24ab19a41dd2af218108dd8c514fff7">cdd229ff</a></strong>
<div>
<span>by Joseph C. Sible</span>
<i>at 2020-05-08T15:29:40-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Apply suggestion to libraries/base/Data/Monoid.hs</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/926d2aab83dc6068cba76f71a19b040eddc6dee9">926d2aab</a></strong>
<div>
<span>by Joseph C. Sible</span>
<i>at 2020-05-08T15:29:40-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Apply more suggestions from Simon Jakobi</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7a763cff78d2d4b23d05554e68138678cb4ba627">7a763cff</a></strong>
<div>
<span>by Adam Gundry</span>
<i>at 2020-05-08T15:29:41-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Reject all duplicate declarations involving DuplicateRecordFields (fixes #17965)

This fixes a bug that resulted in some programs being accepted that used the same
identifier as a field label and another declaration, depending on the order they
appeared in the source code.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/88e3c8150d2b2d96c3ebc0b2942c9af44071c511">88e3c815</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-05-08T15:29:41-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix specialisation for DFuns

When specialising a DFun we must take care to saturate the
unfolding.  See Note [Specialising DFuns] in Specialise.

Fixes #18120
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/86c77b36628dcce7bc9b066fc24c8c521fecc3ee">86c77b36</a></strong>
<div>
<span>by Greg Steuck</span>
<i>at 2020-05-08T15:29:45-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Remove unused SEGMENT_PROT_RWX

It's been unused for a year and is problematic on any OS which
requires W^X for security.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2c845e8579d22f4d6aed8a8eb8e22e4f1ed5ec28">2c845e85</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-05-09T07:34:53-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">WIP: Factor out HsPatSigType for pat sigs/RULE term sigs (#16762)

This implements chunks (2) and (3) of
https://gitlab.haskell.org/ghc/ghc/issues/16762#note_270170. Namely,
it introduces a dedicated `HsPatSigType` AST type, which represents
the types that can appear in pattern signatures and term-level `RULE`
binders. Previously, these were represented with `LHsSigWcType`.
Although `LHsSigWcType` is isomorphic to `HsPatSigType`, the intended
semantics of the two types are slightly different, as evidenced by
the fact that they have different code paths in the renamer and
typechecker.

See also the new `Note [Pattern signature binders and scoping]` in
`GHC.Hs.Types`.
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#db697f6aea9f93f1583f1d5c62d25570a1e07f73">
compiler/GHC/Cmm/CLabel.hs
</a>
</li>
<li class="file-stats">
<a href="#f9f29a5a64a0b66967f0a7c538dbf8ad06a9f5bb">
compiler/GHC/Cmm/Utils.hs
</a>
</li>
<li class="file-stats">
<a href="#383a469809c6f6c238dbf10f7eb5e6e6ec7eae6e">
compiler/GHC/CmmToAsm/PPC/Cond.hs
</a>
</li>
<li class="file-stats">
<a href="#b8960ccd7a97c06d974e6369b8b4b019d8fee8aa">
compiler/GHC/CmmToAsm/SPARC/Cond.hs
</a>
</li>
<li class="file-stats">
<a href="#0f6d4f3a187ff5a5b59934f5a93adf2d4eed24ad">
compiler/GHC/CmmToAsm/X86/Cond.hs
</a>
</li>
<li class="file-stats">
<a href="#b5ac041c7f79084a7a7626eda4cdadda3457d235">
compiler/GHC/CmmToLlvm/Base.hs
</a>
</li>
<li class="file-stats">
<a href="#ab22d7ae4d245581b701367e386d7e886e416e76">
compiler/GHC/Core/Opt/Specialise.hs
</a>
</li>
<li class="file-stats">
<a href="#84c9d3ba34173297e7d7747e02caa2e004b164fc">
compiler/GHC/Core/Type.hs
</a>
</li>
<li class="file-stats">
<a href="#2811a7297b8aa206197ac1f5dabd0818e3c7ec5a">
compiler/GHC/Core/Unfold.hs
</a>
</li>
<li class="file-stats">
<a href="#9a679a2680ef6061397f1987091ea9f96ffe095d">
compiler/GHC/Driver/Main.hs
</a>
</li>
<li class="file-stats">
<a href="#774d88050336ef660c7a219fb06c480c2fc639bc">
compiler/GHC/Driver/Session.hs
</a>
</li>
<li class="file-stats">
<a href="#75bfcd03f3ba9315d33104fcb0424c6bfeb4e334">
compiler/GHC/Hs/Decls.hs
</a>
</li>
<li class="file-stats">
<a href="#576dff4e64fa03683ffc5dcdd58284acdd70bc8e">
compiler/GHC/Hs/Extension.hs
</a>
</li>
<li class="file-stats">
<a href="#9f00edfedb0f969865b049a78de3866545b4a60b">
compiler/GHC/Hs/Instances.hs
</a>
</li>
<li class="file-stats">
<a href="#0bae7e7e67b5f9b6ba2a371f8917cf74423a0c6f">
compiler/GHC/Hs/Pat.hs
</a>
</li>
<li class="file-stats">
<a href="#8cd3d37b8a77c01a0e798e67591fc3ea9c34c9ec">
compiler/GHC/Hs/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#65e2067fbb7377818b6cadff0531f44029499948">
compiler/GHC/HsToCore/Binds.hs
</a>
</li>
<li class="file-stats">
<a href="#8d8e5922fde8bc19ffa2bc9cae6b6720abb88564">
compiler/GHC/HsToCore/PmCheck/Oracle.hs
</a>
</li>
<li class="file-stats">
<a href="#3c19c0be465f9a28d7b69f89c55648080fcc37eb">
compiler/GHC/HsToCore/Quote.hs
</a>
</li>
<li class="file-stats">
<a href="#649144a78135a23cabfc90dd83c4aabf448eb6ab">
compiler/GHC/Iface/Ext/Ast.hs
</a>
</li>
<li class="file-stats">
<a href="#699117ec0ed92a01cc9116db16477e81cd1e2ff6">
compiler/GHC/Iface/Ext/Binary.hs
</a>
</li>
<li class="file-stats">
<a href="#446cb12ca6cefaf1c6eb79b7db643632744263c7">
compiler/GHC/Parser/PostProcess.hs
</a>
</li>
<li class="file-stats">
<a href="#4a238b7fd965f958b107d110c96d07962d7a83ec">
compiler/GHC/Plugins.hs
</a>
</li>
<li class="file-stats">
<a href="#af762064d779f7308dd415966c974f27d14f9943">
compiler/GHC/Rename/Bind.hs
</a>
</li>
<li class="file-stats">
<a href="#b47ece2bbb8303a5792c2fdc52394c8ed336e8a2">
compiler/GHC/Rename/Expr.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="#e05ee69330b0f7088f11a5f3567137547489664d">
compiler/GHC/Rename/Names.hs
</a>
</li>
<li class="file-stats">
<a href="#cfa41b5649933e5b12f7796e9d49b9dd6a0bc59f">
compiler/GHC/Rename/Pat.hs
</a>
</li>
<li class="file-stats">
<a href="#3556223cd3ef45d787321b5290bf33535a361873">
compiler/GHC/Runtime/Linker.hs
</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/af9b43409fc2e65d6a7fdd9b95c484ab9cb0a9de...2c845e8579d22f4d6aed8a8eb8e22e4f1ed5ec28">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>