[Git][ghc/ghc][wip/multiline-strings] 129 commits: Improve the synopsis and description of base

Brandon Chinn (@brandonchinn178) gitlab at gitlab.haskell.org
Thu Mar 14 17:40:44 UTC 2024



Brandon Chinn pushed to branch wip/multiline-strings at Glasgow Haskell Compiler / GHC


Commits:
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

- - - - -
b4cae4ec by Simon Peyton Jones at 2024-02-29T02:10:08-05:00
In mkDataConRep, ensure the in-scope set is right

A small change that fixes #24489

- - - - -
3836a110 by Cheng Shao at 2024-02-29T21:25:45-05:00
testsuite: fix T23540 fragility on 32-bit platforms

T23540 is fragile on 32-bit platforms. The root cause is usage of
`getEvidenceTreesAtPoint`, which internally relies on `Name`'s `Ord`
instance, which is indeterministic. The solution is adding a
deterministic `Ord` instance for `EvidenceInfo` and sorting the
evidence trees before pretty printing. Fixes #24449.

- - - - -
960c8d47 by Teo Camarasu at 2024-02-29T21:26:20-05:00
Reduce AtomicModifyIORef increment count

This test leads to a lot of contention when N>2 and becomes very slow. Let's reduce the amount of work we do to compensate. Resolves #24490

- - - - -
2e46c8ad by Matthew Pickering at 2024-03-01T05:48:06-05:00
hadrian: Improve parallelism in binary-dist-dir rule

I noticed that the "docs" target was needed after the libraries and
executables were built. We can improve the parallelism by needing
everything at once so that documentation can be built immediately after
a library is built for example.

- - - - -
cb6c11fe by Matthew Pickering at 2024-03-01T05:48:07-05:00
ci: Bump windows and freebsd boot compilers to 9.6.4

We have previously bumped the docker images to use 9.6.4, but neglected
to bump the windows images until now.

- - - - -
30f06996 by Matthew Pickering at 2024-03-01T05:48:07-05:00
ci: darwin: Update to 9.6.2 for boot compiler

9.6.4 is currently broken due to #24050

Also update to use LLVM-15 rather than LLVM-11, which is out of date.

- - - - -
d9d69e12 by Matthew Pickering at 2024-03-01T05:48:07-05:00
Bump minimum bootstrap version to 9.6

- - - - -
67ace1c5 by Matthew Pickering at 2024-03-01T05:48:07-05:00
ci: Enable more documentation building

Here we enable documentation building on

1. Darwin: The sphinx toolchain was already installed so we enable html
   and manpages.
2. Rocky8: Full documentation (toolchain already installed)
3. Alpine: Full documetnation (toolchain already installed)
4. Windows: HTML and manpages (toolchain already installed)

Fixes #24465

- - - - -
39583c39 by Matthew Pickering at 2024-03-01T05:48:42-05:00
ci: Bump ci-images to allow updated aarch64-alpine image with llvm15 and clang15

- - - - -
d91d00fc by Torsten Schmits at 2024-03-01T15:01:50-05:00
Introduce ListTuplePuns extension

This implements Proposal 0475, introducing the `ListTuplePuns` extension
which is enabled by default.

Disabling this extension makes it invalid to refer to list, tuple and
sum type constructors by using built-in syntax like `[Int]`,
`(Int, Int)`, `(# Int#, Int# #)` or `(# Int | Int #)`.
Instead, this syntax exclusively denotes data constructors for use with
`DataKinds`.
The conventional way of referring to these data constructors by
prefixing them with a single quote (`'(Int, Int)`) is now a parser
error.

Tuple declarations have been moved to `GHC.Tuple.Prim` and the `Solo`
data constructor has been renamed to `MkSolo` (in a previous commit).
Unboxed tuples and sums now have real source declarations in `GHC.Types`.
Unit and solo types for tuples are now called `Unit`, `Unit#`, `Solo`
and `Solo#`.
Constraint tuples now have the unambiguous type constructors `CTuple<n>`
as well as `CUnit` and `CSolo`, defined in `GHC.Classes` like before.

A new parser construct has been added for the unboxed sum data
constructor declarations.

