<!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/tyconapp-opts
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/49ebe369165c85ae4c2382b40e34bfa4f1e9da25">49ebe369</a></strong>
<div>
<span>by chessai</span>
<i>at 2020-11-30T19:47:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Optimisations in Data.Foldable (T17867)
This PR concerns the following functions from `Data.Foldable`:
* minimum
* maximum
* sum
* product
* minimumBy
* maximumBy
- Default implementations of these functions now use `foldl'` or `foldMap'`.
- All have been marked with INLINEABLE to make room for further optimisations.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4d79ef6599f44b5ab33cbd89fec96ebfac0794a1">4d79ef65</a></strong>
<div>
<span>by chessai</span>
<i>at 2020-11-30T19:47:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Apply suggestion to libraries/base/Data/Foldable.hs</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6af074cecdee533791943af1191541f82abc34c4">6af074ce</a></strong>
<div>
<span>by chessai</span>
<i>at 2020-11-30T19:47:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Apply suggestion to libraries/base/Data/Foldable.hs</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ab334262a605b0ebc228096d8af88a55aa5ea6b8">ab334262</a></strong>
<div>
<span>by Viktor Dukhovni</span>
<i>at 2020-11-30T19:48:17-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">dirty MVAR after mutating TSO queue head
While the original head and tail of the TSO queue may be in the same
generation as the MVAR, interior elements of the queue could be younger
after a GC run and may then be exposed by putMVar operation that updates
the queue head.
Resolves #18919
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/5eb163f321fdc9a3dbb5e02a157b7f8194e70fcc">5eb163f3</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:48:53-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/linker: Don't allow shared libraries to be loaded multiple times
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/490aa14dbc98e4713f913c4417d454e53b8b278a">490aa14d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:48:53-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/linker: Initialise CCSs from native shared objects
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6ac3db5fefbac6bea6c8fd0ac64daf036d9a8e60">6ac3db5f</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:48:53-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/linker: Move shared library loading logic into Elf.c
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b6698d73fa9811795ca37ba0b704aa430c390345">b6698d73</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-11-30T19:48:53-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/linker: Don't declare dynamic objects with image_mapped
This previously resulted in warnings due to spurious unmap failures.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b94a65afe1e270245cd5b9fe03d59b726dfba8c4">b94a65af</a></strong>
<div>
<span>by jneira</span>
<i>at 2020-11-30T19:49:31-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Include tried paths in findToolDir error
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/72a87fbc7a95c012be260d1a14374e2b06ed0a36">72a87fbc</a></strong>
<div>
<span>by Richard Eisenberg</span>
<i>at 2020-12-01T19:57:41-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Move core flattening algorithm to Core.Unify
This sets the stage for a later change, where this
algorithm will be needed from GHC.Core.InstEnv.
This commit also splits GHC.Core.Map into
GHC.Core.Map.Type and GHC.Core.Map.Expr,
in order to avoid module import cycles
with GHC.Core.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0dd45d0adbade7eaae973b09b4d0ff1acb1479b8">0dd45d0a</a></strong>
<div>
<span>by Richard Eisenberg</span>
<i>at 2020-12-01T19:57:41-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Bump the # of commits searched for perf baseline
The previous value of 75 meant that a feature branch with
more than 75 commits would get spurious CI passes.
This affects #18692, but does not fix that ticket, because
if a baseline cannot be found, we should fail, not succeed.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8bb52d9186655134e3e06b4dc003e060379f5417">8bb52d91</a></strong>
<div>
<span>by Richard Eisenberg</span>
<i>at 2020-12-01T19:57:41-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Remove flattening variables
This patch redesigns the flattener to simplify type family applications
directly instead of using flattening meta-variables and skolems. The key new
innovation is the CanEqLHS type and the new CEqCan constraint (Ct). A CanEqLHS
is either a type variable or exactly-saturated type family application; either
can now be rewritten using a CEqCan constraint in the inert set.
Because the flattener no longer reduces all type family applications to
variables, there was some performance degradation if a lengthy type family
application is now flattened over and over (not making progress). To
compensate, this patch contains some extra optimizations in the flattener,
leading to a number of performance improvements.
Close #18875.
Close #18910.
There are many extra parts of the compiler that had to be affected in writing
this patch:
* The family-application cache (formerly the flat-cache) sometimes stores
coercions built from Given inerts. When these inerts get kicked out, we must
kick out from the cache as well. (This was, I believe, true previously, but
somehow never caused trouble.) Kicking out from the cache requires adding a
filterTM function to TrieMap.
* This patch obviates the need to distinguish "blocking" coercion holes from
non-blocking ones (which, previously, arose from CFunEqCans). There is thus
some simplification around coercion holes.
* Extra commentary throughout parts of the code I read through, to preserve
the knowledge I gained while working.
* A change in the pure unifier around unifying skolems with other types.
Unifying a skolem now leads to SurelyApart, not MaybeApart, as documented
in Note [Binding when looking up instances] in GHC.Core.InstEnv.
* Some more use of MCoercion where appropriate.
* Previously, class-instance lookup automatically noticed that e.g. C Int was
a "unifier" to a target [W] C (F Bool), because the F Bool was flattened to
a variable. Now, a little more care must be taken around checking for
unifying instances.
* Previously, tcSplitTyConApp_maybe would split (Eq a => a). This is silly,
because (=>) is not a tycon in Haskell. Fixed now, but there are some
knock-on changes in e.g. TrieMap code and in the canonicaliser.
* New function anyFreeVarsOf{Type,Co} to check whether a free variable
satisfies a certain predicate.
* Type synonyms now remember whether or not they are "forgetful"; a forgetful
synonym drops at least one argument. This is useful when flattening; see
flattenView.
* The pattern-match completeness checker invokes the solver. This invocation
might need to look through newtypes when checking representational equality.
Thus, the desugarer needs to keep track of the in-scope variables to know
what newtype constructors are in scope. I bet this bug was around before but
never noticed.
* Extra-constraints wildcards are no longer simplified before printing.
See Note [Do not simplify ConstraintHoles] in GHC.Tc.Solver.
* Whether or not there are Given equalities has become slightly subtler.
See the new HasGivenEqs datatype.
* Note [Type variable cycles in Givens] in GHC.Tc.Solver.Canonical
explains a significant new wrinkle in the new approach.
* See Note [What might match later?] in GHC.Tc.Solver.Interact, which
explains the fix to #18910.
* The inert_count field of InertCans wasn't actually used, so I removed
it.
Though I (Richard) did the implementation, Simon PJ was very involved
in design and review.
This updates the Haddock submodule to avoid #18932 by adding
a type signature.
-------------------------
Metric Decrease:
T12227
T5030
T9872a
T9872b
T9872c
Metric Increase:
T9872d
-------------------------
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d66660ba4c491f9937a1a959b009d90f08a4fbee">d66660ba</a></strong>
<div>
<span>by Richard Eisenberg</span>
<i>at 2020-12-01T19:57:41-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Rename the flattener to become the rewriter.
Now that flattening doesn't produce flattening variables,
it's not really flattening anything: it's rewriting. This
change also means that the rewriter can no longer be confused
the core flattener (in GHC.Core.Unify), which is sometimes used
during type-checking.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/add0aeaefd4d823d31315564e924ce8c018fb69e">add0aeae</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-01T19:58:17-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Introduce mmapAnonForLinker
Previously most of the uses of mmapForLinker were mapping anonymous
memory, resulting in a great deal of unnecessary repetition. Factor this
out into a new helper.
Also fixes a few places where error checking was missing or suboptimal.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/97d71646ddf3814de62573100ed0b224d1588cbc">97d71646</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-01T19:58:17-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/linker: Introduce munmapForLinker
Consolidates munmap calls to ensure consistent error handling.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d8872af08d205c3067371d56200e68cf2f0c1ffc">d8872af0</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-01T19:58:18-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Linker: Introduce Windows implementations for mmapForLinker, et al.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c35d0e03514ce111ff8265426a7b911456984f50">c35d0e03</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-01T19:58:18-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/m32: Introduce NEEDS_M32 macro
Instead of relying on RTS_LINKER_USE_MMAP
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/41c64eb5db50c80e110e47b7ab1c1ee18dada46b">41c64eb5</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-01T19:58:18-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/linker: Use m32 to allocate symbol extras in PEi386
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e1b35bfab8deb6614fa8eb223e4b2c9d23156cc9">e1b35bfa</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-12-03T14:43:36-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
T9872a
T13035
haddock.Cabal
haddock.base
</pre>
</li>
</ul>
<h4>23 changed files:</h4>
<ul>
<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="#806448db91cc2906ebcc088107220a663d3d43eb">
compiler/GHC/Cmm/CommonBlockElim.hs
</a>
</li>
<li class="file-stats">
<a href="#4fbb1c5f251c38fc01fcde693420ee6d02df7e45">
compiler/GHC/Cmm/Dataflow/Label.hs
</a>
</li>
<li class="file-stats">
<a href="#783e5dae6e86931f06700fc088fb7d48c8a07386">
compiler/GHC/Core/Coercion.hs
</a>
</li>
<li class="file-stats">
<a href="#b0ab2032bd0c006bb9cda1e5433173de35930f53">
compiler/GHC/Core/Coercion.hs-boot
</a>
</li>
<li class="file-stats">
<a href="#f10ed7a2470454dfdd8691a08beba67d8b78ee70">
compiler/GHC/Core/Coercion/Axiom.hs
</a>
</li>
<li class="file-stats">
<a href="#975dc08a8e7942b32d621f617d5a9c1b668601dd">
compiler/GHC/Core/Coercion/Opt.hs
</a>
</li>
<li class="file-stats">
<a href="#91648438362e5a35363d2bb7abb04016dedd7d7e">
compiler/GHC/Core/FamInstEnv.hs
</a>
</li>
<li class="file-stats">
<a href="#5596bb0f228bd2a308c4391df97375ae879430a8">
compiler/GHC/Core/InstEnv.hs
</a>
</li>
<li class="file-stats">
<a href="#640612f2fdc707ac7ee74f4165a7b86f38aa6249">
<span class="new-file">
+
compiler/GHC/Core/Map/Expr.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#691eec62dc293d0881c314b38b7363dc88b44c59">
compiler/GHC/Core/Map.hs
→
compiler/GHC/Core/Map/Type.hs
</a>
</li>
<li class="file-stats">
<a href="#446b4afbe6836b950115a619acea24ddde19dc90">
compiler/GHC/Core/Opt/CSE.hs
</a>
</li>
<li class="file-stats">
<a href="#039e8f5676356ef05c90af828aae48aac7296e47">
compiler/GHC/Core/TyCo/FVs.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="#d1a980a3e0f207c148bb3ab404696977015bcc56">
compiler/GHC/Core/TyCon/Env.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>
</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/c61782a7a1001fba689fb60877ab1b218079b1a7...e1b35bfab8deb6614fa8eb223e4b2c9d23156cc9">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>