<!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/T17656
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/c696bb2f4476e0ce4071e0d91687c1fe84405599">c696bb2f</a></strong>
<div>
<span>by Cale Gibbard</span>
<i>at 2020-12-14T13:37:09-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Implement type applications in patterns

The haddock submodule is also updated so that it understands the changes
to patterns.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7e9debd4ceb068effe8ac81892d2cabcb8f55850">7e9debd4</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-14T13:37:09-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Optimise nullary type constructor usage

During the compilation of programs GHC very frequently deals with
the `Type` type, which is a synonym of `TYPE 'LiftedRep`. This patch
teaches GHC to avoid expanding the `Type` synonym (and other nullary
type synonyms) during type comparisons, saving a good amount of work.
This optimisation is described in `Note [Comparing nullary type
synonyms]`.

To maximize the impact of this optimisation, we introduce a few
special-cases to reduce `TYPE 'LiftedRep` to `Type`. See
`Note [Prefer Type over TYPE 'LiftedPtrRep]`.

Closes #17958.

Metric Decrease:
   T18698b
   T1969
   T12227
   T12545
   T12707
   T14683
   T3064
   T5631
   T5642
   T9020
   T9630
   T9872a
   T13035
   haddock.Cabal
   haddock.base
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/92377c27e1a48d0d3776f65c7074dfeb122b46db">92377c27</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-14T13:41:58-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Revert "Optimise nullary type constructor usage"

This was inadvertently merged.

This reverts commit 7e9debd4ceb068effe8ac81892d2cabcb8f55850.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d0e8c10d587e4b9984526d0dfcfcb258b75733b8">d0e8c10d</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-12-14T19:45:13+01:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Move Unit related fields from DynFlags to HscEnv

The unit database cache, the home unit and the unit state were stored in
DynFlags while they ought to be stored in the compiler session state
(HscEnv). This patch fixes this.

It introduces a new UnitEnv type that should be used in the future to
handle separate unit environments (especially host vs target units).

Related to #17957

Bump haddock submodule
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/af855ac1d37359df3db8c48dc6c9dd2f3fe24e77">af855ac1</a></strong>
<div>
<span>by Andreas Klebinger</span>
<i>at 2020-12-14T15:22:13-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Optimize dumping of consecutive whitespace.

The naive way of putting out n characters of indent would be something
like `hPutStr hdl (replicate n ' ')`. However this is quite inefficient
as we allocate an absurd number of strings consisting of simply spaces
as we don't cache them.

To improve on this we now track if we can simply write ascii spaces via
hPutBuf instead. This is the case when running with -ddump-to-file where
we force the encoding to be UTF8.

This avoids both the cost of going through encoding as well as avoiding
allocation churn from all the white space. Instead we simply use hPutBuf
on a preallocated unlifted string.

When dumping stg like this:

> nofib/spectral/simple/Main.hs -fforce-recomp -ddump-stg-final -ddump-to-file -c +RTS -s

Allocations went from 1,778 MB to 1,702MB. About a 4% reduction of
allocation! I did not measure the difference in runtime but expect it
to be similar.

Bumps the haddock submodule since the interface of GHC's Pretty
slightly changed.

-------------------------
Metric Decrease:
    T12227
-------------------------
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/dad87210efffce9cfc2d17dc088a71d9dea14535">dad87210</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-14T15:22:29-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Optimise nullary type constructor usage

During the compilation of programs GHC very frequently deals with
the `Type` type, which is a synonym of `TYPE 'LiftedRep`. This patch
teaches GHC to avoid expanding the `Type` synonym (and other nullary
type synonyms) during type comparisons, saving a good amount of work.
This optimisation is described in `Note [Comparing nullary type
synonyms]`.

To maximize the impact of this optimisation, we introduce a few
special-cases to reduce `TYPE 'LiftedRep` to `Type`. See
`Note [Prefer Type over TYPE 'LiftedPtrRep]`.

Closes #17958.

Metric Decrease:
   T18698b
   T1969
   T12227
   T12545
   T12707
   T14683
   T3064
   T5631
   T5642
   T9020
   T9630
   T9872a
   T13035
   haddock.Cabal
   haddock.base
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6c2eb2232b39ff4720fda0a4a009fb6afbc9dcea">6c2eb223</a></strong>
<div>
<span>by Andrew Martin</span>
<i>at 2020-12-14T18:48:51-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Implement BoxedRep proposal

