<!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/T18412
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/118e1c3da622f17c67b4e0fbc12ed7c7084055dc">118e1c3d</a></strong>
<div>
<span>by Alp Mestanogullari</span>
<i>at 2020-07-14T21:30:52-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">compiler: re-engineer the treatment of rebindable if

Executing on the plan described in #17582, this patch changes the way if expressions
are handled in the compiler in the presence of rebindable syntax. We get rid of the
SyntaxExpr field of HsIf and instead, when rebindable syntax is on, we rewrite the HsIf
node to the appropriate sequence of applications of the local `ifThenElse` function.

In order to be able to report good error messages, with expressions as they were
written by the user (and not as desugared by the renamer), we make use of TTG
extensions to extend GhcRn expression ASTs with an `HsExpansion` construct, which
keeps track of a source (GhcPs) expression and the desugared (GhcRn) expression that
it gives rise to. This way, we can typecheck the latter while reporting the former in
error messages.

In order to discard the error context lines that arise from typechecking the desugared
expressions (because they talk about expressions that the user has not written), we
carefully give a special treatment to the nodes fabricated by this new renaming-time
transformation when typechecking them. See Note [Rebindable syntax and HsExpansion]
for more details. The note also includes a recipe to apply the same treatment to
other rebindable constructs.

Tests 'rebindable11' and 'rebindable12' have been added to make sure we report
identical error messages as before this patch under various circumstances.

We also now disable rebindable syntax when processing untyped TH quotes, as per
the discussion in #18102 and document the interaction of rebindable syntax and
Template Haskell, both in Note [Template Haskell quotes and Rebindable Syntax]
and in the user guide, adding a test to make sure that we do not regress in
that regard.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/64c774b043a2d9be3b98e445990c795f070dab3f">64c774b0</a></strong>
<div>
<span>by Andreas Klebinger</span>
<i>at 2020-07-14T21:31:27-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Explain why keeping DynFlags in AnalEnv saves allocation.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/254245d01e3c1d4f9072abc4372fd3fb0a6ece9f">254245d0</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-07-14T21:32:03-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">docs/users-guide: Update default -funfolding-use-threshold value

This was changed in 3d2991f8 but I neglected to update the
documentation. Fixes #18419.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4c259f86938f4016f4bd4fde7a300fa83591036f">4c259f86</a></strong>
<div>
<span>by Andreas Klebinger</span>
<i>at 2020-07-14T21:32:41-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Escape backslashes in json profiling reports properly.

I also took the liberty to do away the fixed buffer size for escaping.
Using a fixed size here can only lead to issues down the line.

Fixes #18438.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2379722438cb551210c4899119ade05989c17166">23797224</a></strong>
<div>
<span>by Sergei Trofimovich</span>
<i>at 2020-07-14T21:33:19-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">.gitlab: re-enable integer-simple substitute (BIGNUM_BACKEND)

Recently build system migrated from INTEGER_LIBRARY to BIGNUM_BACKEND.
But gitlab CI was never updated. Let's enable BIGNUM_BACKEND=native.

Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/18437
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e0db878a789e58c2a1aba2e73d42857008174124">e0db878a</a></strong>
<div>
<span>by Sergei Trofimovich</span>
<i>at 2020-07-14T21:33:19-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">ghc-bignum: bring in sync .hs-boot files with module declarations

Before this change `BIGNUM_BACKEND=native` build was failing as:

```
libraries/ghc-bignum/src/GHC/Num/BigNat/Native.hs:708:16: error:
    * Variable not in scope: naturalFromBigNat# :: WordArray# -> t
    * Perhaps you meant one of these:
        `naturalFromBigNat' (imported from GHC.Num.Natural),
        `naturalToBigNat' (imported from GHC.Num.Natural)
    |
708 |           m' = naturalFromBigNat# m
    |
```

This happens because `.hs-boot` files are slightly out of date.
This change brings in data and function types in sync.

Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/18437
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c9f65c369a60467dcaf2b37d5f41f00565b4fe25">c9f65c36</a></strong>
<div>
<span>by Stefan Schulze Frielinghaus</span>
<i>at 2020-07-14T21:33:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Disassembler.c: Use FMT_HexWord for printing values in hex format
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/58ae62ebb5750e4dfbdb171efde8e3064b7afea8">58ae62eb</a></strong>
<div>
<span>by Matthias Andreas Benkard</span>
<i>at 2020-07-14T21:34:35-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">macOS: Load frameworks without stating them first.

