[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 9 commits: ghc-the-library: Retain cafs in both static in dynamic builds.

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Jan 30 15:38:39 UTC 2023



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


Commits:
d9c19858 by Andreas Klebinger at 2023-01-30T10:38:26-05:00
ghc-the-library: Retain cafs in both static in dynamic builds.

We use keepCAFsForGHCi.c to force -fkeep-cafs behaviour by using a
__attribute__((constructor)) function.

This broke for static builds where the linker discarded the object file
since it was not reverenced from any exported code. We fix this by
asserting that the flag is enabled using a function in the same module
as the constructor. Which causes the object file to be retained by the
linker, which in turn causes the constructor the be run in static builds.

This changes nothing for dynamic builds using the ghc library. But causes
static to also retain CAFs (as we expect them to).

Fixes #22417.

-------------------------
Metric Decrease:
    T21839r
-------------------------

- - - - -
32749358 by Ryan Scott at 2023-01-30T10:38:27-05:00
Handle `type data` properly in tyThingParent_maybe

Unlike most other data constructors, data constructors declared with `type data`
are represented in `TyThing`s as `ATyCon` rather than `ADataCon`. The `ATyCon`
case in `tyThingParent_maybe` previously did not consider the possibility of
the underlying `TyCon` being a promoted data constructor, which led to the
oddities observed in #22817. This patch adds a dedicated special case in
`tyThingParent_maybe`'s `ATyCon` case for `type data` data constructors to fix
these oddities.

Fixes #22817.

- - - - -
e8e155ac by Ryan Scott at 2023-01-30T10:38:27-05:00
Fix two bugs in TypeData TH reification

This patch fixes two issues in the way that `type data` declarations were
reified with Template Haskell:

* `type data` data constructors are now properly reified using `DataConI`.
  This is accomplished with a special case in `reifyTyCon`. Fixes #22818.

* `type data` type constructors are now reified in `reifyTyCon` using
  `TypeDataD` instead of `DataD`. Fixes #22819.

- - - - -
f826fce5 by Simon Peyton Jones at 2023-01-30T10:38:28-05:00
Take account of loop breakers in specLookupRule

The key change is that in GHC.Core.Opt.Specialise.specLookupRule
we were using realIdUnfolding, which ignores the loop-breaker
flag.  When given a loop breaker, rule matching therefore
looped infinitely -- #22802.

In fixing this I refactored a bit.

* Define GHC.Core.InScopeEnv as a data type, and use it.
  (Previously it was a pair: hard to grep for.)

* Put several functions returning an IdUnfoldingFun into
  GHC.Types.Id, namely
     idUnfolding
     alwaysActiveUnfoldingFun,
     whenActiveUnfoldingFun,
     noUnfoldingFun
  and use them.  (The are all loop-breaker aware.)

- - - - -
8c7a9615 by Matthew Pickering at 2023-01-30T10:38:29-05:00
ci: Remove FreeBSD job from release pipelines

We no longer attempt to build or distribute this release

- - - - -
8f57904b by Matthew Pickering at 2023-01-30T10:38:29-05:00
rel_eng: Add check to make sure that release jobs are downloaded by fetch-gitlab

This check makes sure that if a job is a prefixed by "release-" then the
script downloads it and understands how to map the job name to the
platform.

- - - - -
51b555b8 by Matthew Pickering at 2023-01-30T10:38:29-05:00
rel_eng: Fix the name of the ubuntu-* jobs

These were not uploaded for alpha1

Fixes #22844

- - - - -
3a6ab19c by Matthew Pickering at 2023-01-30T10:38:29-05:00
gen_ci: Only consider release jobs for job metadata

In particular we do not have a release job for FreeBSD so the generation
of the platform mapping was failing.

- - - - -
6be973f7 by Jason Shipman at 2023-01-30T10:38:31-05:00
User's guide: Clarify overlapping instance candidate elimination

This commit updates the user's guide section on overlapping instance candidate
elimination to use "or" verbiage instead of "either/or" in regards to the
current pair of candidates' being overlappable or overlapping. "Either IX is
overlappable, or IY is overlapping" can cause confusion as it suggests "Either
IX is overlappable, or IY is overlapping, but not both".

This was initially discussed on this Discourse topic:

https://discourse.haskell.org/t/clarification-on-overlapping-instance-candidate-elimination/5677

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- compiler/GHC.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Types/Id.hs
- compiler/GHC/Types/Id/Info.hs
- compiler/GHC/Types/TyThing.hs
- compiler/cbits/keepCAFsForGHCi.c
- docs/users_guide/exts/instances.rst
- testsuite/tests/ghci/T16392/T16392.script
- + testsuite/tests/ghci/scripts/T22817.hs
- + testsuite/tests/ghci/scripts/T22817.script
- + testsuite/tests/ghci/scripts/T22817.stdout
- testsuite/tests/ghci/scripts/all.T
- + testsuite/tests/simplCore/should_compile/T22802.hs
- testsuite/tests/simplCore/should_compile/all.T
- + testsuite/tests/th/T22818.hs
- + testsuite/tests/th/T22818.stderr
- + testsuite/tests/th/T22819.hs
- + testsuite/tests/th/T22819.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b0263a1df3aabdc5836911d4a1984b1bf2e5f7ea...6be973f71d24c732ec4b805ce14d4b390fb95e7b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b0263a1df3aabdc5836911d4a1984b1bf2e5f7ea...6be973f71d24c732ec4b805ce14d4b390fb95e7b
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/20230130/7f42424c/attachment.html>


More information about the ghc-commits mailing list