[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 10 commits: DmdAnal: Look through unfoldings of DataCon wrappers (#22241)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Oct 17 16:30:10 UTC 2022



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
c1e5719a by Sebastian Graf at 2022-10-17T11:58:46-04:00
DmdAnal: Look through unfoldings of DataCon wrappers (#22241)

Previously, the demand signature we computed upfront for a DataCon wrapper

lacked boxity information and was much less precise than the demand transformer

for the DataCon worker.

In this patch we adopt the solution to look through unfoldings of DataCon

wrappers during Demand Analysis, but still attach a demand signature for other

passes such as the Simplifier.

See `Note [DmdAnal for DataCon wrappers]` for more details.

Fixes #22241.

- - - - -
1ea328b9 by Gergo ERDI at 2022-10-17T12:29:44-04:00
Add `Enum (Down a)` instance that swaps `succ` and `pred`

See https://github.com/haskell/core-libraries-committee/issues/51 for
discussion. The key points driving the implementation are the following
two ideas:

* For the `Int` type, `comparing (complement @Int)` behaves exactly as
  an order-swapping `compare @Int`.
* `enumFrom @(Down a)` can be implemented in terms of `enumFromThen @a`,
  if only the corner case of starting at the very end is handled specially

- - - - -
640051f0 by Alan Zimmerman at 2022-10-17T12:29:44-04:00
Update the check-exact infrastructure to match ghc-exactprint

GHC tests the exact print annotations using the contents of
utils/check-exact.

The same functionality is provided via
https://github.com/alanz/ghc-exactprint

The latter was updated to ensure it works with all of the files on
hackage when 9.2 was released, as well as updated to ensure users of
the library could work properly (apply-refact, retrie, etc).

This commit brings the changes from ghc-exactprint into
GHC/utils/check-exact, adapting for the changes to master.

Once it lands, it will form the basis for the 9.4 version of
ghc-exactprint.

See also discussion around this process at #21355

- - - - -
f275e39c by Andreas Klebinger at 2022-10-17T12:29:45-04:00
Avoid allocating intermediate lists for non recursive bindings.

We do so by having an explicit folding function that doesn't need to
allocate intermediate lists first.

Fixes #22196

- - - - -
368c2359 by Andreas Klebinger at 2022-10-17T12:29:45-04:00
Testsuite: Add a new tables_next_to_code predicate.

And use it to avoid T21710a failing on non-tntc archs.

Fixes #22169

- - - - -
d05b4f93 by Eric Lindblad at 2022-10-17T12:29:50-04:00
example rewrite
- - - - -
b8bf5873 by Eric Lindblad at 2022-10-17T12:29:50-04:00
remove redirect
- - - - -
870be1ed by Eric Lindblad at 2022-10-17T12:29:50-04:00
use heredoc
- - - - -
7958393a by Matthew Pickering at 2022-10-17T12:29:51-04:00
testsuite: Fix typo when setting llvm_ways

Since 2014 llvm_ways has been set to [] so none of the tests which use
only_ways(llvm_ways) have worked as expected.

Hopefully the tests still pass with this typo fix!

- - - - -
3b5cd3ca by Krzysztof Gogolewski at 2022-10-17T12:29:51-04:00
Fix T15155l not getting -fllvm

- - - - -


30 changed files:

- compiler/GHC/Core.hs
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/Exitify.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Types/Var/Env.hs
- libraries/base/Data/Ord.hs
- libraries/base/changelog.md
- testsuite/config/ghc
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/ghc-config/ghc-config.hs
- testsuite/mk/test.mk
- testsuite/tests/codeGen/should_compile/Makefile
- testsuite/tests/codeGen/should_compile/all.T
- testsuite/tests/ghc-api/exactprint/AddDecl2.expected.hs
- testsuite/tests/ghc-api/exactprint/RmDecl7.expected.hs
- testsuite/tests/ghc-api/exactprint/RmDecl7.hs
- testsuite/tests/printer/Makefile
- + testsuite/tests/printer/Test21355.hs
- testsuite/tests/printer/all.T
- + testsuite/tests/stranal/sigs/T22241.hs
- + testsuite/tests/stranal/sigs/T22241.stderr
- testsuite/tests/stranal/sigs/all.T
- utils/check-exact/.ghci


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e09bd1d388e06a978410886d3d998ba5ce64e1cf...3b5cd3ca3e679db9f1d9e0d47ed166b5d534897f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e09bd1d388e06a978410886d3d998ba5ce64e1cf...3b5cd3ca3e679db9f1d9e0d47ed166b5d534897f
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221017/1dfe6912/attachment.html>


More information about the ghc-commits mailing list