This implements the BoxedRep proposal, refacoring the `RuntimeRep`
hierarchy from:

```haskell
data RuntimeRep = LiftedPtrRep | UnliftedPtrRep | ...
```

to

```haskell
data RuntimeRep = BoxedRep Levity | ...
data Levity = Lifted | Unlifted
```

Closes #17526.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3ee696ccf55c306f6d9887436cfec579f5dde8a0">3ee696cc</a></strong>
<div>
<span>by Sebastian Graf</span>
<i>at 2020-12-15T10:53:31-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add regression test for #19053
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/535dae66271af0ce4ab9c0a772614b700bc4c92a">535dae66</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-15T10:53:58-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark divbyzero, derefnull as fragile

Due to #18548.</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/331f556886e611af3d2633d1cebb868574a2aa13">331f5568</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-15T11:21:06-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Revert "Implement BoxedRep proposal"

This was inadvertently merged.

This reverts commit 6c2eb2232b39ff4720fda0a4a009fb6afbc9dcea.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/50fae07d48092562048d786685310174ae32d4e8">50fae07d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-15T15:15:16-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Roll-back broken haddock commit

Updates haddock submodule to revert a commit that does not build.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e9b18a75d5ddf24e5b866fbce17a3648570721af">e9b18a75</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-15T15:55:38-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Revert haddock submodule yet again
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b58cb63afd3353beb3a6e11ba7fa557fdedb8941">b58cb63a</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-12-16T03:46:31+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Bump haddock submodule

To adapt haddock for the nullary tyconapp optimisation patch.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/79c6c01a7540a78ec6e492f86f84c8fec5f57bd1">79c6c01a</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-12-16T23:25:27+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Kill floatEqualities completely

This patch delivers on #17656, by entirel killing off the complex
floatEqualities mechanism.  Previously, floatEqualities would float an
equality out of an implication, so that it could be solved at an outer
level. But now we simply do unification in-place, without floating the
constraint, relying on level numbers to determine untouchability.

There are a number of important new Notes:

* GHC.Tc.Utils.Unify Note [Unification preconditions]
  describes the preconditions for unification, including both
  skolem-escape and touchability.

* GHC.Tc.Solver.Interact Note [Solve by unification]
  describes what we do when we do unify

* GHC.Tc.Solver.Monad Note [The Unification Level Flag]
  describes how we control solver iteration under this new scheme

* GHC.Tc.Solver.Monad Note [Tracking Given equalities]
  describes how we track when we have Given equalities

* GHC.Tc.Types.Constraint Note [HasGivenEqs]
  is a new explanation of the ic_given_eqs field of an implication

A big raft of subtle Notes in Solver, concerning floatEqualities,
disappears.

Main code changes:

* GHC.Tc.Solver.floatEqualities disappears entirely

* GHC.Tc.Solver.Monad: new fields in InertCans, inert_given_eq_lvl
  and inert_given_eq, updated by updateGivenEqs
  See Note [Tracking Given equalities].

* In exchange for updateGivenEqa, GHC.Tc.Solver.Monad.getHasGivenEqs
  is much simpler and more efficient

* I found I could kill of metaTyVarUpdateOK entirely

One test case T14683 showed a 5.1% decrease in compile-time
allocation; and T5631 was down 2.2%. Other changes were small.