macOS Big Sur makes the following change to how frameworks are shipped
with the OS:

> New in macOS Big Sur 11 beta, the system ships with a built-in
> dynamic linker cache of all system-provided libraries. As part of
> this change, copies of dynamic libraries are no longer present on
> the filesystem. Code that attempts to check for dynamic library
> presence by looking for a file at a path or enumerating a directory
> will fail. Instead, check for library presence by attempting to
> dlopen() the path, which will correctly check for the library in the
> cache. (62986286)

https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11-beta-release-notes/

Therefore, the previous method of checking whether a library exists
before attempting to load it makes GHC.Runtime.Linker.loadFramework
fail to find frameworks installed at /System/Library/Frameworks.

GHC.Runtime.Linker.loadFramework now opportunistically loads the
framework libraries without checking for their existence first,
failing only if all attempts to load a given framework from any of the
various possible locations fail.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/cdc4a6b0f71bbd16a11f23e455b28c0c15720b38">cdc4a6b0</a></strong>
<div>
<span>by Matthias Andreas Benkard</span>
<i>at 2020-07-14T21:34:35-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">loadFramework: Output the errors collected in all loading attempts.

With the recent change away from first finding and then loading a
framework, loadFramework had no way of communicating the real reason
why loadDLL failed if it was any reason other than the framework
missing from the file system.  It now collects all loading attempt
errors into a list and concatenates them into a string to return to
the caller.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/51dbfa52df483822b99bb191d2ffc0943954e1d3">51dbfa52</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-07-15T04:05:34-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">StgToCmm: Use CmmRegOff smart constructor

Previously we would generate expressions of the form
`CmmRegOff BaseReg 0`. This should do no harm (and really should be
handled by the NCG anyways) but it's better to just generate a plain
`CmmReg`.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ae11bdfd98a10266bfc7de9e16b500be220307ac">ae11bdfd</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-07-15T04:06:08-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Add regression test for #17744

Test due to @monoidal.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7e741433dc7c8e52121c85ad9e8e520da4d54bd8">7e741433</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-07-15T09:42:46+01:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Allow multiple case branches to have a higher rank type

As #18412 points out, it should be OK for multiple case alternatives
to have a higher rank type, provided they are all the same.

This patch implements that change.  It sweeps away
GHC.Tc.Gen.Match.tauifyMultipleBranches, and friends, replacing it
with an enhanced version of fillInferResult.

The basic change to fillInferResult is to permit the case in which
another case alternative has already filled in the result; and in
that case simply unify.  It's very simple actually.

See the new Note [fillInferResult] in TcMType

Other refactoring:

- Move all the InferResult code to one place, in GHC.Tc.Utils.TcMType
  (previously some of it was in Unify)

- Move tcInstType and friends from TcMType to Instantiate, where it
  more properly belongs.  (TCMType was getting very long.)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/52bdb5bb05bd6c10b84c69e98587f4e1b65110e1">52bdb5bb</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-07-15T09:42:46+01:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Improve typechecking of NPlusK patterns

This patch (due to Richard Eisenberg) improves
documentation of the wrapper returned by tcSubMult
(see Note [Wrapper returned from tcSubMult] in
 GHC.Tc.Utils.Unify).

