<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/haskell.git, branch wip/joachim/no-app-invariant</title>
<subtitle>gitlab.haskell.org: ghc/ghc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/'/>
<entry>
<title>Drop the app invariant</title>
<updated>2022-04-07T20:02:46+00:00</updated>
<author>
<name>Joachim Breitner</name>
<email>mail@joachim-breitner.de</email>
</author>
<published>2022-04-07T20:02:46+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=29ef4439df47a123ece18af34d98cb016af78a2b'/>
<id>29ef4439df47a123ece18af34d98cb016af78a2b</id>
<content type='text'>
previously, GHC had the "let/app-invariant" which said that the RHS of a
let or the argument of an application must be of lifted type or ok for
speculation. We want this on let to freely float them around, and we
wanted that on app to freely convert between the two (e.g. in
beta-reduction or inlining).

However, the app invariant meant that simple code didn't stay simple and
this got in the way of rules matching. By removing the app invariant,
this thus fixes #20554.

The new invariant is now called "let-can-float invariant", which is
hopefully easier to guess its meaning correctly.

Dropping the app invariant means that everywhere where we effectively do
beta-reduction (in the two simplifiers, but also in `exprIsConApp_maybe`
and other innocent looking places) we now have to check if the argument
must be evaluated (unlifted and side-effecting), and analyses have to be
adjusted to the new semantics of `App`.

Also, `LetFloats` in the simplifier can now also carry such non-floating
bindings.

The fix for DmdAnal, refine by Sebastian, makes functions with unlifted
arguments strict in these arguments, which changes some signatures.

This causes some extra calls to `exprType` and `exprOkForSpeculation`,
so some perf benchmarks regress a bit (while others improve).

Metric Decrease:
    T9020
Metric Increase:
    LargeRecord
    T12545
    T15164
    T16577
    T18223
    T5642
    T9961

Co-authored-by: Sebastian Graf &lt;sebastian.graf@kit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
previously, GHC had the "let/app-invariant" which said that the RHS of a
let or the argument of an application must be of lifted type or ok for
speculation. We want this on let to freely float them around, and we
wanted that on app to freely convert between the two (e.g. in
beta-reduction or inlining).

However, the app invariant meant that simple code didn't stay simple and
this got in the way of rules matching. By removing the app invariant,
this thus fixes #20554.

The new invariant is now called "let-can-float invariant", which is
hopefully easier to guess its meaning correctly.

Dropping the app invariant means that everywhere where we effectively do
beta-reduction (in the two simplifiers, but also in `exprIsConApp_maybe`
and other innocent looking places) we now have to check if the argument
must be evaluated (unlifted and side-effecting), and analyses have to be
adjusted to the new semantics of `App`.

Also, `LetFloats` in the simplifier can now also carry such non-floating
bindings.

The fix for DmdAnal, refine by Sebastian, makes functions with unlifted
arguments strict in these arguments, which changes some signatures.

This causes some extra calls to `exprType` and `exprOkForSpeculation`,
so some perf benchmarks regress a bit (while others improve).

Metric Decrease:
    T9020
Metric Increase:
    LargeRecord
    T12545
    T15164
    T16577
    T18223
    T5642
    T9961

Co-authored-by: Sebastian Graf &lt;sebastian.graf@kit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Properly explain where INLINE pragmas can appear.</title>
<updated>2022-04-07T16:59:12+00:00</updated>
<author>
<name>Andreas Klebinger</name>
<email>klebinger.andreas@gmx.at</email>
</author>
<published>2022-04-05T08:21:55+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=b3d6d23d11a19d5304538b4a55bd9b93f39a3e63'/>
<id>b3d6d23d11a19d5304538b4a55bd9b93f39a3e63</id>
<content type='text'>
Fixes #20676
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #20676
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the free-var test in validDerivPred</title>
<updated>2022-04-07T16:58:36+00:00</updated>
<author>
<name>Simon Peyton Jones</name>
<email>simonpj@microsoft.com</email>
</author>
<published>2022-03-29T09:23:37+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=08480d2af91b933a2cfc1e2f97a132eab6bba254'/>
<id>08480d2af91b933a2cfc1e2f97a132eab6bba254</id>
<content type='text'>
The free-var test (now documented as (VD3)) was too narrow,
affecting only class predicates.  #21302 demonstrated that
this wasn't enough!

Fixes #21302.

Co-authored-by: Ryan Scott &lt;ryan.gl.scott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The free-var test (now documented as (VD3)) was too narrow,
affecting only class predicates.  #21302 demonstrated that
this wasn't enough!

Fixes #21302.

