<!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>
Simon Peyton Jones pushed to branch wip/T16296
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/5cbf9934c59f7726781cc4cccf4748a5c09c4997">5cbf9934</a></strong>
<div>
<span>by Andreas Klebinger</span>
<i>at 2020-03-19T00:39:27-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Update "GHC differences to the FFI Chapter" in user guide.

The old entry had a heavy focus on how things had been. Which is
not what I generally look for in a user guide.

I also added a small section on behaviour of nested safe ffi calls.

[skip-ci]
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b03fd3bcd4ff14aed2942275c3b0db5392dc913c">b03fd3bc</a></strong>
<div>
<span>by Sebastian Graf</span>
<i>at 2020-03-19T00:40:06-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">PmCheck: Use ConLikeSet to model negative info

In #17911, Simon recognised many warnings stemming from over-long list
unions while coverage checking Cabal's `LicenseId` module.

This patch introduces a new `PmAltConSet` type which uses a `UniqDSet`
instead of an association list for `ConLike`s. For `PmLit`s, it will
still use an assocation list, though, because a similar map data
structure would entail a lot of busy work.

Fixes #17911.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/64f207566931469648e791df4f0f0384d45cddd0">64f20756</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-03-19T12:16:49-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Refactoring: use Platform instead of DynFlags when possible

Metric Decrease:
    ManyConstructors
    T12707
    T13035
    T1969
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/cb1785d9f839e34a3a4892f354f0c51cc6553c0e">cb1785d9</a></strong>
<div>
<span>by Ömer Sinan Ağacan</span>
<i>at 2020-03-19T12:16:54-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">FastString: fix eager reading of string ptr in hashStr

This read causes NULL dereferencing when len is 0.

Fixes #17909

In the reproducer in #17909 this bug is triggered as follows:

