[Git][ghc/ghc][wip/hadrian-cross-stage2] 30 commits: Add laws relating between Foldable/Traversable with their Bi- superclasses

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Wed Nov 15 11:36:41 UTC 2023



Matthew Pickering pushed to branch wip/hadrian-cross-stage2 at Glasgow Haskell Compiler / GHC


Commits:
30baac7a by Tobias Haslop at 2023-11-06T10:50:32+00:00
Add laws relating between Foldable/Traversable with their Bi- superclasses

See https://github.com/haskell/core-libraries-committee/issues/205 for
discussion.

This commit also documents that the tuple instances only satisfy the
laws up to lazyness, similar to the documentation added in !9512.

- - - - -
df626f00 by Tobias Haslop at 2023-11-07T02:20:37-05:00
Elaborate on the quantified superclass of Bifunctor

This was requested in the comment
https://github.com/haskell/core-libraries-committee/issues/93#issuecomment-1597271700
for when Traversable becomes a superclass of Bitraversable, but similarly
applies to Functor/Bifunctor, which already are in a superclass relationship.

- - - - -
8217acb8 by Alan Zimmerman at 2023-11-07T02:21:12-05:00
EPA: get rid of l2l and friends

Replace them with

  l2l to convert the location
  la2la to convert a GenLocated thing

Updates haddock submodule

- - - - -
dd88a260 by Luite Stegeman at 2023-11-07T02:21:53-05:00
JS: remove broken newIdents from JStg Monad

GHC.JS.JStg.Monad.newIdents was broken, resulting in duplicate
identifiers being generated in h$c1, h$c2, ... .

This change removes the broken newIdents.

- - - - -
455524a2 by Matthew Craven at 2023-11-09T08:41:59-05:00
Create specially-solved DataToTag class

Closes #20532. This implements CLC proposal 104:
  https://github.com/haskell/core-libraries-committee/issues/104

The design is explained in Note [DataToTag overview]
in GHC.Tc.Instance.Class. This replaces the existing
`dataToTag#` primop.

These metric changes are not "real"; they represent Unique-related
flukes triggering on a different set of jobs than they did previously.
See also #19414.

Metric Decrease:
    T13386
    T8095
Metric Increase:
    T13386
    T8095

Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com>

- - - - -
a05f4554 by Alan Zimmerman at 2023-11-09T08:42:35-05:00
EPA: get rid of glRR and friends in GHC/Parser.y

With the HasLoc and HasAnnotation classes, we can replace a
number of type-specific helper functions in the parser with
polymorphic ones instead

Metric Decrease:
    MultiLayerModulesTH_Make

- - - - -
18498538 by Cheng Shao at 2023-11-09T16:58:12+00:00
ci: bump ci-images for wasi-sdk upgrade

- - - - -
52c0fc69 by PHO at 2023-11-09T19:16:22-05:00
Don't assume the current locale is *.UTF-8, set the encoding explicitly

primops.txt contains Unicode characters:
> LC_ALL=C ./genprimopcode --data-decl < ./primops.txt
> genprimopcode: <stdin>: hGetContents: invalid argument (cannot decode byte sequence starting from 226)

Hadrian must also avoid using readFile' to read primops.txt because it
tries to decode the file with a locale-specific encoding.

- - - - -
7233b3b1 by PHO at 2023-11-09T19:17:01-05:00
Use '[' instead of '[[' because the latter is a Bash-ism

It doesn't work on platforms where /bin/sh is something other than Bash.

- - - - -
6dbab180 by Simon Peyton Jones at 2023-11-09T19:17:36-05:00
Add an extra check in kcCheckDeclHeader_sig

Fix #24083 by checking for a implicitly-scoped type variable that is not
actually bound.  See Note [Disconnected type variables] in GHC.Tc.Gen.HsType

For some reason, on aarch64-darwin we saw a 2.8% decrease in compiler
allocations for MultiLayerModulesTH_Make; but 0.0% on other architectures.

Metric Decrease:
    MultiLayerModulesTH_Make

- - - - -
22551364 by Sven Tennie at 2023-11-11T06:35:22-05:00
AArch64: Delete unused LDATA pseudo-instruction

Though there were consuming functions for LDATA, there were no
producers. Thus, the removed code was "dead".

- - - - -
2a0ec8eb by Alan Zimmerman at 2023-11-11T06:35:59-05:00
EPA: harmonise acsa and acsA in GHC/Parser.y

With the HasLoc class, we can remove the acsa helper function,
using acsA instead.

- - - - -
7ae517a0 by Teo Camarasu at 2023-11-12T08:04:12-05:00
nofib: bump submodule

This includes changes that:
- fix building a benchmark with HEAD
- remove a Makefile-ism that causes errors in bash scripts

Resolves #24178

- - - - -
3f0036ec by Alan Zimmerman at 2023-11-12T08:04:47-05:00
EPA: Replace Anchor with EpaLocation

