<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">
<h3 style="margin-top: 20px; margin-bottom: 10px;">
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
Commits:
</h4>
<ul>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/a948ae4fdef13e138e54370f83ccc1cb26daff2f">a948ae4f</a></strong>
<div>
<span> by Simon Peyton Jones </span> <i> at 2024-09-25T06:27:10-04:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Add Given injectivity for built-in type families
Ticket #24845 asks (reasonably enough) that if we have
[G] a+b ~ 0
then we also know
[G] a ~ 0, b ~ 0
and similar injectivity-like facts for other built-in type
families. The status quo was that we never generate evidence for
injectivity among Givens -- but it is quite reasonnable to do so.
All we need is to have /evidence/ for the new constraints
This MR implements that goal. I also took the opportunity to
* Address #24978: refactoring UnivCo
* Fix #25248, which was a consequences of the previous formulation of UnivCo
As a result this MR touches a lot of code. The big things are:
* Coercion constructor UnivCo now takes a [Coercion] as argument to
express the coercions on which the UnivCo depends. A nice consequence
is that UnivCoProvenance now has no free variables, simpler in a number
of places.
* Coercion constructors AxiomInstCo and AxiomRuleCo are combined into
AxiomCo. The new AxiomCo, carries a (slightly oddly named)
CoAxiomRule, which itself is a sum type of the various forms of
built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom
A merit of this is that we can separate the case of open and closed
type families, and eliminate the redundant `BranchIndex` in the former
case.
* Much better representation for data BuiltInSynFamily, which means we
no longer need to enumerate built-in axioms as well as built-in tycons.
* There is a massive refactor in GHC.Builtin.Types.Literals, which contains all
the built-in axioms for type-level operations (arithmetic, append, cons etc).
A big change is that instead of redundantly having (a) a hand-written
matcher, and (b) a template-based "proves" function, which were hard to
keep in sync, the two are derive from one set of human-supplied info.
See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends.
* Significant changes in GHC.Tc.Solver.Equality to account for the new
opportunity for Given/Given equalities.
Smaller things
* Improve pretty-printing to avoid parens around atomic coercions.
* Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`.
Looks like a bug, Richard agrees.
* coercionLKind and coercionRKind are hot functions. I refactored the
implementation (which I had to change anyway) to increase sharing.
See Note [coercionKind performance] in GHC.Core.Coercion
* I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan
names
* I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid
calling tyConsOfType. I forget exactly why I did this, but it's definitely
better now.
* I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv
and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c615193ce7338082d853125dd95b6eb2cad9de90">c615193c</a></strong>
<div>
<span> by Ryan Scott </span> <i> at 2024-09-25T06:27:11-04:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Resolve ambiguous method-bound type variables in vanilla defaults and GND
When defining an instance of a class with a "vanilla" default, such as in the
following example (from #14266):
```hs
class A t where
f :: forall x m. Monoid x => t m -> m
f = <blah>
instance A []
```
We have to reckon with the fact that the type of `x` (bound by the type
signature for the `f` method) is ambiguous. If we don't deal with the ambiguity
somehow, then when we generate the following code:
```hs
instance A [] where
f = $dmf @[] -- NB: the type of `x` is still ambiguous
```
Then the generated code will not typecheck. (Issue #25148 is a more recent
example of the same problem.)
To fix this, we bind the type variables from the method's original type
signature using `TypeAbstractions` and instantiate `$dmf` with them using
`TypeApplications`:
```hs
instance A [] where
f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous
```
Note that we only do this for vanilla defaults and not for generic defaults
(i.e., defaults using `DefaultSignatures`). For the full details, see `Note
[Default methods in instances] (Wrinkle: Ambiguous types from vanilla method
type signatures)`.
The same problem arose in the code generated by `GeneralizedNewtypeDeriving`,
as we also fix it here using the same technique. This time, we can take
advantage of the fact that `GeneralizedNewtypeDeriving`-generated code
_already_ brings method-bound type variables into scope via `TypeAbstractions`
(after !13190), so it is very straightforward to visibly apply the type
variables on the right-hand sides of equations. See `Note [GND and ambiguity]`.
Fixes #14266. Fixes #25148.
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8f238895636f57e0acc78e968a9de24dd8ab32d7">8f238895</a></strong>
<div>
<span> by ARATA Mizuki </span> <i> at 2024-09-25T06:27:14-04:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Document primitive string literals and desugaring of string literals
Fixes #17474 and #17974
Co-authored-by: Matthew Craven <5086-clyring@users.noreply.gitlab.haskell.org>
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2ec0e30ea30f405968f9b2ced4d4c0c8a4ec484a">2ec0e30e</a></strong>
<div>
<span> by Zubin Duggal </span> <i> at 2024-09-25T06:27:15-04:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>rts: Fix segfault when using non-moving GC with profiling
`nonMovingCollect()` swaps out the `static_flag` value used as a
sentinel for `gct->scavenged_static_objects`, but the subsequent call
`resetStaticObjectForProfiling()` sees the old value of `static_flag` used as
the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()`
before calling `nonMovingCollect()` as otherwise it looks for the incorrect
sentinel value
Fixes #25232 and #23958
Also teach the testsuite driver about nonmoving profiling ways
and stop disabling metric collection when nonmoving GC is enabled.
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3e379148d5d65f9ec1864c6897bba910afce52c5">3e379148</a></strong>
<div>
<span> by Sylvain Henry </span> <i> at 2024-09-25T06:27:28-04:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Fix interaction between fork and kqueue (#24672)
A kqueue file descriptor isn't inherited by a child created with fork.
As such we mustn't try to close this file descriptor as we would close a
random one, e.g. the one used by timerfd.
Fix #24672
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/fff2dcddb140508ba222a9314fd53d025625cf5d">fff2dcdd</a></strong>
<div>
<span> by Simon Peyton Jones </span> <i> at 2024-09-25T06:27:29-04:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Improve GHC.Tc.Solver.defaultEquality
This MR improves GHC.Tc.Solver.defaultEquality to solve #25251.
The main change is to use checkTyEqRhs to check the equality, so
that we do promotion properly.
But within that we needed a small enhancement to LC_Promote. See
Note [Defaulting equalites] (DE4) and (DE5)
The tricky case is (alas) hard to trigger, so I have not added a
regression test.
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/48700abd54735d941ed4dc130eca15b6b91d610c">48700abd</a></strong>
<div>
<span> by Sylvain Henry </span> <i> at 2024-09-25T06:27:33-04:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>JS: fix h$withCStringOnHeap helper (#25288)
strlen returns the length of the string without the \0 terminating byte,
hence CString weren't properly allocated on the heap (ending \0 byte was
missing).
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
10 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#02362b473a022fb921814e97a6beba08107d38b1">
compiler/GHC/Builtin/Types/Literals.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="#6fcf64907fb5bdd93082d2d1eb94e4566e735865">
compiler/GHC/Core/DataCon.hs
</a>
</li>
<li class="file-stats">
<a href="#448d7f6e0151c2014de38dead3a902f511c45b75">
compiler/GHC/Core/FVs.hs
</a>
</li>
<li class="file-stats">
<a href="#91648438362e5a35363d2bb7abb04016dedd7d7e">
compiler/GHC/Core/FamInstEnv.hs
</a>
</li>
<li class="file-stats">
<a href="#36a42448a83a9d1f6df8475f03ead2eed199dd8e">
compiler/GHC/Core/Lint.hs
</a>
</li>
<li class="file-stats">
<a href="#d01de95d8c71d4dec6a9a59146186e29a5b3fd38">
compiler/GHC/Core/Rules.hs
</a>
</li>
</ul>
<h5 style="margin-top: 10px; margin-bottom: 10px; font-size: .875rem;">
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: #737278;">
—
<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/3b086110f4e28cec1189eefa54fa250c579e3eb7...48700abd54735d941ed4dc130eca15b6b91d610c">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.haskell.org">gitlab.haskell.org</a>. <a href="https://gitlab.haskell.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.haskell.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
</p>
</div>
</body>
</html>