And, more substantially, it cleans up the multiplicity
handling in the typechecking of NPlusKPat
</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="#157f7634c25bc6366cb7c9c9edb48e819dce38db">
.gitlab/ci.sh
</a>
</li>
<li class="file-stats">
<a href="#5f4b3cf094f6e2fc46805a6c447613ae13a08942">
<span class="new-file">
+
compiler/GHC/Builtin/RebindableNames.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#8104fa1b71db6cfc4eb90cd769463d9eb9004619">
compiler/GHC/Core/Opt/DmdAnal.hs
</a>
</li>
<li class="file-stats">
<a href="#578c7c3857d66d963736ff6742f3433a0e8d01b7">
compiler/GHC/Core/TyCo/Rep.hs
</a>
</li>
<li class="file-stats">
<a href="#84c9d3ba34173297e7d7747e02caa2e004b164fc">
compiler/GHC/Core/Type.hs
</a>
</li>
<li class="file-stats">
<a href="#f157d5c316465070f94641e4c9ab0248311588cd">
compiler/GHC/Core/UsageEnv.hs
</a>
</li>
<li class="file-stats">
<a href="#cc97d81e7223ad4a3a5e801156ca632f9fa75654">
compiler/GHC/Hs/Expr.hs
</a>
</li>
<li class="file-stats">
<a href="#9f00edfedb0f969865b049a78de3866545b4a60b">
compiler/GHC/Hs/Instances.hs
</a>
</li>
<li class="file-stats">
<a href="#7a1af22e4c32b9aa6ec708d9d3788e1c4db5da9a">
compiler/GHC/Hs/Utils.hs
</a>
</li>
<li class="file-stats">
<a href="#65e2067fbb7377818b6cadff0531f44029499948">
compiler/GHC/HsToCore/Binds.hs
</a>
</li>
<li class="file-stats">
<a href="#e011edcbdb6414ff00022ab5c1eeee88906a53ab">
compiler/GHC/HsToCore/Coverage.hs
</a>
</li>
<li class="file-stats">
<a href="#6bdd5abc649727f2a802bc96ce5c276de19d3726">
compiler/GHC/HsToCore/Expr.hs
</a>
</li>
<li class="file-stats">
<a href="#085703923f9c18f6ac9f926ac9a4c7c7e6d9d9ed">
compiler/GHC/HsToCore/Match.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="#86d694037d496c511e28b2c09c8410f67dc19596">
compiler/GHC/Rename/Env.hs
</a>
</li>
<li class="file-stats">
<a href="#b47ece2bbb8303a5792c2fdc52394c8ed336e8a2">
compiler/GHC/Rename/Expr.hs
</a>
</li>
<li class="file-stats">
<a href="#16b273b96a1c03d4261e2ac6de4cc456ba2dd014">
compiler/GHC/Rename/Splice.hs
</a>
</li>
<li class="file-stats">
<a href="#3556223cd3ef45d787321b5290bf33535a361873">
compiler/GHC/Runtime/Linker.hs
</a>
</li>
<li class="file-stats">
<a href="#a7fcc734b34b00498cf1eb5792d2f328ca3696ea">
compiler/GHC/StgToCmm/CgUtils.hs
</a>
</li>
<li class="file-stats">
<a href="#902811828741e6bcd64702935bbb54edbbd070ef">
compiler/GHC/Tc/Gen/Expr.hs
</a>
</li>
<li class="file-stats">
<a href="#3377164bfe9a1f1a8cfd588703ae1e0ea1e91cf9">
compiler/GHC/Tc/Gen/Match.hs
</a>
</li>
<li class="file-stats">
<a href="#3ee8be814b6c6727880deab3772e6af922524bf0">
compiler/GHC/Tc/Gen/Pat.hs
</a>
</li>
<li class="file-stats">
<a href="#eade747fa0a15693c67617629e286714fce958e4">
compiler/GHC/Tc/Gen/Sig.hs
</a>
</li>
<li class="file-stats">
<a href="#aebe2c3d616f6843166d2657bed048898add6bc9">
compiler/GHC/Tc/Instance/Class.hs
</a>
</li>
<li class="file-stats">
<a href="#07389a8f0516c26409d86f6bb651ed00759b5d4c">
compiler/GHC/Tc/Instance/Family.hs
</a>
</li>
<li class="file-stats">
<a href="#dd8bbe6a21866e4f574f4796b7ad19de17564072">
compiler/GHC/Tc/TyCl/Class.hs
</a>
</li>
<li class="file-stats">
<a href="#7dcf5b567a6cd3c9d98cf8d57323fbca1b1536e9">
compiler/GHC/Tc/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#46e7b59eca287d43c19d0d8902b41f5d04f0d268">
compiler/GHC/Tc/Types/Evidence.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/20037a90d0a8a24a5dc31603cd2374f769e4f109...52bdb5bb05bd6c10b84c69e98587f4e1b65110e1">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>