Co-authored-by: Ryan Scott &lt;ryan.gl.scott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename [] to List (#21294)</title>
<updated>2022-04-07T16:57:59+00:00</updated>
<author>
<name>Vladislav Zavialov</name>
<email>vlad.z.4096@gmail.com</email>
</author>
<published>2022-04-06T16:55:11+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=02279a9c37deb34556834f706dbedc09258df753'/>
<id>02279a9c37deb34556834f706dbedc09258df753</id>
<content type='text'>
This patch implements a small part of GHC Proposal #475.
The key change is in GHC.Types:

	- data [] a = [] | a : [a]
	+ data List a = [] | a : List a

And the rest of the patch makes sure that List is pretty-printed as []
in various contexts.

Updates the haddock submodule.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements a small part of GHC Proposal #475.
The key change is in GHC.Types:

	- data [] a = [] | a : [a]
	+ data List a = [] | a : List a

And the rest of the patch makes sure that List is pretty-printed as []
in various contexts.

Updates the haddock submodule.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use prepareBinding in tryCastWorkerWrapper</title>
<updated>2022-04-07T16:57:21+00:00</updated>
<author>
<name>Simon Peyton Jones</name>
<email>simon.peytonjones@gmail.com</email>
</author>
<published>2022-03-11T16:55:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=83363c8b04837ee871a304cf85207cf79b299fb0'/>
<id>83363c8b04837ee871a304cf85207cf79b299fb0</id>
<content type='text'>
As #21144 showed, tryCastWorkerWrapper was calling prepareRhs, and
then unconditionally floating the bindings, without the checks of
doFloatFromRhs.   That led to floating an unlifted binding into
a Rec group.

This patch refactors prepareBinding to make these checks,
and do them uniformly across all calls.  A nice improvement.

Other changes
* Instead of passing around a RecFlag and a TopLevelFlag; and sometimes
  a (Maybe SimplCont) for join points, define a new Simplifier-specific
  data type BindContext:
      data BindContext = BC_Let  TopLevelFlag RecFlag
                       | BC_Join SimplCont
  and use it consistently.

* Kill off completeNonRecX by inlining it.  It was only called in
  one place.

* Add a wrapper simplImpRules for simplRules.

Compile time on T9630 drops by 4.7%; little else changes.

Metric Decrease:
    T9630
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As #21144 showed, tryCastWorkerWrapper was calling prepareRhs, and
then unconditionally floating the bindings, without the checks of
doFloatFromRhs.   That led to floating an unlifted binding into
a Rec group.

This patch refactors prepareBinding to make these checks,
and do them uniformly across all calls.  A nice improvement.

Other changes
* Instead of passing around a RecFlag and a TopLevelFlag; and sometimes
  a (Maybe SimplCont) for join points, define a new Simplifier-specific
  data type BindContext:
      data BindContext = BC_Let  TopLevelFlag RecFlag
                       | BC_Join SimplCont
  and use it consistently.

* Kill off completeNonRecX by inlining it.  It was only called in
  one place.

* Add a wrapper simplImpRules for simplRules.

Compile time on T9630 drops by 4.7%; little else changes.

Metric Decrease:
    T9630
</pre>
</div>
</content>
</entry>
<entry>
<title>EPA: handling of con_bndrs in mkGadtDecl</title>
<updated>2022-04-07T11:56:28+00:00</updated>
<author>
<name>Alan Zimmerman</name>
<email>alan.zimm@gmail.com</email>
</author>
<published>2022-03-17T18:07:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=54b1882416558936d171d78749400b1c838b11b8'/>
<id>54b1882416558936d171d78749400b1c838b11b8</id>
<content type='text'>
Get rid of unnnecessary case clause that always matched.

Closes #20558
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Get rid of unnnecessary case clause that always matched.

Closes #20558
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove Fun pattern from Typeable COMPLETE set</title>
<updated>2022-04-07T11:55:52+00:00</updated>
<author>
<name>sheaf</name>
<email>sam.derbyshire@gmail.com</email>
</author>
<published>2022-03-31T09:59:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=429ea5d9147a9d3bd2513b27a4064c1ca1be2090'/>
<id>429ea5d9147a9d3bd2513b27a4064c1ca1be2090</id>
<content type='text'>
GHC merge request !963 improved warnings in the presence of
COMPLETE annotations. This allows the removal of the Fun pattern
from the complete set.

Doing so expectedly causes some redundant pattern match warnings,
in particular in GHC.Utils.Binary.Typeable and Data.Binary.Class
from the binary library; this commit addresses that.

Updates binary submodule

Fixes #20230
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GHC merge request !963 improved warnings in the presence of
COMPLETE annotations. This allows the removal of the Fun pattern
from the complete set.

Doing so expectedly causes some redundant pattern match warnings,
in particular in GHC.Utils.Binary.Typeable and Data.Binary.Class
from the binary library; this commit addresses that.

Updates binary submodule

Fixes #20230
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor OutputableBndrFlag instances</title>
<updated>2022-04-06T17:03:53+00:00</updated>
<author>
<name>Vladislav Zavialov</name>
<email>vlad.z.4096@gmail.com</email>
</author>
<published>2022-04-02T10:59:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=88d610317a707eb33fe8f1a1a8ab6456279861f2'/>
<id>88d610317a707eb33fe8f1a1a8ab6456279861f2</id>
<content type='text'>
The matching on GhcPass introduced by 95275a5f25a is not necessary.
This patch reverts it to make the code simpler.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The matching on GhcPass introduced by 95275a5f25a is not necessary.
This patch reverts it to make the code simpler.
</pre>
</div>
</content>
</entry>
<entry>
<title>Bump text submodule to current `master`</title>
<updated>2022-04-06T17:03:16+00:00</updated>
<author>
<name>Ben Gamari</name>
<email>ben@smart-cactus.org</email>
</author>
<published>2022-03-26T17:37:59+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=a62e983e695b48e37ba5d867fe55a08c964813df'/>
<id>a62e983e695b48e37ba5d867fe55a08c964813df</id>
<content type='text'>
Addresses #21295.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Addresses #21295.
</pre>
</div>
</content>
</entry>
<entry>
<title>gitlab-ci: Bump bootstrap compiler to 9.2.2</title>
<updated>2022-04-06T17:03:16+00:00</updated>
<author>
<name>Ben Gamari</name>
<email>ben@smart-cactus.org</email>
</author>
<published>2022-03-26T16:09:31+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=6563cd2473a309b135eb8f950adf28b9f3d8e5c2'/>
<id>6563cd2473a309b135eb8f950adf28b9f3d8e5c2</id>
<content type='text'>
This is necessary to build recent `text` commits.

Bumps Hackage index state for a hashable which builds with GHC 9.2.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is necessary to build recent `text` commits.

Bumps Hackage index state for a hashable which builds with GHC 9.2.
</pre>
</div>
</content>
</entry>
</feed>
