<!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>
Ben Gamari pushed to branch wip/T18328
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/71006532abb88a53df7c7e0b3a5e2c8af99a48d1">71006532</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-06-30T07:10:42-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Reject nested foralls/contexts in instance types more consistently

GHC is very wishy-washy about rejecting instance declarations with
nested `forall`s or contexts that are surrounded by outermost
parentheses. This can even lead to some strange interactions with
`ScopedTypeVariables`, as demonstrated in #18240. This patch makes
GHC more consistently reject instance types with nested
`forall`s/contexts so as to prevent these strange interactions.

On the implementation side, this patch tweaks `splitLHsInstDeclTy`
and `getLHsInstDeclHead` to not look through parentheses, which can
be semantically significant. I've added a
`Note [No nested foralls or contexts in instance types]` in
`GHC.Hs.Type` to explain why. This also introduces a
`no_nested_foralls_contexts_err` function in `GHC.Rename.HsType` to
catch nested `forall`s/contexts in instance types. This function is
now used in `rnClsInstDecl` (for ordinary instance declarations) and
`rnSrcDerivDecl` (for standalone `deriving` declarations), the latter
of which fixes #18271.

On the documentation side, this adds a new
"Formal syntax for instance declaration types" section to the GHC
User's Guide that presents a BNF-style grammar for what is and isn't
allowed in instance types.

