<!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/T19057
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/58ec3598050fd98dc5b874179aaee4aedd2fd255">58ec3598</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-15T10:55:35-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Fix typo in macro name

THREADED_RTS was previously misspelled as THREADEDED_RTS.

Fixes #19057.</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="#0887cf39c5cdf9cf8d6758f410d7dab3023c0d77">
compiler/GHC/Builtin/Names.hs
</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="#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>
</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/5ed9baf135911f5ae217dba2617b3fce6c2fd78b...58ec3598050fd98dc5b874179aaee4aedd2fd255">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>