Metric Decrease:
    T14683
    T5631
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#d0d96a6d03668aeab20ebe05e2c4ccb798c7e64c">
compiler/GHC.hs
</a>
</li>
<li class="file-stats">
<a href="#377cfd14c1f92357465df995ec6537b074051322">
compiler/GHC/Builtin/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#8a5cd068459120cddf3814e7b9e02003b87647ba">
compiler/GHC/Builtin/Types/Prim.hs
</a>
</li>
<li class="file-stats">
<a href="#26a4620a80da2cc1c44d4e84ca58cf0393140be4">
<span class="new-file">
+
compiler/GHC/Builtin/Types/Prim.hs-boot
</span>
</a>
</li>
<li class="file-stats">
<a href="#e9c044b79842eca94ef683d075c4bfeca3bbb931">
compiler/GHC/Cmm/Lexer.x
</a>
</li>
<li class="file-stats">
<a href="#71e696f452eb493722d70306c6f304fc9b2f6a95">
compiler/GHC/Cmm/Parser.y
</a>
</li>
<li class="file-stats">
<a href="#c1b0959b75a7a0d23334b99aea968a34ef714ce4">
compiler/GHC/Cmm/Parser/Monad.hs
</a>
</li>
<li class="file-stats">
<a href="#bd153f89bc48f3fd5079b51fb799808aacbd750c">
compiler/GHC/Core/Opt/Pipeline.hs
</a>
</li>
<li class="file-stats">
<a href="#578c7c3857d66d963736ff6742f3433a0e8d01b7">
compiler/GHC/Core/TyCo/Rep.hs
</a>
</li>
<li class="file-stats">
<a href="#8ee6f6851986ea96987a52f1dbf39228c85c6032">
compiler/GHC/Core/TyCo/Subst.hs
</a>
</li>
<li class="file-stats">
<a href="#4aad0050db1a8a20db8bbca149111de99cb299c9">
compiler/GHC/Core/TyCon.hs
</a>
</li>
<li class="file-stats">
<a href="#84c9d3ba34173297e7d7747e02caa2e004b164fc">
compiler/GHC/Core/Type.hs
</a>
</li>
<li class="file-stats">
<a href="#89a2e0e1a3095c7a42b10f2819049908908080e8">
compiler/GHC/Core/Unify.hs
</a>
</li>
<li class="file-stats">
<a href="#dbce6cb5e8f3d5287103c66d1a56ad63bbbd11a9">
compiler/GHC/Driver/Backpack.hs
</a>
</li>
<li class="file-stats">
<a href="#9df7e695170800345fb44916a8e8f4b8f3c55be0">
compiler/GHC/Driver/CodeOutput.hs
</a>
</li>
<li class="file-stats">
<a href="#c7700b61eaeb27e90fb2f1acc6cfd53ddaa4d690">
compiler/GHC/Driver/Env.hs
</a>
</li>
<li class="file-stats">
<a href="#8e72a25145f803aab964beb710b25dd6cd38aafc">
compiler/GHC/Driver/Hooks.hs
</a>
</li>
<li class="file-stats">
<a href="#9a679a2680ef6061397f1987091ea9f96ffe095d">
compiler/GHC/Driver/Main.hs
</a>
</li>
<li class="file-stats">
<a href="#1dab250036d04cfcf3530f6ff27889f723cc2dda">
compiler/GHC/Driver/Make.hs
</a>
</li>
<li class="file-stats">
<a href="#53557c97f676581665e366694f2931a29d6d76cd">
compiler/GHC/Driver/MakeFile.hs
</a>
</li>
<li class="file-stats">
<a href="#b8e6af642e56019828828dc679683c04afb81867">
compiler/GHC/Driver/Pipeline.hs
</a>
</li>
<li class="file-stats">
<a href="#6ec70fbb98441b6a9cc31f97762a13702a4f99fc">
compiler/GHC/Driver/Pipeline/Monad.hs
</a>
</li>
<li class="file-stats">
<a href="#c1ebbd8dd9934a9830cc2a4690e75465600f1554">
compiler/GHC/Driver/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#774d88050336ef660c7a219fb06c480c2fc639bc">
compiler/GHC/Driver/Session.hs
</a>
</li>
<li class="file-stats">
<a href="#d798290c6a51284ce2f486104ed4a796ceb080e2">
compiler/GHC/Driver/Session.hs-boot
</a>
</li>
<li class="file-stats">
<a href="#65ca06d51797ebf672a62bde6c00bcb9444e1425">
compiler/GHC/Hs/Binds.hs
</a>
</li>
<li class="file-stats">
<a href="#75bfcd03f3ba9315d33104fcb0424c6bfeb4e334">
compiler/GHC/Hs/Decls.hs
</a>
</li>
<li class="file-stats">
<a href="#0bae7e7e67b5f9b6ba2a371f8917cf74423a0c6f">
compiler/GHC/Hs/Pat.hs
</a>
</li>
<li class="file-stats">
<a href="#018be522bc4813b147a1525e4f96a7a493207d96">
compiler/GHC/Hs/Type.hs
</a>
</li>
<li class="file-stats">
<a href="#7a1af22e4c32b9aa6ec708d9d3788e1c4db5da9a">
compiler/GHC/Hs/Utils.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: #666;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/2aa777bf02e48255b7fc482b58505e60fbd843a6...79c6c01a7540a78ec6e492f86f84c8fec5f57bd1">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>