An Anchor has a location and an operation, which is either that it is
unchanged or that it has moved with a DeltaPos

    data Anchor = Anchor { anchor :: RealSrcSpan
                         , anchor_op :: AnchorOperation }

An EpaLocation also has either a location or a DeltaPos

    data EpaLocation = EpaSpan !RealSrcSpan !(Strict.Maybe BufSpan)
                     | EpaDelta !DeltaPos ![LEpaComment]

Now that we do not care about always having a location in the anchor,
we remove Anchor and replace it with EpaLocation

We do this with a type alias initially, to ease the transition.
The alias will be removed in time.

We also have helpers to reconstruct the AnchorOperation from an
EpaLocation. This is also temporary.

Updates Haddock submodule

- - - - -
a7492048 by Alan Zimmerman at 2023-11-12T13:43:07+00:00
EPA: get rid of AnchorOperation

Now that the Anchor type is an alias for EpaLocation, remove
AnchorOperation.

Updates haddock submodule

- - - - -
0745c34d by Andrew Lelechenko at 2023-11-13T16:25:07-05:00
Add since annotation for showHFloat

- - - - -
1cd2aeab by Matthew Pickering at 2023-11-15T11:36:23+00:00
hadrian: Build all executables in bin/ folder

In the end the bindist creation logic copies them all into the bin
folder. There is no benefit to building a specific few binaries in the
lib/bin folder anymore.

This also removes the ad-hoc logic to copy the touchy and unlit
executables from stage0 into stage1. It takes <1s to build so we might
as well just build it.

- - - - -
8ebda3ae by Matthew Pickering at 2023-11-15T11:36:23+00:00
fail when bindist configure fails

- - - - -
f737fbce by Matthew Pickering at 2023-11-15T11:36:23+00:00
Correctly propagate build/host/target to bindist

fix host/target bindist
t

- - - - -
0f1b6a9f by Matthew Pickering at 2023-11-15T11:36:23+00:00
ci: Test cross bindists

- - - - -
347b4a68 by Matthew Pickering at 2023-11-15T11:36:23+00:00
CROSS_STAGE variable

- - - - -
0282f019 by Matthew Pickering at 2023-11-15T11:36:23+00:00
Use explicit syntax rather than pure

- - - - -
068020a5 by Matthew Pickering at 2023-11-15T11:36:23+00:00
ci: Javascript don't set CROSS_EMULATOR

There is no CROSS_EMULATOR needed to run javascript binaries, so we
don't set the CROSS_EMULATOR to some dummy value.

- - - - -
86ff4d34 by Matthew Pickering at 2023-11-15T11:36:23+00:00
hadrian: Fill in more of the default.host toolchain file

When you are building a cross compiler this file will be used to build
stage1 and it's libraries, so we need enough information here to work
accurately. There is still more work to be done (see for example, word
size is still fixed).

- - - - -
1ecac93c by Matthew Pickering at 2023-11-15T11:36:23+00:00
hadrian: Build stage 2 cross compilers

* Most of hadrian is abstracted over the stage in order to remove the
  assumption that the target of all stages is the same platform. This
  allows the RTS to be built for two different targets for example.
* Abstracts the bindist creation logic to allow building either normal
  or cross bindists. Normal bindists use stage 1 libraries and a stage 2
  compiler. Cross bindists use stage 2 libararies and a stage 2
  compiler.

-------------------------
Metric Decrease:
    T10421a
    T10858
    T11195
    T11276
    T11374
    T11822
    T15630
    T17096
    T18478
    T20261
Metric Increase:
    parsing001
-------------------------

- - - - -
c1920a73 by GHC GitLab CI at 2023-11-15T11:36:23+00:00
fix

- - - - -
bcd6c0b3 by GHC GitLab CI at 2023-11-15T11:36:24+00:00
Build genapply per stage

- - - - -
d1e401d8 by GHC GitLab CI at 2023-11-15T11:36:24+00:00
Correct GHC_PKG path

- - - - -
b1333990 by GHC GitLab CI at 2023-11-15T11:36:24+00:00
Don't build genapply for javascript backend

- - - - -
321ed287 by Matthew Pickering at 2023-11-15T11:36:24+00:00
hadrian: Make binary-dist-dir the default build target

This allows us to have the logic in one place about which
libraries/stages to build with cross compilers.

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/JS/JStg/Monad.hs
- compiler/GHC/JS/Make.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/Stg/InferTags/Rewrite.hs
- compiler/GHC/StgToCmm/Expr.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ca0ba472fb138438309358891b18267506d7a512...321ed287c8de98b861e8e65fdacb1317e9acefb1

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ca0ba472fb138438309358891b18267506d7a512...321ed287c8de98b861e8e65fdacb1317e9acefb1
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/20231115/06a09b71/attachment-0001.html>


More information about the ghc-commits mailing list