- SimplOpt.dealWithStringLiteral is called with a single-char string
  ("=" in #17909)

- tailFS gets called on the FastString of the single-char string.

- tailFS checks the length of the string, which is 1, and calls
  mkFastStringByteString on the tail of the ByteString, which is an
  empty ByteString as the original ByteString has only one char.

- ByteString's unsafeUseAsCStringLen returns (NULL, 0) for the empty
  ByteString, which is passed to mkFastStringWith.

- mkFastStringWith gets hash of the NULL pointer via hashStr, which
  fails on empty strings because of this bug.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/73a7383ebc17f495d7acd04007c8c56b46532cb6">73a7383e</a></strong>
<div>
<span>by Richard Eisenberg</span>
<i>at 2020-03-20T20:42:56-04:00</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>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/faa36e5b3674a7b2cfc6b931eec27b3558fad33b">faa36e5b</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-03-20T20:43:41-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Hadrian: ignore in-tree GMP objects with ``--lint``
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9a96ff6b1c19c9d0af9c9a39fb2c086f311c7239">9a96ff6b</a></strong>
<div>
<span>by Richard Eisenberg</span>
<i>at 2020-03-20T20:44:17-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Update core spec to reflect changes to Core.

Key changes:
 * Adds a new rule for forall-coercions over coercion variables, which
was implemented but conspicuously missing from the spec.
 * Adds treatment for FunCo.
 * Adds treatment for ForAllTy over coercion variables.
 * Improves commentary (including restoring a Note lost in
03d4852658e1b7407abb4da84b1b03bfa6f6db3b) in the source.

No changes to running code.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7e0451c6ce78b08b5f7564aa03a9a86051b35163">7e0451c6</a></strong>
<div>
<span>by Sergej Jaskiewicz</span>
<i>at 2020-03-20T20:44:55-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix event message in withTiming'

This typo caused generating 'end' events without the corresponding 'begin' events.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1542a626a3649e5fc1becec1eff2715a6108d144">1542a626</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-03-22T22:37:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">fs.h: Add missing declarations on Windows
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3bcf2ccdd0bdd3cf176943ddb946e4fcef2ac7c1">3bcf2ccd</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-03-22T22:37:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Bump process submodule

Avoids redundant case alternative warning.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3b363ef9405c52369b63fc167ded8a533c6a5079">3b363ef9</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-03-22T22:37:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Normalize slashes in ghc-api annotations output

Enable `normalise_slashes` on `annotations`, `listcomps`, and
`parseTree` to fix Windows failures.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/25fc94295c68620c6928751aaadc46b11a185f0c">25fc9429</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-03-22T22:37:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Update expected output on Windows
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7f58ec6d94f49cf5713757710c6b80a682ee066b">7f58ec6d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-03-22T22:37:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Fix TOP of T17786
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/aadcd909563d5ddf7b2fc469ee3c09c301b1a813">aadcd909</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-03-22T22:37:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Update expected output on Windows
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/dc1eb10dae03f3fe5f11de845c6772c229684c28">dc1eb10d</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-03-22T22:37:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">hadrian: Fix executable extension passed to testsuite driver
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/58f62e2caa19e13082807da1d49f94e9cf869322">58f62e2c</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-03-22T22:37:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">gitlab-ci: Require that Windows-hadrian job passes
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8dd2415dd2f423688f33a8fb267857e3ff39754d">8dd2415d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-03-22T22:37:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">hadrian: Eliminate redundant .exe from GHC path

Previously we were invoking:

    bash -c
    "c:/GitLabRunner/builds/eEQrxK4p/0/ghc/ghc/toolchain/bin/ghc.exe.exe
    testsuite/mk/ghc-config.hs -o _build/test/bin/ghc-config.exe"
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/373621f61f812accdeba39c745eb7d015430ff8e">373621f6</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-03-22T22:37:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Bump hsc2hs submodule
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/abc02b4036c2d8efe50b720d8c8103c4f1b8899a">abc02b40</a></strong>
<div>
<span>by Hécate</span>
<i>at 2020-03-22T22:38:33-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Annotate the non-total function in Data.Foldable as such
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/19f125578247dfe8036b5793cb3f6b684474f9c7">19f12557</a></strong>
<div>
<span>by Josef Svenningsson</span>
<i>at 2020-03-23T14:05:33-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix ApplicativeDo regression #17835

A previous fix for #15344 made sure that monadic 'fail' is used properly
when translating ApplicativeDo. However, it didn't properly account
for when a 'fail' will be inserted which resulted in some programs
failing with a type error.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2643ba465cd2a133b6f495f34fc59cd1a6d23525">2643ba46</a></strong>
<div>
<span>by Paavo</span>
<i>at 2020-03-24T08:31:32-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add example and doc for Arg (Fixes #17153)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/703221f408b023a1b3433938572e7b5c24b4af60">703221f4</a></strong>
<div>
<span>by Roland Senn</span>
<i>at 2020-03-25T14:45:04-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Use export list of Main module in function TcRnDriver.hs:check_main (Fix #16453)

- Provide the export list of the `Main` module as parameter to the
  `compiler/typecheck/TcRnDriver.hs:check_main` function.
- Instead of `lookupOccRn_maybe` call the function `lookupInfoOccRn`.
  It returns the list `mains_all` of all the main functions in scope.
- Select from this list `mains_all` all `main` functions that are in
  the export list of the `Main` module.
- If this new list contains exactly one single `main` function, then
  typechecking continues.
- Otherwise issue an appropriate error message.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3e27205a66b06a4501d87eb31e285eadbc693eb7">3e27205a</a></strong>
<div>
<span>by Sebastian Graf</span>
<i>at 2020-03-25T14:45:40-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Remove -fkill-absence and -fkill-one-shot flags

They seem to be a benchmarking vestige of the Cardinality paper and
probably shouldn't have been merged to HEAD in the first place.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c31b19211f64bfbfb1a70d02d443e4b1b1023b7d">c31b1921</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-03-26T10:04:26+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Re-engineer the binder-swap transformation

The binder-swap transformation is implemented by the occurrence
analyser -- see Note [Binder swap] in OccurAnal. However it had
a very nasty corner in it, for the case where the case scrutinee
was a GlobalId.  This led to trouble and hacks, and ultimately
to #16296.

This patch re-engineers how the occurrence analyser implements
the binder-swap, by actually carrying out a substitution rather
than by adding a let-binding.  It's all described in
Note [The binder-swap substitution].

I did a few other things along the way

* Fix a bug in StgCse, which could allow a loop breaker to be CSE'd
  away.  See Note [Care with loop breakers] in StgCse.  I think it can
  only show up if occurrence analyser sets up bad loop breakers, but
  still.

* Better commenting in SimplUtils.prepareAlts

* A little refactoring in CoreUnfold; nothing significant
  e.g. rename CoreUnfold.mkTopUnfolding to mkFinalUnfolding

* Renamed CoreSyn.isFragileUnfolding to hasCoreUnfolding

* Move mkRuleInfo to CoreFVs
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#587d266bb27a4dc3022bbed44dfa19849df3044c">
.gitlab-ci.yml
</a>
</li>
<li class="file-stats">
<a href="#412267f7d5ed866deae5ac2ca598ff8092b826b6">
.gitlab/linters/check-cpp.py
</a>
</li>
<li class="file-stats">
<a href="#2f6f8d6d05acc04b08fff94df4b3996c65b87892">
compiler/GHC/ByteCode/Asm.hs
</a>
</li>
<li class="file-stats">
<a href="#d088ba20f051734394bf7ca283f33ed8127bc8ab">
compiler/GHC/Cmm/CallConv.hs
</a>
</li>
<li class="file-stats">
<a href="#92b713d88390e6ea489e24b6cff8a3960384c0d0">
compiler/GHC/Cmm/DebugBlock.hs
</a>
</li>
<li class="file-stats">
<a href="#56e23d78cfece2c83f03ed9b9a8ce9b20be26462">
compiler/GHC/Cmm/Expr.hs
</a>
</li>
<li class="file-stats">
<a href="#29368208fbfcaee57ce84000cdccaba639e85a75">
compiler/GHC/Cmm/Graph.hs
</a>
</li>
<li class="file-stats">
<a href="#47cba74ae8965f1665cd11bf2b023760ea27594e">
compiler/GHC/Cmm/Info.hs
</a>
</li>
<li class="file-stats">
<a href="#2d3721ad8de95e1144493ca545db846672cb109f">
compiler/GHC/Cmm/Info/Build.hs
</a>
</li>
<li class="file-stats">
<a href="#066085df29cc928ac539d8feae6e5215cbbf1e14">
compiler/GHC/Cmm/LayoutStack.hs
</a>
</li>
<li class="file-stats">
<a href="#cf82b82d6e47b3c81686a3340668a31ce028e2a1">
compiler/GHC/Cmm/Lint.hs
</a>
</li>
<li class="file-stats">
<a href="#c898e00d01234ab22d3b485be68db3645f52f220">
compiler/GHC/Cmm/MachOp.hs
</a>
</li>
<li class="file-stats">
<a href="#00c27365316e033b00cc3ed3854ac8714d25a2b5">
compiler/GHC/Cmm/Opt.hs
</a>
</li>
<li class="file-stats">
<a href="#71e696f452eb493722d70306c6f304fc9b2f6a95">
compiler/GHC/Cmm/Parser.y
</a>
</li>
<li class="file-stats">
<a href="#d40f34584a7f4c0fa7587fb41f94a34bca0d1064">
compiler/GHC/Cmm/Pipeline.hs
</a>
</li>
<li class="file-stats">
<a href="#bbf4b351b327473b112c1d212f720f929c5ce247">
compiler/GHC/Cmm/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#00d7e888201d1d21d9b428cc9fd4aea68631c109">
compiler/GHC/Cmm/Ppr/Decl.hs
</a>
</li>
<li class="file-stats">
<a href="#06534118b13fde308672bb803fca91a8a50ded0c">
compiler/GHC/Cmm/Ppr/Expr.hs
</a>
</li>
<li class="file-stats">
<a href="#b1390f6749e1a2dddcae35f88d55623ea6269f56">
compiler/GHC/Cmm/Sink.hs
</a>
</li>
<li class="file-stats">
<a href="#f8bd883e3d3136150937961aaca9b45779a06100">
compiler/GHC/Cmm/Switch/Implement.hs
</a>
</li>
<li class="file-stats">
<a href="#7296b8b156359e17fb0fad7b82eaee2db3294144">
compiler/GHC/Cmm/Type.hs
</a>
</li>
<li class="file-stats">
<a href="#f9f29a5a64a0b66967f0a7c538dbf8ad06a9f5bb">
compiler/GHC/Cmm/Utils.hs
</a>
</li>
<li class="file-stats">
<a href="#10b61652f9817945bb54ccf8fc40f8a664ca3c30">
compiler/GHC/CmmToAsm.hs
</a>
</li>
<li class="file-stats">
<a href="#ce4acbced40df8012ccc56db501549f835fb180b">
compiler/GHC/CmmToAsm/PIC.hs
</a>
</li>
<li class="file-stats">
<a href="#f71fa75baa7807186473f09c45a9ada1b72f4c6c">
compiler/GHC/CmmToAsm/PPC/CodeGen.hs
</a>
</li>
<li class="file-stats">
<a href="#3022d7d8a06ba257d13bbd18a3347522287aa684">
compiler/GHC/CmmToAsm/PPC/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#e76eae04dea432f874db91c25e4a5725d7cc127b">
compiler/GHC/CmmToAsm/SPARC/CodeGen.hs
</a>
</li>
<li class="file-stats">
<a href="#e0730df39f20b55b444065b468db78e160c594af">
compiler/GHC/CmmToAsm/SPARC/CodeGen/Amode.hs
</a>
</li>
<li class="file-stats">
<a href="#2892194edc6317f317205814e79ce0241e8ff8c6">
compiler/GHC/CmmToAsm/SPARC/CodeGen/Base.hs
</a>
</li>
<li class="file-stats">
<a href="#25ea7a545d077a16594685f8913b0d241a606eec">
compiler/GHC/CmmToAsm/SPARC/CodeGen/CondCode.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/1276e27512d7a79c4cb64dd6366178551286e957...c31b19211f64bfbfb1a70d02d443e4b1b1023b7d">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>