[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 12 commits: Add `Enum (Down a)` instance that swaps `succ` and `pred`

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Oct 17 23:54:20 UTC 2022



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


Commits:
8c72411d by Gergo ERDI at 2022-10-17T19:20:04-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

- - - - -
d80ad2f4 by Alan Zimmerman at 2022-10-17T19:20:40-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

- - - - -
08ab5419 by Andreas Klebinger at 2022-10-17T19:21:15-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

- - - - -
ff6275ef by Andreas Klebinger at 2022-10-17T19:21:52-04:00
Testsuite: Add a new tables_next_to_code predicate.

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

Fixes #22169

- - - - -
abb82f38 by Eric Lindblad at 2022-10-17T19:22:33-04:00
example rewrite
- - - - -
39beb801 by Eric Lindblad at 2022-10-17T19:22:33-04:00
remove redirect
- - - - -
0d9fb651 by Eric Lindblad at 2022-10-17T19:22:33-04:00
use heredoc
- - - - -
0fa2d185 by Matthew Pickering at 2022-10-17T19:23:10-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!

- - - - -
ced664a2 by Krzysztof Gogolewski at 2022-10-17T19:23:10-04:00
Fix T15155l not getting -fllvm

- - - - -
a2b40dd4 by Andreas Klebinger at 2022-10-17T19:53:52-04:00
Fix GHCis interaction with tag inference.

I had assumed that wrappers were not inlined in interactive mode.
Meaning we would always execute the compiled wrapper which properly
takes care of upholding the strict field invariant.
This turned out to be wrong. So instead we now run tag inference even
when we generate bytecode. In that case only for correctness not
performance reasons although it will be still beneficial for runtime
in some cases.

I further fixed a bug where GHCi didn't tag nullary constructors
properly when used as arguments. Which caused segfaults when calling
into compiled functions which expect the strict field invariant to
be upheld.

Fixes #22042 and #21083

-------------------------
Metric Increase:
    T4801

Metric Decrease:
    T13035
-------------------------

- - - - -
1b5b9b14 by M Farkas-Dyck at 2022-10-17T19:54:01-04:00
Make `Functor` a superclass of `TrieMap`, which lets us derive the `map` functions.

- - - - -
4d092683 by Jan HrĨek at 2022-10-17T19:54:05-04:00
Small language fixes in 'Using GHC'

- - - - -


30 changed files:

- compiler/GHC/Cmm/Dataflow/Label.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Map/Expr.hs
- compiler/GHC/Core/Map/Type.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/Data/TrieMap.hs
- compiler/GHC/Driver/GenerateCgIPEStub.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Stg/CSE.hs
- compiler/GHC/Stg/InferTags.hs
- compiler/GHC/Stg/InferTags/Rewrite.hs
- compiler/GHC/Stg/InferTags/TagSig.hs
- compiler/GHC/Stg/Pipeline.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm/Types.hs
- compiler/GHC/Types/Name/Set.hs
- compiler/GHC/Types/Var/Env.hs
- docs/users_guide/using.rst
- libraries/base/Data/Ord.hs
- libraries/base/changelog.md
- testsuite/config/ghc
- testsuite/driver/testglobals.py


The diff was not included because it is too large.


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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3b5cd3ca3e679db9f1d9e0d47ed166b5d534897f...4d092683e1a66559824a2a013e8db278f00a25ca
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/eb7bff65/attachment-0001.html>


More information about the ghc-commits mailing list