Fixes #18240. Fixes #18271.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/bccf3351a28638fba94953c4bb244ecfc3a1a044">bccf3351</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-06-30T07:10:46-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add ghc-bignum to 8.12 release notes
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/81704a6f3b155b0bfbc20f53cd821be3cb9006a7">81704a6f</a></strong>
<div>
<span>by David Eichmann</span>
<i>at 2020-06-30T07:10:48-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Update ssh keys in CI performance metrics upload script
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/85310fb83fdb7d7294bd453026102fc42000bf14">85310fb8</a></strong>
<div>
<span>by Joshua Price</span>
<i>at 2020-06-30T07:10:49-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add missing Ix instances for tuples of size 6 through 15 (#16643)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/cbb6b62f54c77637e29bc66e3d1214541c347753">cbb6b62f</a></strong>
<div>
<span>by Vladislav Zavialov</span>
<i>at 2020-07-01T15:41:38-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Implement -XLexicalNegation (GHC Proposal #229)

This patch introduces a new extension, -XLexicalNegation, which detects
whether the minus sign stands for negation or subtraction using the
whitespace-based rules described in GHC Proposal #229.

Updates haddock submodule.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/fb5a0d01d575cdb830918a6a0406f385de2749c2">fb5a0d01</a></strong>
<div>
<span>by Martin Handley</span>
<i>at 2020-07-01T15:42:14-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">#17169: Clarify Fixed's Enum instance.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b316804dbafe1d0287fd33f656b7ce5711ec34f7">b316804d</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-07-01T15:42:49-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Improve debug tracing for substitution

This patch improves debug tracing a bit (#18395)

* Remove the ancient SDoc argument to substitution, replacing it
  with a HasDebugCallStack constraint. The latter does the same
  job (indicate the call site) but much better.

* Add HasDebugCallStack to simpleOptExpr, exprIsConApp_maybe
  I needed this to help nail the lookupIdSubst panic in
  #18326, #17784
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/5c9fabb82b39aed9e61c6b78c72312b20a568c68">5c9fabb8</a></strong>
<div>
<span>by Hécate</span>
<i>at 2020-07-01T15:43:25-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add most common return values for `os` and `arch`
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/76d8cc744977d98f6a427b1816198709e2d2e856">76d8cc74</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-07-01T15:44:01-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Desugar quoted uses of DerivingVia and expression type signatures properly

The way that `GHC.HsToCore.Quote` desugared quoted `via` types (e.g.,
`deriving via forall a. [a] instance Eq a => Eq (List a)`) and
explicit type annotations in signatures (e.g.,
`f = id @a :: forall a. a -> a`) was completely wrong, as it did not
implement the scoping guidelines laid out in
`Note [Scoped type variables in bindings]`. This is easily fixed.

While I was in town, I did some minor cleanup of related Notes:

* `Note [Scoped type variables in bindings]` and
  `Note [Scoped type variables in class and instance declarations]`
  say very nearly the same thing. I decided to just consolidate the
  two Notes into `Note [Scoped type variables in quotes]`.
* `Note [Don't quantify implicit type variables in quotes]` is
  somewhat outdated, as it predates GHC 8.10, where the
  `forall`-or-nothing rule requires kind variables to be explicitly
  quantified in the presence of an explicit `forall`. As a result,
  the running example in that Note doesn't even compile. I have
  changed the example to something simpler that illustrates the
  same point that the original Note was making.

Fixes #18388.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/44d6a3352d708785b75aeb616bfc7efff839184e">44d6a335</a></strong>
<div>
<span>by Andreas Klebinger</span>
<i>at 2020-07-02T02:54:54-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">T16012: Be verbose on failure.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f985333002c1690bf49debcc64fc65ed1d1de244">f9853330</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-07-02T02:55:29-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Bump ghc-prim version to 0.7.0

Fixes #18279. Bumps the `text` submodule.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/23e4e04700f840e3c4e75ccb2085aea05bfb5318">23e4e047</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-07-02T10:46:31-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Hadrian: fix PowerPC64le support (#17601)

[ci skip]
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3cdd8d69f5c1d63137b9b56992bb9b74a6785459">3cdd8d69</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-07-02T10:47:08-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NCG: correctly handle addresses with huge offsets (#15570)

Before this patch we could generate addresses of this form:

   movzbl cP0_str+-9223372036854775808,%eax

The linker can't handle them because the offset is too large:

   ld.lld: error: Main.o:(.text+0xB3): relocation R_X86_64_32S out of range: -9223372036852653050 is not in [-2147483648, 2147483647]

With this patch we detect those cases and generate:

   movq $-9223372036854775808,%rax
   addq $cP0_str,%rax
   movzbl (%rax),%eax

I've also refactored `getAmode` a little bit to make it easier to
understand and to trace.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4d90b3ff02002ea25460d087dde56f69a9641096">4d90b3ff</a></strong>
<div>
<span>by Gabor Greif</span>
<i>at 2020-07-02T20:07:59-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">No need for CURSES_INCLUDE_DIRS

This is a leftover from ef63ff27251a20ff11e58c9303677fa31e609a88</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f08d6316d3d19b627550d99b4364e9bf0b45c329">f08d6316</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-07-02T20:08:36-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Replace Opt_SccProfilingOn flag with sccProfilingEnabled helper function

SCC profiling was enabled in a convoluted way: if WayProf was enabled,
Opt_SccProfilingOn general flag was set (in
`GHC.Driver.Ways.wayGeneralFlags`), and then this flag was queried in
various places.

There is no need to go via general flags, so this patch defines a
`sccProfilingEnabled :: DynFlags -> Bool` helper function that just
checks whether WayProf is enabled.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/03c82238ed57d4e82ca6f2aeb37079351f474acc">03c82238</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-07-02T21:17:46-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Define multiShotIO and use it in mkSplitUniqueSupply

This patch is part of the ongoing eta-expansion saga;
see #18238.

It implements a neat trick (suggested by Sebastian Graf)
that allows the programmer to disable the default one-shot behaviour
of IO (the "state hack").  The trick is to use a new multiShotIO
function; see Note [multiShotIO].  For now, multiShotIO is defined
here in Unique.Supply; but it should ultimately be moved to the IO
library.

The change is necessary to get good code for GHC's unique supply;
see Note [Optimising the unique supply].

However it makes no difference to GHC as-is.  Rather, it makes
a difference when a subsequent commit

   Improve eta-expansion using ArityType

lands.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/065da62fb2fc937c159c468892ffeaa1588b4f2c">065da62f</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-07-02T21:17:46-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Make arityType deal with join points

As Note [Eta-expansion and join points] describes,
this patch makes arityType deal correctly with join points.
What was there before was not wrong, but yielded lower
arities than it could.

Fixes #18328

In base GHC this makes no difference to nofib.

        Program           Size    Allocs   Runtime   Elapsed  TotalMem
--------------------------------------------------------------------------------
         n-body          -0.1%     -0.1%     -1.2%     -1.1%      0.0%
--------------------------------------------------------------------------------
            Min          -0.1%     -0.1%    -55.0%    -56.5%      0.0%
            Max          -0.0%      0.0%    +16.1%    +13.4%      0.0%
 Geometric Mean          -0.0%     -0.0%    -30.1%    -31.0%     -0.0%

But it starts to make real difference when we land the change to the
way mkDupableAlts handles StrictArg, in fixing #13253 and friends.
I think this is because we then get more non-inlined join points.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d33f1e760920de656c8469118be6728ad099eecf">d33f1e76</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-07-02T21:17:46-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Improve eta-expansion using ArityType

As #18355 shows, we were failing to preserve one-shot info when
eta-expanding.  It's rather easy to fix, by using ArityType more,
rather than just Arity.

This patch is important to suport the one-shot monad trick;
see #18202.  But the extra tracking of one-shot-ness requires
the patch

   Define multiShotIO and use it in mkSplitUniqueSupply

If that patch is missing, ths patch makes things worse in
GHC.Types.Uniq.Supply.  With it, however, we see these improvements

    T3064     compiler bytes allocated -2.2%
    T3294     compiler bytes allocated -1.3%
    T12707    compiler bytes allocated -1.3%
    T13056    compiler bytes allocated -2.2%

Metric decrease
    T3064
    T3294
    T12707
    T13056
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3db62d0db6e3df68178411abfe617cf4c8d8a376">3db62d0d</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-07-02T21:17:46-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Use dumpStyle when printing inlinings

This just makes debug-printing consistent,
and more informative.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3fcefa7a0a39228f86b3770d9d6c7bc005f273b8">3fcefa7a</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-07-02T21:17:46-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Comments only
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#f656107cc03a27946448887125380c358788500e">
.gitlab/test-metrics.sh
</a>
</li>
<li class="file-stats">
<a href="#9ab3868b23ed5d5a6e12ef902049902556fa4009">
aclocal.m4
</a>
</li>
<li class="file-stats">
<a href="#d0d96a6d03668aeab20ebe05e2c4ccb798c7e64c">
compiler/GHC.hs
</a>
</li>
<li class="file-stats">
<a href="#47cba74ae8965f1665cd11bf2b023760ea27594e">
compiler/GHC/Cmm/Info.hs
</a>
</li>
<li class="file-stats">
<a href="#71e696f452eb493722d70306c6f304fc9b2f6a95">
compiler/GHC/Cmm/Parser.y
</a>
</li>
<li class="file-stats">
<a href="#2bae5947e9412f6deebf4db7dcb89d780913130f">
compiler/GHC/CmmToAsm/X86/CodeGen.hs
</a>
</li>
<li class="file-stats">
<a href="#c3967bb9d3e8f5aae2dd111b5a335b48c21c1999">
compiler/GHC/Core/Opt/Arity.hs
</a>
</li>
<li class="file-stats">
<a href="#446b4afbe6836b950115a619acea24ddde19dc90">
compiler/GHC/Core/Opt/CSE.hs
</a>
</li>
<li class="file-stats">
<a href="#aa79261abf782f3dc603af7fbd5c4b08ed3ddb88">
compiler/GHC/Core/Opt/ConstantFold.hs
</a>
</li>
<li class="file-stats">
<a href="#f168a93cde5e2aec2441d6331dfe500172df4af3">
compiler/GHC/Core/Opt/Simplify.hs
</a>
</li>
<li class="file-stats">
<a href="#48fbb5cdea308650de5756521feb28ec68819b9b">
compiler/GHC/Core/Opt/Simplify/Utils.hs
</a>
</li>
<li class="file-stats">
<a href="#b6a5ba32bafb8fbda933538b3007e755fef6f101">
compiler/GHC/Core/Opt/SpecConstr.hs
</a>
</li>
<li class="file-stats">
<a href="#ab22d7ae4d245581b701367e386d7e886e416e76">
compiler/GHC/Core/Opt/Specialise.hs
</a>
</li>
<li class="file-stats">
<a href="#d01de95d8c71d4dec6a9a59146186e29a5b3fd38">
compiler/GHC/Core/Rules.hs
</a>
</li>
<li class="file-stats">
<a href="#11ffe98a94d798427bc600e4fcfe899407536346">
compiler/GHC/Core/SimpleOpt.hs
</a>
</li>
<li class="file-stats">
<a href="#708fab0a51bd47227233eda4698e750ff6de66e0">
compiler/GHC/Core/Subst.hs
</a>
</li>
<li class="file-stats">
<a href="#9df7e695170800345fb44916a8e8f4b8f3c55be0">
compiler/GHC/Driver/CodeOutput.hs
</a>
</li>
<li class="file-stats">
<a href="#2e5692f568fd7b67a6b172e2a60469da8392508c">
compiler/GHC/Driver/Flags.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="#c560cd8bab896e73910881c779fa88a01e8d6e26">
compiler/GHC/Driver/Ways.hs
</a>
</li>
<li class="file-stats">
<a href="#018be522bc4813b147a1525e4f96a7a493207d96">
compiler/GHC/Hs/Type.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="#3c19c0be465f9a28d7b69f89c55648080fcc37eb">
compiler/GHC/HsToCore/Quote.hs
</a>
</li>
<li class="file-stats">
<a href="#0b4bc77723e1f22f50d70e89a81f6d92c3904408">
compiler/GHC/Iface/Recomp/Flags.hs
</a>
</li>
<li class="file-stats">
<a href="#bf951467d4a9aa443cb109cb4c84a2891945649b">
compiler/GHC/Parser.y
</a>
</li>
<li class="file-stats">
<a href="#a1ae0a1be35c859d90b0756920a7198075fb91e1">
compiler/GHC/Parser/Lexer.x
</a>
</li>
<li class="file-stats">
<a href="#7dd1cd0f6f2164a14c83d9aa564dd32bc30e447a">
compiler/GHC/Rename/Module.hs
</a>
</li>
<li class="file-stats">
<a href="#5ed4643391d2607884de0a856f66281de9807dc3">
compiler/GHC/Runtime/Heap/Layout.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/5c576e73381f677a6f3a0fd13aca6d61360ac880...3fcefa7a0a39228f86b3770d9d6c7bc005f273b8">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>