The type families `Tuple`, `Sum#` etc. that were intended to provide
nicer syntax have been omitted from this change set due to inference
problems, to be implemented at a later time.
See the MR discussion for more info.

Updates the submodule utils/haddock.
Updates the cabal submodule due to new language extension.

    Metric Increase:
        haddock.base

    Metric Decrease:
        MultiLayerModulesTH_OneShot
        size_hello_artifact

Proposal document: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0475-tuple-syntax.rst

Merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8820

Tracking ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/21294

- - - - -
bbdb6286 by Sylvain Henry at 2024-03-01T15:01:50-05:00
JS linker: filter unboxed tuples

- - - - -
dec6d8d3 by Arnaud Spiwack at 2024-03-01T15:02:30-05:00
Improve error messages coming from non-linear patterns

This enriched the `CtOrigin` for non-linear patterns to include data
of the pattern that created the constraint (which can be quite useful
if it occurs nested in a pattern) as well as an explanation why the
pattern is non-restricted in (at least in some cases).

- - - - -
6612388e by Arnaud Spiwack at 2024-03-01T15:02:30-05:00
Adjust documentation of linear lets according to committee decision

- - - - -
1c064ef1 by Cheng Shao at 2024-03-02T17:11:19-05:00
compiler: start deprecating cmmToRawCmmHook

cmmToRawCmmHook was added 4 years ago in
d561c8f6244f8280a2483e8753c38e39d34c1f01. Its only user is the
Asterius project, which has been archived and deprecated in favor of
the ghc wasm backend. This patch starts deprecating cmmToRawCmmHook by
placing a DEPRECATED pragma, and actual removal shall happen in a
future GHC major release if no issue to oppose the deprecation has
been raised in the meantime.

- - - - -
9b74845f by Andrew Lelechenko at 2024-03-02T17:11:55-05:00
Data.List.NonEmpty.unzip: use WARNING with category instead of DEPRECATED

CLC proposal: https://github.com/haskell/core-libraries-committee/issues/258

- - - - -
61bb5ff6 by Finley McIlwaine at 2024-03-04T09:01:40-08:00
add -fprof-late-overloaded and -fprof-late-overloaded-calls

* Refactor late cost centre insertion for extensibility
* Add two more late cost centre insertion methods that add SCCs to overloaded
  top level bindings and call sites with dictionary arguments.
* Some tests for the basic functionality of the new insertion methods

Resolves: #24500

- - - - -
82ccb801 by Andreas Klebinger at 2024-03-04T19:59:14-05:00
x86-ncg: Fix fma codegen when arguments are globals

Fix a bug in the x86 ncg where results would be wrong when the desired output
register and one of the input registers were the same global.

Also adds a tiny optimization to make use of the memory addressing
support when convenient.

Fixes #24496

- - - - -
18ad1077 by Matthew Pickering at 2024-03-05T14:22:31-05:00
rel_eng: Update hackage docs upload scripts

This adds the upload of ghc-internal and ghc-experimental to our scripts
which upload packages to hackage.

- - - - -
bf47c9ba by Matthew Pickering at 2024-03-05T14:22:31-05:00
docs: Remove stray module comment from GHC.Profiling.Eras

- - - - -
37d9b340 by Matthew Pickering at 2024-03-05T14:22:31-05:00
Fix ghc-internal cabal file

The file mentioned some artifacts relating to the base library. I have
renamed these to the new ghc-internal variants.

- - - - -
23f2a478 by Matthew Pickering at 2024-03-05T14:22:31-05:00
Fix haddock source links and hyperlinked source

There were a few issues with the hackage links:

1. We were using the package id rather than the package name for the
   package links. This is fixed by now allowing the template to mention
   %pkg% or %pkgid% and substituing both appropiatly.
2. The `--haddock-base-url` flag is renamed to `--haddock-for-hackage`
   as the new base link works on a local or remote hackage server.
3. The "src" path including too much stuff, so cross-package source
   links were broken as the template was getting double expanded.

Fixes #24086

- - - - -
2fa336a9 by Ben Gamari at 2024-03-05T14:23:07-05:00
filepath: Bump submodule to 1.5.2.0

