[Git][ghc/ghc][wip/cross-ci] 27 commits: Add `Enum (Down a)` instance that swaps `succ` and `pred`

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Tue Oct 18 17:27:25 UTC 2022



Ben Gamari pushed to branch wip/cross-ci 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

- - - - -
0ac60423 by Andreas Klebinger at 2022-10-18T03:34:47-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
-------------------------

- - - - -
9ecd1ac0 by M Farkas-Dyck at 2022-10-18T03:35:38-04:00
Make `Functor` a superclass of `TrieMap`, which lets us derive the `map` functions.

- - - - -
f60244d7 by Ben Gamari at 2022-10-18T03:36:15-04:00
configure: Bump minimum bootstrap GHC version

Fixes #22245

- - - - -
ba4bd4a4 by Matthew Pickering at 2022-10-18T03:36:55-04:00
Build System: Remove out-of-date comment about make build system

Both make and hadrian interleave compilation of modules of different
modules and don't respect the package boundaries. Therefore I just
remove this comment which points out this "difference".

Fixes #22253

- - - - -
fad57fa1 by Ben Gamari at 2022-10-18T13:27:19-04:00
gitlab-ci: Add CI support for s390x under cross-compilation

This adds rudimentary validation of s390x (supported via the LLVM
backend) via cross-compilation on Debian 11. The goal is to provide at
least minimal test coverage of big-endian platforms.

- - - - -
cb6af570 by Ben Gamari at 2022-10-18T13:27:19-04:00
testsuite/driver: Add basic support for testing cross-compilers

- - - - -
5f491ac8 by Ben Gamari at 2022-10-18T13:27:19-04:00
testsuite: Mark annrun01 as req_interp

Annotations require the compile-time code loading.

- - - - -
7988b08a by Ben Gamari at 2022-10-18T13:27:19-04:00
testsuite: Drop annotation from T17904

Annotations make it harder to run tests due to compile-time code loading
and this particular annotation was not critical to the test.

- - - - -
7b3748ad by Ben Gamari at 2022-10-18T13:27:19-04:00
testsuite: Mark T21115b as req_th

- - - - -
675bb11b by Ben Gamari at 2022-10-18T13:27:20-04:00
testsuite/driver: Normalize away differences in ghc executable name

- - - - -
229797f4 by Ben Gamari at 2022-10-18T13:27:20-04:00
testsuite: Mark cc017 as req_th

- - - - -
bf886b64 by Ben Gamari at 2022-10-18T13:27:20-04:00
testsuite: Mark some multipleHomeUnits tests as req_th

- - - - -
8a9d172d by Ben Gamari at 2022-10-18T13:27:20-04:00
testsuite: Mark NoFieldSelectors as req_interp

Due to ANN usage.

- - - - -
60c85797 by Ben Gamari at 2022-10-18T13:27:20-04:00
testsuite: Mark LinearTH tests as req_th

- - - - -
566a28ee by Ben Gamari at 2022-10-18T13:27:20-04:00
testsuite: Mark overfloadedrecflds/ghci tests as req_interp

Due to ghci usage.

- - - - -
9965cf0a by Ben Gamari at 2022-10-18T13:27:20-04:00
testsuite: Mark T7919 as req_th

- - - - -
739c43a3 by Ben Gamari at 2022-10-18T13:27:20-04:00
testsuite: Mark a number of tests omitting profasm as req_th

- - - - -
42a9d348 by Ben Gamari at 2022-10-18T13:27:20-04:00
testsuite: Introduce and use req_plugins

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- 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
- configure.ac
- libraries/base/Data/Ord.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a9faeb41738ef15b728a9b4d06612c1a7038a13a...42a9d348601989e61650f0967ae4d4a290d7bc5b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a9faeb41738ef15b728a9b4d06612c1a7038a13a...42a9d348601989e61650f0967ae4d4a290d7bc5b
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/20221018/8538d142/attachment-0001.html>


More information about the ghc-commits mailing list