[Git][ghc/ghc][wip/T24492] 35 commits: Define GHC2024 language edition (#24320)

Teo Camarasu (@teo) gitlab at gitlab.haskell.org
Wed Feb 28 16:33:03 UTC 2024



Teo Camarasu pushed to branch wip/T24492 at Glasgow Haskell Compiler / GHC


Commits:
09941666 by Adam Gundry at 2024-02-21T13:53:12+00:00
Define GHC2024 language edition (#24320)

See https://github.com/ghc-proposals/ghc-proposals/pull/613. Also
fixes #24343 and improves the documentation of language editions.

Co-authored-by: Joachim Breitner <mail at joachim-breitner.de>

- - - - -
5121a4ed by Ben Gamari at 2024-02-23T06:40:55-05:00
Allow docstrings after exports

Here we extend the parser and AST to preserve docstrings following
export items. We then extend Haddock to parse `@since` annotations in
such docstrings, allowing changes in export structure to be properly
documented.

Bumps haddock submodule.

- - - - -
0eb2265d by Hécate Moonlight at 2024-02-24T16:02:16-05:00
Improve the synopsis and description of base

- - - - -
2e36f5d2 by Jade at 2024-02-24T16:02:51-05:00
Error Messages: Properly align cyclic module error

Fixes: #24476

- - - - -
bbfb051c by Ben Gamari at 2024-02-24T19:10:23-05:00
Allow docstrings after exports

Here we extend the parser and AST to preserve docstrings following
export items. We then extend Haddock to parse `@since` annotations in
such docstrings, allowing changes in export structure to be properly
documented.

- - - - -
d8d6ad8c by Ben Gamari at 2024-02-24T19:10:23-05:00
ghc-internal: Move modules into GHC.Internal.* namespace

Bumps haddock submodule due to testsuite output changes.

- - - - -
a82af7cd by Ben Gamari at 2024-02-24T19:10:23-05:00
ghc-internal: Rewrite `@since ` to `@since base-`

These will be incrementally moved to the export sites in `base` where
possible.

- - - - -
ca3836e1 by Ben Gamari at 2024-02-24T19:10:23-05:00
base: Migrate Haddock `not-home` pragmas from `ghc-internal`

This ensures that we do not use `base` stub modules as declarations'
homes when not appropriate.

- - - - -
c8cf3e26 by Ben Gamari at 2024-02-24T19:10:23-05:00
base: Partially freeze exports of GHC.Base

Sadly there are still a few module reexports. However, at least we have
decoupled from the exports of `GHC.Internal.Base`.

- - - - -
272573c6 by Ben Gamari at 2024-02-24T19:10:23-05:00
Move Haddock named chunks

- - - - -
2d8a881d by Ben Gamari at 2024-02-24T19:10:23-05:00
Drop GHC.Internal.Data.Int

- - - - -
55c4c385 by Ben Gamari at 2024-02-24T19:10:23-05:00
compiler: Fix mention to `GHC....` modules in wasm desugaring

Really, these references should be via known-key names anyways. I have
fixed the proximate issue here but have opened #24472 to track the
additional needed refactoring.

- - - - -
64150911 by Ben Gamari at 2024-02-24T19:10:23-05:00
Accept performance shifts from ghc-internal restructure

As expected, Haddock now does more work. Less expected is that some
other testcases actually get faster, presumably due to less interface
file loading. As well, the size_hello_artifact test regressed a bit when
debug information is enabled due to debug information for the new stub
symbols.

Metric Decrease:
    T12227
    T13056
Metric Increase:
    haddock.Cabal
    haddock.base
    MultiLayerModulesTH_OneShot
    size_hello_artifact

- - - - -
317a915b by Ben Gamari at 2024-02-24T19:10:23-05:00
Expose GHC.Wasm.Prim from ghc-experimental

Previously this was only exposed from `ghc-internal` which violates our
agreement that users shall not rely on things exposed from that package.

Fixes #24479.

- - - - -
3bbd2bf2 by Ben Gamari at 2024-02-24T19:10:23-05:00
compiler/tc: Small optimisation of evCallStack

Don't lookupIds unless we actually need them.

- - - - -
3e5c9e3c by Ben Gamari at 2024-02-24T19:10:23-05:00
compiler/tc: Use toException instead of SomeException

- - - - -
125714a6 by Ben Gamari at 2024-02-24T19:10:23-05:00
base: Factor out errorBelch

This was useful when debugging

- - - - -
3d6aae7c by Ben Gamari at 2024-02-24T19:10:23-05:00
base: Clean up imports of GHC.Stack.CloneStack

- - - - -
6900306e by Ben Gamari at 2024-02-24T19:10:24-05:00
base: Move PrimMVar to GHC.Internal.MVar

- - - - -
28f8a148 by Ben Gamari at 2024-02-24T19:10:24-05:00
base: Move prettyCallStack to GHC.Internal.Stack

- - - - -
4892de47 by Ben Gamari at 2024-02-24T19:10:24-05:00
base: Explicit dependency to workaround #24436

Currently `ghc -M` fails to account for `.hs-boot` files correctly,
leading to issues with cross-package one-shot builds failing. This
currently manifests in `GHC.Exception` due to the boot file for
`GHC.Internal.Stack`. Work around this by adding an explicit `import`,
ensuring that `GHC.Internal.Stack` is built before `GHC.Exception`.

See #24436.

- - - - -
294c93a5 by Ben Gamari at 2024-02-24T19:10:24-05:00
base: Use displayException in top-level exception handler

Happily this also allows us to eliminate a special case for Deadlock
exceptions.

Implements [CLC #198](https://github.com/haskell/core-libraries-committee/issues/198).

- - - - -
cf756a25 by Ben Gamari at 2024-02-24T22:11:53-05:00
rts: Fix symbol references in Wasm RTS

- - - - -
4e4d47a0 by Jade at 2024-02-26T15:17:20-05:00
GHCi: Improve response to unloading, loading and reloading modules

Fixes #13869

- - - - -
f3de8a3c by Zubin Duggal at 2024-02-26T15:17:57-05:00
rel-eng/fetch-gitlab.py: Fix name of aarch64 alpine 3_18 release job

- - - - -
c71bfdff by Cheng Shao at 2024-02-26T15:18:35-05:00
hadrian/hie-bios: pass -j to hadrian

This commit passes -j to hadrian in the hadrian/hie-bios scripts. When
the user starts HLS in a fresh clone that has just been configured, it
takes quite a while for hie-bios to pick up the ghc flags and start
actual indexing, due to the fact that the hadrian build step defaulted
to -j1, so -j speeds things up and improve HLS user experience in GHC.
Also add -j flag to .ghcid to speed up ghcid, and sets the Windows
build root to .hie-bios which also works and unifies with other
platforms, the previous build root _hie-bios was missing from
.gitignore anyway.

- - - - -
50bfdb46 by Cheng Shao at 2024-02-26T15:18:35-05:00
ci: enable parallelism in hadrian/ghci scripts

This commit enables parallelism when the hadrian/ghci scripts are
called in CI. The time bottleneck is in the hadrian build step, but
previously the build step wasn't parallelized.

- - - - -
61a78231 by Felix Yan at 2024-02-26T15:19:14-05:00
m4: Correctly detect GCC version

When calling as `cc`, GCC does not outputs lowercased "gcc" at least in 13.2.1 version here.

```
$ cc --version
cc (GCC) 13.2.1 20230801
...
```

This fails the check and outputs the confusing message: `configure: $CC is not gcc; assuming it's a reasonably new C compiler`

This patch makes it check for upper-cased "GCC" too so that it works correctly:

```
checking version of gcc... 13.2.1
```
- - - - -
001aa539 by Teo Camarasu at 2024-02-27T13:26:46-05:00
Fix formatting in whereFrom docstring

Previously it used markdown syntax rather than Haddock syntax for code quotes

- - - - -
e8034d15 by Teo Camarasu at 2024-02-27T13:26:46-05:00
Move ClosureType type to ghc-internal

- Use ClosureType for InfoProv.ipDesc.
- Use ClosureType for CloneStack.closureType.
- Now ghc-heap re-exports this type from ghc-internal.

See the accompanying CLC proposal: https://github.com/haskell/core-libraries-committee/issues/210

Resolves #22600

- - - - -
3da0a551 by Matthew Craven at 2024-02-27T13:27:22-05:00
StgToJS: Simplify ExprInline constructor of ExprResult

Its payload was used only for a small optimization in genAlts,
avoiding a few assignments for programs of this form:

  case NormalDataCon arg1 arg2 of x { NormalDataCon x1 x2 -> ... ; }

But when compiling with optimizations, this sort of code is
generally eliminated by case-of-known-constructor in Core-to-Core.
So it doesn't seem worth tracking and cleaning up again in StgToJS.

- - - - -
61bc92cc by Cheng Shao at 2024-02-27T16:58:42-05:00
rts: add missing ccs_mutex guard to internal_dlopen

See added comment for details. Closes #24423.

- - - - -
dd29d3b2 by doyougnu at 2024-02-27T16:59:23-05:00
cg: Remove GHC.Cmm.DataFlow.Collections

In pursuit of #15560 and #17957 and generally removing redundancy.

- - - - -
d3a050d2 by Cheng Shao at 2024-02-27T17:00:00-05:00
utils: remove unused lndir from tree

Ever since the removal of the make build system, the in tree lndir
hasn't been actually built, so this patch removes it.

- - - - -
74b24a9b by Teo Camarasu at 2024-02-28T16:32:58+00:00
rts: avoid checking bdescr of value outside of Haskell heap

In nonmovingTidyWeaks we want to check if the key of a weak pointer
lives in the non-moving heap. We do this by checking the flags of the
block the key lives in. But we need to be careful with values that live
outside the Haskell heap, since they will lack a block descriptor and
looking for one may lead to a segfault. In this case we should just
accept that it isn't on the non-moving heap.

Resolves #24492

- - - - -


30 changed files:

- .ghcid
- .gitignore
- .gitlab-ci.yml
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Types/Literals.hs
- compiler/GHC/Cmm.hs
- compiler/GHC/Cmm/CommonBlockElim.hs
- compiler/GHC/Cmm/ContFlowOpt.hs
- compiler/GHC/Cmm/Dataflow.hs
- − compiler/GHC/Cmm/Dataflow/Collections.hs
- compiler/GHC/Cmm/Dataflow/Graph.hs
- compiler/GHC/Cmm/Dataflow/Label.hs
- compiler/GHC/Cmm/DebugBlock.hs
- compiler/GHC/Cmm/Dominators.hs
- compiler/GHC/Cmm/Info.hs
- compiler/GHC/Cmm/Info/Build.hs
- compiler/GHC/Cmm/LayoutStack.hs
- compiler/GHC/Cmm/Lint.hs
- compiler/GHC/Cmm/Liveness.hs
- compiler/GHC/Cmm/Node.hs
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Cmm/ProcPoint.hs
- compiler/GHC/Cmm/Reducibility.hs
- compiler/GHC/Cmm/Sink.hs
- compiler/GHC/Cmm/Utils.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/03a38ecaa2d2cecf3ae019f2d9ba062e8dd1a5a0...74b24a9b0084459b8aa426a502956bd332b4d0fb

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/03a38ecaa2d2cecf3ae019f2d9ba062e8dd1a5a0...74b24a9b0084459b8aa426a502956bd332b4d0fb
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/20240228/16fdc20e/attachment-0001.html>


More information about the ghc-commits mailing list