- - - - -
31217944 by Ben Gamari at 2024-03-05T14:23:07-05:00
os-string: Bump submodule to 2.0.2

- - - - -
4074a3f2 by Matthew Pickering at 2024-03-05T21:44:35-05:00
base: Reflect new era profiling RTS flags in GHC.RTS.Flags

* -he profiling mode
* -he profiling selector
* --automatic-era-increment

CLC proposal #254 - https://github.com/haskell/core-libraries-committee/issues/254

- - - - -
a8c0e31b by Sylvain Henry at 2024-03-05T21:45:14-05:00
JS: faster implementation for some numeric primitives (#23597)

Use faster implementations for the following primitives in the JS
backend by not using JavaScript's BigInt:
- plusInt64
- minusInt64
- minusWord64
- timesWord64
- timesInt64

Co-authored-by: Josh Meredith <joshmeredith2008 at gmail.com>

- - - - -
21e3f325 by Cheng Shao at 2024-03-05T21:45:52-05:00
rts: add -xr option to control two step allocator reserved space size

This patch adds a -xr RTS option to control the size of virtual memory
address space reserved by the two step allocator on a 64-bit platform,
see added documentation for explanation. Closes #24498.

- - - - -
dedcf102 by Cheng Shao at 2024-03-06T13:39:04-05:00
rts: expose HeapAlloc.h as public header

This commit exposes HeapAlloc.h as a public header. The intention is
to expose HEAP_ALLOCED/HEAP_ALLOCED_GC, so they can be used in
assertions in other public headers, and they may also be useful for
user code.

- - - - -
d19441d7 by Cheng Shao at 2024-03-06T13:39:04-05:00
rts: assert pointer is indeed heap allocated in Bdescr()

This commit adds an assertion to Bdescr() to assert the pointer is
indeed heap allocated. This is useful to rule out RTS bugs that
attempt to access non-existent block descriptor of a static closure, #24492
being one such example.

- - - - -
9a656a04 by Ben Gamari at 2024-03-06T13:39:39-05:00
ghc-experimental: Add dummy dependencies to work around #23942

This is a temporary measure to improve CI reliability until a proper
solution is developed.

Works around #23942.

- - - - -
1e84b924 by Simon Peyton Jones at 2024-03-06T13:39:39-05:00
Three compile perf improvements with deep nesting

These were changes are all triggered by #24471.

1. Make GHC.Core.Opt.SetLevels.lvlMFE behave better when there are
   many free variables.  See Note [Large free-variable sets].

2. Make GHC.Core.Opt.Arity.floatIn a bit lazier in its Cost argument.
   This benefits the common case where the ArityType turns out to
   be nullary. See Note [Care with nested expressions]

3. Make GHC.CoreToStg.Prep.cpeArg behave for deeply-nested
   expressions.  See Note [Eta expansion of arguments in CorePrep]
   wrinkle (EA2).

Compile times go down by up to 4.5%, and much more in artificial
cases. (Geo mean of compiler/perf changes is -0.4%.)

Metric Decrease:
    CoOpt_Read
    T10421
    T12425

- - - - -
c4b13113 by Hécate Moonlight at 2024-03-06T13:40:17-05:00
Use "module" instead of "library" when applicable in base haddocks

- - - - -
9cd9efb4 by Vladislav Zavialov at 2024-03-07T13:01:54+03:00
Rephrase error message to say "visible arguments" (#24318)

* Main change: make the error message generated by mkFunTysMsg more
  accurate by changing "value arguments" to "visible arguments".

* Refactor: define a new type synonym VisArity and use it instead of
  Arity in a few places.

It might be the case that there other places in the compiler that should
talk about visible arguments rather than value arguments, but I haven't
tried to find them all, focusing only on the error message reported in
the ticket.

- - - - -
d523a6a7 by Ben Gamari at 2024-03-07T19:40:45-05:00
Bump array submodule

- - - - -
7e55003c by Ben Gamari at 2024-03-07T19:40:45-05:00
Bump stm submodule

- - - - -
32d337ef by Ben Gamari at 2024-03-07T19:40:45-05:00
Introduce exception context

Here we introduce the `ExceptionContext` type and `ExceptionAnnotation`
class, allowing dynamically-typed user-defined annotations to be
attached to exceptions.

CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/199
GHC Proposal: https://github.com/ghc-proposals/ghc-proposals/pull/330

- - - - -
39f3d922 by Ben Gamari at 2024-03-07T19:40:46-05:00
testsuite/interface-stability: Update documentation

- - - - -
fdea7ada by Ben Gamari at 2024-03-07T19:40:46-05:00
ghc-internal: comment formatting

- - - - -
4fba42ef by Ben Gamari at 2024-03-07T19:40:46-05:00
compiler: Default and warn ExceptionContext constraints

- - - - -
3886a205 by Ben Gamari at 2024-03-07T19:40:46-05:00
base: Introduce exception backtraces

Here we introduce the `Backtraces` type and associated machinery for
attaching these via `ExceptionContext`. These has a few compile-time
regressions (`T15703` and `T9872d`) due to the additional dependencies
in the exception machinery.

As well, there is a surprisingly large regression in the
`size_hello_artifact` test. This appears to be due to various `Integer` and
`Read` bits now being reachable at link-time. I believe it should be
possible to avoid this but I have accepted the change for now to get the
feature merged.

CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/199
GHC Proposal: https://github.com/ghc-proposals/ghc-proposals/pull/330

Metric Increase:
    T15703
    T9872d
    size_hello_artifact

- - - - -
18c5409f by Ben Gamari at 2024-03-07T19:40:46-05:00
users guide: Release notes for exception backtrace work

- - - - -
f849c5fc by Ben Gamari at 2024-03-07T19:40:46-05:00
compiler: Don't show ExceptionContext of GhcExceptions

Most GhcExceptions are user-facing errors and therefore the
ExceptionContext has little value. Ideally we would enable
it in the DEBUG compiler but I am leaving this for future work.

- - - - -
dc646e6f by Sylvain Henry at 2024-03-07T19:40:46-05:00
Disable T9930fail for the JS target (cf #19174)

- - - - -
bfc09760 by Alan Zimmerman at 2024-03-07T19:41:22-05:00
Update showAstData to honour blanking of AnnParen

Also tweak rendering of SrcSpan to remove extra blank line.

- - - - -
50454a29 by Ben Gamari at 2024-03-08T03:32:42-05:00
ghc-internal: Eliminate GHC.Internal.Data.Kind

This was simply reexporting things from `ghc-prim`. Instead reexport
these directly from `Data.Kind`. Also add build ordering dependency to
work around #23942.

- - - - -
38a4b6ab by Ben Gamari at 2024-03-08T03:33:18-05:00
rts: Fix SET_HDR initialization of retainer set

This fixes a regression in retainer set profiling introduced by
b0293f78cb6acf2540389e22bdda420d0ab874da. Prior to that commit
the heap traversal word would be initialized by `SET_HDR` using
`LDV_RECORD_CREATE`. However, the commit added a `doingLDVProfiling`
check in `LDV_RECORD_CREATE`, meaning that this initialization no longer
happened.

Given that this initialization was awkwardly indirectly anyways, I have
fixed this by explicitly initializating the heap traversal word to
`NULL` in `SET_PROF_HDR`. This is equivalent to the previous behavior,
but much more direct.

Fixes #24513.

- - - - -
2859a637 by Ben Gamari at 2024-03-08T18:26:47-05:00
base: Use strerror_r instead of strerror

As noted by #24344, `strerror` is not necessarily thread-safe.
Thankfully, POSIX.1-2001 has long offered `strerror_r`, which is
safe to use.

Fixes #24344.

CLC discussion: https://github.com/haskell/core-libraries-committee/issues/249

- - - - -
edb9bf77 by Jade at 2024-03-09T03:39:38-05:00
Error messages: Improve Error messages for Data constructors in type signatures.

This patch improves the error messages from invalid type signatures by
trying to guess what the user did and suggesting an appropriate fix.

Partially fixes: #17879

- - - - -
cfb197e3 by Patrick at 2024-03-09T03:40:15-05:00
HieAst: add module name #24493

The main purpose of this is to tuck the module name `xxx` in `module xxx where` into the hieAst.
It should fix #24493.

The following have been done:
1. Renamed and update the `tcg_doc_hdr :: Maybe (LHsDoc GhcRn)` to `tcg_hdr_info :: (Maybe (LHsDoc GhcRn), Maybe (XRec GhcRn ModuleName))`
   To store the located module name information.
2. update the `RenamedSource` and `RenamedStuff` with extra `Maybe (XRec GhcRn ModuleName)` located module name information.
3. add test `testsuite/tests/hiefile/should_compile/T24493.hs` to ensure the module name is added and update several relevent tests.
4. accompanied submodule haddoc test update MR in https://gitlab.haskell.org/ghc/haddock/-/merge_requests/53

- - - - -
2341d81e by Vaibhav Sagar at 2024-03-09T03:40:54-05:00
GHC.Utils.Binary: fix a couple of typos

- - - - -
5580e1bd by Ben Gamari at 2024-03-09T03:41:30-05:00
rts: Drop .wasm suffix from .prof file names

This replicates the behavior on Windows, where `Hi.exe` will produce
profiling output named `Hi.prof` instead of `Hi.exe.prof`.

While in the area I also fixed the extension-stripping logic, which
incorrectly rewrote `Hi.exefoo` to `Hi.foo`.

Closes #24515.

- - - - -
259495ee by Cheng Shao at 2024-03-09T03:41:30-05:00
testsuite: drop exe extension from .hp & .prof filenames

See #24515 for details.

- - - - -
c477a8d2 by Ben Gamari at 2024-03-09T03:42:05-05:00
rts/linker: Enable GOT support on all platforms

There is nothing platform-dependent about our GOT implementation and
GOT support is needed by `T24171` on i386.

- - - - -
2e592857 by Vladislav Zavialov at 2024-03-09T03:42:41-05:00
Drop outdated comment on TcRnIllformedTypePattern

This should have been done in 0f0c53a501b but I missed it.

- - - - -
c554b4da by Ben Gamari at 2024-03-09T09:39:20-05:00
rts/CloneStack: Bounds check array write

- - - - -
15c590a5 by Ben Gamari at 2024-03-09T09:39:20-05:00
rts/CloneStack: Don't expose helper functions in header

- - - - -
e831ce31 by Ben Gamari at 2024-03-09T09:39:20-05:00
base: Move internals of GHC.InfoProv into GHC.InfoProv.Types

Such that we can add new helpers into GHC.InfoProv.Types without
breakage.

- - - - -
6948e24d by Ben Gamari at 2024-03-09T09:39:20-05:00
rts: Lazily decode IPE tables

Previously we would eagerly allocate `InfoTableEnt`s for each
info table registered in the info table provenance map. However, this
costs considerable memory and initialization time. Instead we now
lazily decode these tables. This allows us to use one-third the memory
*and* opens the door to taking advantage of sharing opportunities within
a module.

This required considerable reworking since lookupIPE now must be passed
its result buffer.

- - - - -
9204a04e by Ben Gamari at 2024-03-09T09:39:20-05:00
rts/IPE: Don't expose helper in header

- - - - -
308926ff by Ben Gamari at 2024-03-09T09:39:20-05:00
rts/IPE: Share module_name within a Node

This allows us to shave a 64-bit word off of the packed IPE entry size.

- - - - -
bebdea05 by Ben Gamari at 2024-03-09T09:39:20-05:00
IPE: Expose unit ID in InfoTableProv

Here we add the unit ID to the info table provenance structure.

- - - - -
6519c9ad by Ben Gamari at 2024-03-09T09:39:35-05:00
rts: Refactor GHC.Stack.CloneStack.decode

Don't allocate a Ptr constructor per frame.

- - - - -
ed0b69dc by Ben Gamari at 2024-03-09T09:39:35-05:00
base: Do not expose whereFrom# from GHC.Exts

- - - - -
2b1faea9 by Vladislav Zavialov at 2024-03-09T17:38:21-05:00
docs: Update info on TypeAbstractions

* Mention TypeAbstractions in 9.10.1-notes.rst
* Set the status to "Experimental".
* Add a "Since: GHC 9.x" comment to each section.

- - - - -
f8b88918 by Ben Gamari at 2024-03-09T21:21:46-05:00
ci-images: Bump Alpine image to bootstrap with 9.8.2

- - - - -
705e6927 by Ben Gamari at 2024-03-09T21:21:46-05:00
testsuite: Mark T24171 as fragile due to #24512

I will fix this but not in time for 9.10.1-alpha1

- - - - -
c74196e1 by Ben Gamari at 2024-03-09T21:21:46-05:00
testsuite: Mark linker_unload_native as fragile

In particular this fails on platforms without `dlinfo`. I plan to
address this but not before 9.10.1-alpha1.

- - - - -
f4d87f7a by Ben Gamari at 2024-03-09T21:21:46-05:00
configure: Bump version to 9.10

- - - - -
88df9a5f by Ben Gamari at 2024-03-09T21:21:46-05:00
Bump transformers submodule to 0.6.1.1

- - - - -
8176d5e8 by Ben Gamari at 2024-03-09T21:21:46-05:00
testsuite: Increase ulimit for T18623

1 MByte was just too tight and failed intermittently on some platforms
(e.g. CentOS 7). Bumping the limit to 8 MByte should provide sufficient
headroom.

Fixes #23139.

- - - - -
c74b38a3 by Ben Gamari at 2024-03-09T21:21:46-05:00
base: Bump version to 4.20.0.0

- - - - -
b2937fc3 by Ben Gamari at 2024-03-09T21:21:46-05:00
ghc-internal: Set initial version at 9.1001.0

This provides PVP compliance while maintaining a clear correspondence
between GHC releases and `ghc-internal` versions.

- - - - -
4ae7d868 by Ben Gamari at 2024-03-09T21:21:46-05:00
ghc-prim: Bump version to 0.11.0

- - - - -
50798dc6 by Ben Gamari at 2024-03-09T21:21:46-05:00
template-haskell: Bump version to 2.22.0.0

- - - - -
8564f976 by Ben Gamari at 2024-03-09T21:21:46-05:00
base-exports: Accommodate spurious whitespace changes in 32-bit output

It appears that this was

- - - - -
9d4f0e98 by Ben Gamari at 2024-03-09T21:21:46-05:00
users-guide: Move exception backtrace relnotes to 9.10

This was previously mistakenly added to the GHC 9.8 release notes.

- - - - -
145eae60 by Ben Gamari at 2024-03-09T21:21:46-05:00
gitlab/rel_eng: Fix name of Rocky8 artifact

- - - - -
39c2a630 by Ben Gamari at 2024-03-09T21:21:46-05:00
gitlab/rel_eng: Fix path of generate_jobs_metadata

- - - - -
aed034de by Ben Gamari at 2024-03-09T21:21:46-05:00
gitlab/upload: Rework recompression

The old `combine` approach was quite fragile due to use of filename
globbing. Moreover, it didn't parallelize well. This refactoring
makes the goal more obvious, parallelizes better, and is more robust.

- - - - -
dc207d06 by Ben Gamari at 2024-03-10T08:56:08-04:00
configure: Bump GHC version to 9.11

Bumps haddock submodule.

- - - - -
8b2513e8 by Ben Gamari at 2024-03-11T01:20:03-04:00
rts/linker: Don't unload code when profiling is enabled

The heap census may contain references (e.g. `Counter.identity`) to
static data which must be available when the census is reported at the
end of execution.

Fixes #24512.

- - - - -
7810b4c3 by Ben Gamari at 2024-03-11T01:20:03-04:00
rts/linker: Don't unload native objects when dlinfo isn't available

To do so is unsafe as we have no way of identifying references to
symbols provided by the object.

Fixes #24513. Fixes #23993.

- - - - -
0590764c by Ben Gamari at 2024-03-11T01:20:39-04:00
rel_eng/upload: Purge both $rel_name/ and $ver/

This is necessary for prereleases, where GHCup accesses the release via
`$ver/`

- - - - -
b85a4631 by Brandon Chinn at 2024-03-12T19:25:56-04:00
Remove duplicate code normalising slashes

- - - - -
c91946f9 by Brandon Chinn at 2024-03-12T19:25:56-04:00
Simplify regexes with raw strings

- - - - -
1a5f53c6 by Brandon Chinn at 2024-03-12T19:25:57-04:00
Don't normalize backslashes in characters

- - - - -
7ea971d3 by Andrei Borzenkov at 2024-03-12T19:26:32-04:00
Fix compiler crash caused by implicit RHS quantification in type synonyms (#24470)

- - - - -
39f3ac3e by Cheng Shao at 2024-03-12T19:27:11-04:00
Revert "compiler: make genSym use C-based atomic increment on non-JS 32-bit platforms"

This reverts commit 615eb855416ce536e02ed935ecc5a6f25519ae16. It was
originally intended to fix #24449, but it was merely sweeping the bug
under the rug. 3836a110577b5c9343915fd96c1b2c64217e0082 has properly
fixed the fragile test, and we no longer need the C version of genSym.
Furthermore, the C implementation causes trouble when compiling with
clang that targets i386 due to alignment warning and libatomic linking
issue, so it makes sense to revert it.

- - - - -
e6bfb85c by Cheng Shao at 2024-03-12T19:27:11-04:00
compiler: fix out-of-bound memory access of genSym on 32-bit

This commit fixes an unnoticed out-of-bound memory access of genSym on
32-bit. ghc_unique_inc is 32-bit sized/aligned on 32-bit platforms,
but we mistakenly treat it as a Word64 pointer in genSym, and
therefore will accidentally load 2 garbage higher bytes, or with a
small but non-zero chance, overwrite something else in the data
section depends on how the linker places the data segments. This
regression was introduced in !11802 and fixed here.

- - - - -
77171cd1 by Ben Orchard at 2024-03-14T09:00:40-04:00
Note mutability of array and address access primops

Without an understanding of immutable vs. mutable memory, the index
primop family have a potentially non-intuitive type signature:

    indexOffAddr :: Addr# -> Int# -> a
    readOffAddr  :: Addr# -> Int# -> State# d -> (# State# d, a #)

indexOffAddr# might seem like a free generality improvement, which it
certainly is not!

This change adds a brief note on mutability expectations for most
index/read/write access primops.

- - - - -
7da7f8f6 by Alan Zimmerman at 2024-03-14T09:01:15-04:00
EPA: Fix regression discarding comments in contexts

Closes #24533

- - - - -
7ff30f85 by Brandon Chinn at 2024-03-14T10:32:54-07:00
Add MultilineStrings extension

- - - - -
d69c82d3 by Brandon Chinn at 2024-03-14T10:40:33-07:00
Add test cases for MultilineStrings

- - - - -
f7a57615 by Brandon Chinn at 2024-03-14T10:40:34-07:00
Break out common lex_magic_hash logic for strings and chars

- - - - -
857bbf05 by Brandon Chinn at 2024-03-14T10:40:34-07:00
Factor out string processing functions

- - - - -
8d2cf320 by Brandon Chinn at 2024-03-14T10:40:34-07:00
Implement MultilineStrings (#24390)

Updates haddock submodule for new ITmultiline constructor

- - - - -
775254fb by Brandon Chinn at 2024-03-14T10:40:34-07:00
Add docs for MultilineStrings

- - - - -


30 changed files:

- .ghcid
- .gitignore
- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/darwin/nix/sources.json
- .gitlab/darwin/toolchain.nix
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/default.nix
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- .gitlab/rel_eng/mk-ghcup-metadata/README.mkd
- + .gitlab/rel_eng/recompress-all
- .gitlab/rel_eng/upload.sh
- .gitlab/rel_eng/upload_ghc_libs.py
- compiler/GHC.hs
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Types.hs-boot
- compiler/GHC/Builtin/Types/Literals.hs
- compiler/GHC/Builtin/Uniques.hs
- compiler/GHC/Builtin/primops.txt.pp
- 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


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d2edce69340c31ab7ed995f7db5fae269976733f...775254fb84509381e042bba0d03d3b88139e6eed

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d2edce69340c31ab7ed995f7db5fae269976733f...775254fb84509381e042bba0d03d3b88139e6eed
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/20240314/238f0e08/attachment-0001.html>


More information about the ghc-commits mailing list