<!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/T18126
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/5c7387f6f8896a34af25f8a28a78095e22287752">5c7387f6</a></strong>
<div>
<span>by Leif Metcalf</span>
<i>at 2020-09-17T08:51:43-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Make Z-encoding comment into a note
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c12b3041e533962b8d0ac9ee44e928f874c11671">c12b3041</a></strong>
<div>
<span>by Leif Metcalf</span>
<i>at 2020-09-17T08:51:43-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Cosmetic
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4f461e1a31263f052effd03738b11ea123512cb0">4f461e1a</a></strong>
<div>
<span>by Vladislav Zavialov</span>
<i>at 2020-09-17T08:52:19-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Parser.y: clarify treatment of @{-# UNPACK #-}

Before this patch, we had this parser production:

        ftype : ...
              | ftype PREFIX_AT tyarg  { ... }

And 'tyarg' is defined as follows:

        tyarg : atype              { ... }
              | unpackedness atype { ... }

So one might get the (false) impression that that parser production is
intended to parse things like:

        F @{-# UNPACK #-} X

However, the lexer wouldn't produce PREFIX_AT followed by 'unpackedness',
as the '@' operator followed by '{-' is not considered prefix.

Thus there's no point using 'tyarg' after PREFIX_AT,
and a simple 'atype' will suffice:

        ftype : ...
              | ftype PREFIX_AT atype  { ... }

This change has no user-facing consequences. It just makes the grammar a
bit more clear.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9dec8600ad4734607bea2b4dc3b40a5af788996b">9dec8600</a></strong>
<div>
<span>by Benjamin Maurer</span>
<i>at 2020-09-17T08:52:56-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Documented '-m' flags for machine specific instruction extensions.
See #18641 'Documenting the Expected Undocumented Flags'
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ca48076ae866665913b9c81cbc0c76f0afef7a00">ca48076a</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-09-17T20:04:08-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Introduce OutputableP

Some types need a Platform value to be pretty-printed: CLabel, Cmm
types, instructions, etc.

Before this patch they had an Outputable instance and the Platform value
was obtained via sdocWithDynFlags. It meant that the *renderer* of the
SDoc was responsible of passing the appropriate Platform value (e.g. via
the DynFlags given to showSDoc).  It put the burden of passing the
Platform value on the renderer while the generator of the SDoc knows the
Platform it is generating the SDoc for and there is no point passing a
different Platform at rendering time.

With this patch, we introduce a new OutputableP class:

   class OutputableP a where
      pdoc :: Platform -> a -> SDoc

With this class we still have some polymorphism as we have with `ppr`
(i.e. we can use `pdoc` on a variety of types instead of having a
dedicated `pprXXX` function for each XXX type).

One step closer removing `sdocWithDynFlags` (#10143) and supporting
several platforms (#14335).
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e45c85446de7589e17acf5654c2b33f766043eb1">e45c8544</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-09-17T20:04:08-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Generalize OutputableP

Add a type parameter for the environment required by OutputableP. It
avoids tying Platform with OutputableP.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/37aa224ad5b1cfb17d472c7b88c5c76bf22a52f3">37aa224a</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-09-17T20:04:08-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add note about OutputableP
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7f2785f2d6c6947d22d4d8b71d205c7c4b025680">7f2785f2</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-09-17T20:04:08-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Remove pprPrec from Outputable (unused)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b689f3db0229ac58af5383796fb13c6d40e358ce">b689f3db</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-09-17T20:04:46-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Bignum: add clamping naturalToWord (fix #18697)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0799b3de3e3462224bddc0e4b6a3156d04a06361">0799b3de</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-18T15:55:50-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/nonmoving: Add missing STM write barrier

When updating a TRec for a TVar already part of a transaction we
previously neglected to add the old value to the update remembered set.
I suspect this was the cause of #18587.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c492134912e5270180881b7345ee86dc32756bdd">c4921349</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-18T15:56:25-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Refactor foreign export tracking

This avoids calling `libc` in the initializers which are responsible for
registering foreign exports. We believe this should avoid the corruption
observed in #18548.

See Note [Tracking foreign exports] in rts/ForeignExports.c for an
overview of the new scheme.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/40dc91069d15bfc1d81f1722b39e06cac8fdddd1">40dc9106</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-18T15:56:25-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Refactor unloading of foreign export StablePtrs

Previously we would allocate a linked list cell for each foreign export.
Now we can avoid this by taking advantage of the fact that they are
already broken into groups.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/45fa82182bc61e3966fd51496c35130cd067a5df">45fa8218</a></strong>
<div>
<span>by Simon Jakobi</span>
<i>at 2020-09-19T06:57:36-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Deprecate Data.Semigroup.Option

Libraries email: https://mail.haskell.org/pipermail/libraries/2018-April/028724.html

GHC issue: https://gitlab.haskell.org/ghc/ghc/issues/15028

Corresponding PRs for deepseq:
* https://github.com/haskell/deepseq/pull/55
* https://github.com/haskell/deepseq/pull/57

Bumps the deepseq submodule.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2229d570fc78867190febb4f13c799b258a41f6d">2229d570</a></strong>
<div>
<span>by Vladislav Zavialov</span>
<i>at 2020-09-19T15:47:24-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Require happy >=1.20
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/a89c2fbab9bcf7d769e9d27262ab29f93342f114">a89c2fba</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-19T15:47:24-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">ci.sh: Enforce minimum happy/alex versions

Also, always invoke cabal-install to ensure that happy/alex symlinks are
up-to-date.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2f7ef2fb3234cdfb89b3da1298fc9c1b7381e418">2f7ef2fb</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-19T15:47:24-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">gitlab-ci: Ensure that cabal-install overwrites existing executables

Previously cabal-install wouldn't overwrite toolchain executables if
they already existed (as they likely would due to caching).
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ac213d267140e747a391f68bc9f060e117395547">ac213d26</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-09-19T15:48:01-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Wire in constraint tuples

This wires in the definitions of the constraint tuple classes. The
key changes are in:

* `GHC.Builtin.Types`, where the `mk_ctuple` function is used to
  define constraint tuple type constructors, data constructors, and
  superclass selector functions, and
* `GHC.Builtin.Uniques`. In addition to wiring in the `Unique`s for
  constraint tuple type and data constructors, we now must wire in
  the superclass selector functions. Luckily, this proves to be not
  that challenging. See the newly added comments.

Historical note: constraint tuples used to be wired-in until about
five years ago, when commit 130e93aab220bdf14d08028771f83df210da340b
turned them into known-key names. This was done as part of a larger
refactor to reduce the number of special cases for constraint tuples,
but the commit message notes that the main reason that constraint
tuples were made known-key (as opposed to boxed/unboxed tuples, which
are wired in) is because it was awkward to wire in the superclass
selectors. This commit solves the problem of wiring in superclass
selectors.

Fixes #18635.

-------------------------
Metric Decrease:
    T10421
    T12150
    T12227
    T12234
    T12425
    T13056
    T13253-spj
    T18282
    T18304
    T5321FD
    T5321Fun
    T5837
    T9961
Metric Decrease (test_env='x86_64-linux-deb9-unreg-hadrian'):
    T12707
Metric Decrease (test_env='x86_64-darwin'):
    T4029
-------------------------
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e195dae6d959e2a9b1a22a2ca78db5955e1d7dea">e195dae6</a></strong>
<div>
<span>by Wander Hillen</span>
<i>at 2020-09-19T15:48:41-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Export singleton function from Data.List

Data.OldList exports a monomorphized singleton function but
it is not re-exported by Data.List. Adding the export to
Data.List causes a conflict with a 14-year old function of the
same name and type by SPJ in GHC.Utils.Misc. We can't just remove
this function because that leads to a problems when building
GHC with a stage0 compiler that does not have singleton in
Data.List yet. We also can't hide the function in GHC.Utils.Misc
since it is not possible to hide a function from a module if the
module does not export the function. To work around this, all
places where the Utils.Misc singleton was used now use a qualified
version like Utils.singleton and in GHC.Utils.Misc we are very
specific about which version we export.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9c1b8ad931e7bfabe521bc17e74ac9869b21a748">9c1b8ad9</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-09-19T15:49:19-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Bump Stack resolver
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d05d13ce6b5be54f3aa1c23f4377920a4965fc50">d05d13ce</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-09-19T15:49:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Cinch -fno-warn-name-shadowing down to specific GHCi module
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f1accd00969e0b2993f14ee4ed858cea0c13357e">f1accd00</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-09-19T15:49:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add quick-validate Hadrian flavour (quick + -Werror)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8f8d51f137ffcdbc4432febc5d1a11a564807b1b">8f8d51f1</a></strong>
<div>
<span>by Andreas Klebinger</span>
<i>at 2020-09-19T15:50:33-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix docs who misstated how the RTS treats size suffixes.

They are parsed as multiples of 1024. Not 1000. The docs
used to imply otherwise.

See decodeSize in rts/RtsFlags.c for the logic for this.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2ae0edbdfaf920d0c4da4edf721b947e11eb054c">2ae0edbd</a></strong>
<div>
<span>by Andreas Klebinger</span>
<i>at 2020-09-19T15:50:33-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix a codeblock in ghci.rst
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4df3aa956260e3d84232f43546e297cf425081dd">4df3aa95</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-19T15:51:07-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">users guide: Fix various documentation issues
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/885ecd18e084e4e2b15fbc5de0aa5222f2573387">885ecd18</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-19T15:51:07-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">hadrian: Fail on Sphinx syntax errors

Specifically the "Inline literal start-string without end-string"
warning, which typically means that the user neglected to separate
an inline code block from suffix text with a backslash.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b26cd86795d86850bfa97aa020d0a46b8ac043da">b26cd867</a></strong>
<div>
<span>by David Feuer</span>
<i>at 2020-09-19T15:51:44-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Unpack the MVar in Compact

The `MVar` lock in `Compact` was unnecessarily lazy, creating an extra indirection and wasting two words. Make it strict.</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/760307cf5511d970dfddf7fa4b502b4e3394b197">760307cf</a></strong>
<div>
<span>by Artyom Kuznetsov</span>
<i>at 2020-09-19T15:52:21-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Remove GADT self-reference check (#11554, #12081, #12174, fixes #15942)

Reverts 430f5c84dac1eab550110d543831a70516b5cac8
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/057db94ce038970b14df1599fe83097c284b9c1f">057db94c</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-19T15:52:56-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Drop field initializer on thread_basic_info_data_t

This struct has a number of fields and we only care that the value is
initialized with zeros. This eliminates the warnings noted in #17905.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/87e2e2b17afed82d30841d5b44c977123b93ecc4">87e2e2b1</a></strong>
<div>
<span>by Vladislav Zavialov</span>
<i>at 2020-09-19T23:55:30+03:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Resolve shift/reduce conflicts with %shift (#17232)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/66cba46e7049d907fe5c8614bddb60288421d358">66cba46e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-20T20:30:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Unmark T12971 as broken on Windows

It's unclear why, but this no longer seems to fail.

Closes #17945.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/816811d45897afec3543ade30c63dcddf56828a8">816811d4</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-20T20:30:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Unmark T5975[ab] as broken on Windows

Sadly it's unclear *why* they have suddenly started working.

Closes #7305.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/43a43d396e30931c1fa68b054ae032d2bd1daa98">43a43d39</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-20T20:30:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">base/testsuite: Add missing LANGUAGE pragma in ThreadDelay001

Only affected the Windows codepath.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ced8f113cc6421dfc36dd322ea85a78bfa3ff37e">ced8f113</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-20T20:30:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Update expected output for outofmem on Windows

The error originates from osCommitMemory rather than getMBlocks.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ea08aead19087d21c5f7334e192cd4016ae57462">ea08aead</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-20T20:30:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark some GHCi/Makefile tests as broken on Windows

See #18718.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/caf6a5a30291d80660d6ff73efc35c04eaced789">caf6a5a3</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-09-20T20:30:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Fix WinIO error message normalization

This wasn't being applied to stderr.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/93ab3e8d235610b2cb339a5bad9ad2848eab18d4">93ab3e8d</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-09-20T20:30:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark tempfiles as broken on Win32 without WinIO

The old POSIX emulation appears to ignore the user-requested prefix.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9df77fed8918bb335874a584a829ee32325cefb5">9df77fed</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-09-20T20:30:57-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark TH_spliceE5_prof as broken on Windows

Due to #18721.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1a0f8243efc9873a949bb6f082b4dfdf563fc1ea">1a0f8243</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-09-21T16:45:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Remove unused ThBrackCtxt and ResSigCtxt

Fixes #18715.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2f222b120e48df1b3d78f5501612d21c2a2dc470">2f222b12</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-09-21T16:45:47-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Disallow constraints in KindSigCtxt

This patch cleans up how `GHC.Tc.Validity` classifies `UserTypeCtxt`s
that can only refer to kind-level positions, which is important for
rejecting certain classes of programs. In particular, this patch:

* Introduces a new `TypeOrKindCtxt` data type and
  `typeOrKindCtxt :: UserTypeCtxt -> TypeOrKindCtxt` function, which
  determines whether a `UserTypeCtxt` can refer to type-level
  contexts, kind-level contexts, or both.
* Defines the existing `allConstraintsAllowed` and `vdqAllowed`
  functions in terms of `typeOrKindCtxt`, which avoids code
  duplication and ensures that they stay in sync in the future.

The net effect of this patch is that it fixes #18714, in which it was
discovered that `allConstraintsAllowed` incorrectly returned `True`
for `KindSigCtxt`. Because `typeOrKindCtxt` now correctly classifies
`KindSigCtxt` as a kind-level context, this bug no longer occurs.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/aaa51dcfdb729f130aeefeaeac15029b62096a74">aaa51dcf</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-09-21T16:46:22-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">hadrian: Add extra-deps: happy-1.20 to stack.yaml

GHC now requires happy-1.20, which isn't available in LTS-16.14.

Fixes #18726.</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6de40f83c53c3b1899f7b4912badbe98e4fbde88">6de40f83</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-09-22T05:37:24-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Better eta-expansion (again) and don't specilise DFuns

This patch fixes #18223, which made GHC generate an exponential
amount of code.  There are three quite separate changes in here

1.  Re-engineer eta-expansion (again).  The eta-expander was
    generating lots of intermediate stuff, which could be optimised
    away, but which choked the simplifier meanwhile.  Relatively
    easy to kill it off at source.

    See Note [The EtaInfo mechanism] in GHC.Core.Opt.Arity.
    The main new thing is the use of pushCoArg in getArg_maybe.

2.  Stop Specialise specalising DFuns.  This is the cause of a huge
    (and utterly unnecessary) blowup in program size in #18223.
    See Note [Do not specialise DFuns] in GHC.Core.Opt.Specialise.

    I also refactored the Specialise monad a bit... it was silly,
    because it passed on unchanging values as if they were mutable
    state.

3.  Do an extra Simplifer run, after SpecConstra and before
    late-Specialise.  I found (investigating perf/compiler/T16473)
    that failing to do this was crippling *both* SpecConstr *and*
    Specialise.  See Note [Simplify after SpecConstr] in
    GHC.Core.Opt.Pipeline.

    This change does mean an extra run of the Simplifier, but only
    with -O2, and I think that's acceptable.

    T16473 allocates *three* times less with this change.  (I changed
    it to check runtime rather than compile time.)

Some smaller consequences

* I moved pushCoercion, pushCoArg and friends from SimpleOpt
  to Arity, because it was needed by the new etaInfoApp.

  And pushCoValArg now returns a MCoercion rather than Coercion for
  the argument Coercion.

* A minor, incidental improvement to Core pretty-printing

This does fix #18223, (which was otherwise uncompilable. Hooray.  But
there is still a big intermediate because there are some very deeply
nested types in that program.

Modest reductions in compile-time allocation on a couple of benchmarks
    T12425     -2.0%
    T13253    -10.3%

Metric increase with -O2, due to extra simplifier run
    T9233     +5.8%
    T12227    +1.8%
    T15630    +5.0%

There is a spurious apparent increase on heap residency on T9630,
on some architectures at least.  I tried it with -G1 and the residency
is essentially unchanged.

Metric Increase
    T9233
    T12227
    T9630

Metric Decrease
    T12425
    T13253
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/416bd50e58b23ad70813b18a913ca77a3ab6e936">416bd50e</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-09-22T05:37:59-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix the occurrence analyser

Ticket #18603 demonstrated that the occurrence analyser's
handling of

  local RULES for imported Ids

(which I now call IMP-RULES) was inadequate.  It led the simplifier
into an infnite loop by failing to label a binder as a loop breaker.

The main change in this commit is to treat IMP-RULES in a simple and
uniform way: as extra rules for the local binder.  See
  Note [IMP-RULES: local rules for imported functions]

This led to quite a bit of refactoring.  The result is still tricky,
but it's much better than before, and better documented I think.

Oh, and it fixes the bug.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6fe8a0c756f8b12df5cf192ea9b0c33feb150843">6fe8a0c7</a></strong>
<div>
<span>by Sebastian Graf</span>
<i>at 2020-09-22T05:38:35-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">PmCheck - Comments only: Replace /~ by ≁
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e9501547a8be6af97bcbf38a7ed66dadf02ea27b">e9501547</a></strong>
<div>
<span>by Sebastian Graf</span>
<i>at 2020-09-22T05:38:35-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">PmCheck: Rewrite inhabitation test

We used to produce inhabitants of a pattern-match refinement type Nabla
in the checker in at least two different and mostly redundant ways:

  1. There was `provideEvidence` (now called
     `generateInhabitingPatterns`) which is used by
     `GHC.HsToCore.PmCheck` to produce non-exhaustive patterns, which
     produces inhabitants of a Nabla as a sub-refinement type where all
     match variables are instantiated.
  2. There also was `ensure{,All}Inhabited` (now called
     `inhabitationTest`) which worked slightly different, but was
     whenever new type constraints or negative term constraints were
     added. See below why `provideEvidence` and `ensureAllInhabited`
     can't be the same function, the main reason being performance.
  3. And last but not least there was the `nonVoid` test, which tested
     that a given type was inhabited. We did use this for strict fields
     and -XEmptyCase in the past.

The overlap of (3) with (2) was always a major pet peeve of mine. The
latter was quite efficient and proven to work for recursive data types,
etc, but could not handle negative constraints well (e.g. we often want
to know if a *refined* type is empty, such as `{ x:[a] | x /= [] }`).

Lower Your Guards suggested that we could get by with just one, by
replacing both functions with `inhabitationTest` in this patch.
That was only possible by implementing the structure of φ constraints
as in the paper, namely the semantics of φ constructor constraints.

This has a number of benefits:

  a. Proper handling of unlifted types and strict fields, fixing #18249,
     without any code duplication between
     `GHC.HsToCore.PmCheck.Oracle.instCon` (was `mkOneConFull`) and
     `GHC.HsToCore.PmCheck.checkGrd`.
  b. `instCon` can perform the `nonVoid` test (3) simply by emitting
     unliftedness constraints for strict fields.
  c. `nonVoid` (3) is thus simply expressed by a call to
     `inhabitationTest`.
  d. Similarly, `ensureAllInhabited` (2), which we called after adding
     type info, now can similarly be expressed as the fuel-based
     `inhabitationTest`.

See the new `Note [Why inhabitationTest doesn't call generateInhabitingPatterns]`
why we still have tests (1) and (2).

Fixes #18249 and brings nice metric decreases for `T17836` (-76%) and
`T17836b` (-46%), as well as `T18478` (-8%) at the cost of a few very
minor regressions (< +2%), potentially due to the fact that
`generateInhabitingPatterns` does more work to suggest the minimal
COMPLETE set.

Metric Decrease:
    T17836
    T17836b
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9632f413dc90f39bc64586c064805f515a672ca0">9632f413</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-09-22T22:51:53+01:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Implement Quick Look impredicativity

This patch implements Quick Look impredicativity (#18126), sticking
very closely to the design in
    A quick look at impredicativity, Serrano et al, ICFP 2020

The main change is that a big chunk of GHC.Tc.Gen.Expr has been
extracted to two new modules
    GHC.Tc.Gen.App
    GHC.Tc.Gen.Head
which deal with typechecking n-ary applications, and the head of
such applications, respectively.  Both contain a good deal of
documentation.

Three other loosely-related changes are in this patch:

* I implemented (partly by accident) points (2,3)) of the accepted GHC
  proposal "Clean up printing of foralls", namely
  https://github.com/ghc-proposals/ghc-proposals/blob/
        master/proposals/0179-printing-foralls.rst
  (see #16320).

  In particular, see Note [TcRnExprMode] in GHC.Tc.Module
  - :type instantiates /inferred/, but not /specified/, quantifiers
  - :type +d instantiates /all/ quantifiers
  - :type +v is killed off

  That completes the implementation of the proposal,
  since point (1) was done in
    commit df08468113ab46832b7ac0a7311b608d1b418c4d
    Author: Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io>
    Date:   Mon Feb 3 21:17:11 2020 +0100
    Always display inferred variables using braces

* HsRecFld (which the renamer introduces for record field selectors),
  is now preserved by the typechecker, rather than being rewritten
  back to HsVar.  This is more uniform, and turned out to be more
  convenient in the new scheme of things.

* The GHCi debugger uses a non-standard unification that allows the
  unification variables to unify with polytypes.  We used to hack
  this by using ImpredicativeTypes, but that doesn't work anymore
  so I introduces RuntimeUnkTv.  See Note [RuntimeUnkTv] in
  GHC.Runtime.Heap.Inspect

WARNING: this patch won't validate on its own.  It was too
hard to fully disentangle it from the following patch, on
type errors and kind generalisation.

Changes to tests

* Fixes #9730 (test added)

* Fixes #7026 (test added)

* Fixes most of #8808, except function `g2'` which uses a
  section (which doesn't play with QL yet -- see #18126)
  Test added

* Fixes #1330. NB Church1.hs subsumes Church2.hs, which is now deleted

* Fixes #17332 (test added)

* Fixes #4295

* This patch makes typecheck/should_run/T7861 fail.
  But that turns out to be a pre-existing bug: #18467.
  So I have just made T7861 into expect_broken(18467)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/cca982e8fc2ab6e99c6e21b4db56f938f5e5c55d">cca982e8</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-09-22T22:51:53+01:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Improve kind generalisation, error messages

This patch does two things:

* It refactors GHC.Tc.Errors a bit.  In debugging Quick Look I was
  forced to look in detail at error messages, and ended up doing a bit
  of refactoring, esp in mkTyVarEqErr'.  It's still quite a mess, but
  a bit better, I think.

* It makes a significant improvement to the kind checking of type and
  class declarations. Specifically, we now ensure that if kind
  checking fails with an unsolved constraint, all the skolems are in
  scope.  That wasn't the case before, which led to some obscure error
  messages; and occasional failures with "no skolem info" (eg #16245).

Both of these, and the main Quick Look patch itself, affect a /lot/ of
error messages, as you can see from the number of files changed.  I've
checked them all; I think they are as good or better than before.

Smaller things

* I documented the various instances of VarBndr better.
  See Note [The VarBndr tyep and its uses] in GHC.Types.Var

* Renamed GHC.Tc.Solver.simpl_top to simplifyTopWanteds

* A bit of refactoring in bindExplicitTKTele, to avoid the
  footwork with Either.  Simpler now.

* Move promoteTyVar from GHC.Tc.Solver to GHC.Tc.Utils.TcMType

Fixes #16245 (comment 211369), memorialised as
  typecheck/polykinds/T16245a
Also fixes the three bugs in #18640
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#157f7634c25bc6366cb7c9c9edb48e819dce38db">
.gitlab/ci.sh
</a>
</li>
<li class="file-stats">
<a href="#9ab3868b23ed5d5a6e12ef902049902556fa4009">
aclocal.m4
</a>
</li>
<li class="file-stats">
<a href="#377cfd14c1f92357465df995ec6537b074051322">
compiler/GHC/Builtin/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#be7a5c9dc04ecfe7bedb2a2afcc2a51be6719577">
compiler/GHC/Builtin/Types.hs-boot
</a>
</li>
<li class="file-stats">
<a href="#8dc7109003a77f8a82e987dc1de31466aa956174">
compiler/GHC/Builtin/Uniques.hs
</a>
</li>
<li class="file-stats">
<a href="#d95fdf6575459444666f72b2281534e0558a4ba0">
compiler/GHC/Builtin/Utils.hs
</a>
</li>
<li class="file-stats">
<a href="#f73a4fa90a8eb153bccdcfcc9f63c15edcd66785">
compiler/GHC/Cmm.hs
</a>
</li>
<li class="file-stats">
<a href="#db697f6aea9f93f1583f1d5c62d25570a1e07f73">
compiler/GHC/Cmm/CLabel.hs
</a>
</li>
<li class="file-stats">
<a href="#4fbb1c5f251c38fc01fcde693420ee6d02df7e45">
compiler/GHC/Cmm/Dataflow/Label.hs
</a>
</li>
<li class="file-stats">
<a href="#92b713d88390e6ea489e24b6cff8a3960384c0d0">
compiler/GHC/Cmm/DebugBlock.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="#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="#29a1593e7281c8a9103a19e3a7562e2365e23b47">
compiler/GHC/Cmm/ProcPoint.hs
</a>
</li>
<li class="file-stats">
<a href="#10b61652f9817945bb54ccf8fc40f8a664ca3c30">
compiler/GHC/CmmToAsm.hs
</a>
</li>
<li class="file-stats">
<a href="#d6e95c6ffd8955a51f59d69de7525bebd693db69">
compiler/GHC/CmmToAsm/CFG.hs
</a>
</li>
<li class="file-stats">
<a href="#b131e0d591301ee7a1c76bbd812f3d14783e934f">
compiler/GHC/CmmToAsm/Dwarf.hs
</a>
</li>
<li class="file-stats">
<a href="#3008b031dfff6e38be4d7b8861e17927ee8c3fab">
compiler/GHC/CmmToAsm/Dwarf/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#3022d7d8a06ba257d13bbd18a3347522287aa684">
compiler/GHC/CmmToAsm/PPC/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#1684e8db5c0d415248dabe224ffe70205adc6b0f">
compiler/GHC/CmmToAsm/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#eb63fd2d9f8f64c1063f9ce3e162f92c2e6e508c">
compiler/GHC/CmmToAsm/Reg/Graph.hs
</a>
</li>
<li class="file-stats">
<a href="#23fa440e58d1f384d18650b52802ad6d03891572">
compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs
</a>
</li>
<li class="file-stats">
<a href="#b4cadffdafb6a1f441fede8639ba742ae903afca">
compiler/GHC/CmmToAsm/Reg/Liveness.hs
</a>
</li>
<li class="file-stats">
<a href="#2d637edf182c6c5649d1a1da7fc0859baebba34c">
compiler/GHC/CmmToAsm/SPARC.hs
</a>
</li>
<li class="file-stats">
<a href="#e76eae04dea432f874db91c25e4a5725d7cc127b">
compiler/GHC/CmmToAsm/SPARC/CodeGen.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/bfa0996647bdaf55228659b00125220a76ba0d4c...cca982e8fc2ab6e99c6e21b4db56f938f5e5c55d">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>