[Git][ghc/ghc][wip/T22194] 108 commits: Add clangd flag to include generated header files

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Fri Mar 10 09:56:06 UTC 2023



Simon Peyton Jones pushed to branch wip/T22194 at Glasgow Haskell Compiler / GHC


Commits:
16adc349 by Sven Tennie at 2023-02-14T11:26:31-05:00
Add clangd flag to include generated header files

This enables clangd to correctly check C files that import Rts.h.
(The added include directory contains ghcautoconf.h et. al.)

- - - - -
c399ccd9 by amesgen at 2023-02-14T11:27:14-05:00
Mention new `Foreign.Marshal.Pool` implementation in User's Guide

- - - - -
b9282cf7 by Ben Gamari at 2023-02-14T11:27:50-05:00
upload_ghc_libs: More control over which packages to operate on

Here we add a `--skip` flag to `upload_ghc_libs`, making it easier to
limit which packages to upload. This is often necessary when one package
is not uploadable (e.g. see #22740).

- - - - -
aa3a262d by PHO at 2023-02-14T11:28:29-05:00
Assume platforms support rpaths if they use either ELF or Mach-O

Not only Linux, Darwin, and FreeBSD support rpaths. Determine the usability
of rpaths based on the object format, not on OS.

- - - - -
47716024 by PHO at 2023-02-14T11:29:09-05:00
RTS linker: Improve compatibility with NetBSD

1. Hint address to NetBSD mmap(2) has a different semantics from that of
   Linux. When a hint address is provided, mmap(2) searches for a free
   region at or below the hint but *never* above it. This means we can't
   reliably search for free regions incrementally on the userland,
   especially when ASLR is enabled. Let the kernel do it for us if we don't
   care where the mapped address is going to be.

2. NetBSD not only hates to map pages as rwx, but also disallows to switch
   pages from rw- to r-x unless the intention is declared when pages are
   initially requested. This means we need a new MemoryAccess mode for
   pages that are going to be changed to r-x.

- - - - -
11de324a by Li-yao Xia at 2023-02-14T11:29:49-05:00
base: Move changelog entry to its place

- - - - -
75930424 by Ben Gamari at 2023-02-14T11:30:27-05:00
nativeGen/AArch64: Emit Atomic{Read,Write} inline

Previously the AtomicRead and AtomicWrite operations were emitted as
out-of-line calls. However, these tend to be very important for
performance, especially the RELAXED case (which only exists for
ThreadSanitizer checking).

Fixes #22115.

- - - - -
d6411d6c by Andreas Klebinger at 2023-02-14T11:31:04-05:00
Fix some correctness issues around tag inference when targeting the bytecode generator.

* Let binders are now always assumed untagged for bytecode.
* Imported referenced are now always assumed to be untagged for bytecode.

Fixes #22840

- - - - -
9fb4ca89 by sheaf at 2023-02-14T11:31:49-05:00
Introduce warning for loopy superclass solve

Commit aed1974e completely re-engineered the treatment of loopy
superclass dictionaries in instance declarations. Unfortunately,
it has the potential to break (albeit in a rather minor way) user code.

To alleviate migration concerns, this commit re-introduces the old
behaviour. Any reliance on this old behaviour triggers a warning,
controlled by `-Wloopy-superclass-solve`. The warning text explains
that GHC might produce bottoming evidence, and provides a migration
strategy.

This allows us to provide a graceful migration period, alerting users
when they are relying on this unsound behaviour.

Fixes #22912 #22891 #20666 #22894 #22905

- - - - -
1928c7f3 by Cheng Shao at 2023-02-14T11:32:26-05:00
rts: make it possible to change mblock size on 32-bit targets

The MBLOCK_SHIFT macro must be the single source of truth for defining
the mblock size, and changing it should only affect performance, not
correctness. This patch makes it truly possible to reconfigure mblock
size, at least on 32-bit targets, by fixing places which implicitly
relied on the previous MBLOCK_SHIFT constant. Fixes #22901.

- - - - -
78aa3b39 by Simon Hengel at 2023-02-14T11:33:06-05:00
Update outdated references to notes

- - - - -
e8baecd2 by meooow25 at 2023-02-14T11:33:49-05:00
Documentation: Improve Foldable1 documentation

* Explain foldrMap1, foldlMap1, foldlMap1', and foldrMap1' in greater
  detail, the text is mostly adapted from documentation of Foldable.
* Describe foldr1, foldl1, foldl1' and foldr1' in terms of the above
  functions instead of redoing the full explanation.
* Small updates to documentation of fold1, foldMap1 and toNonEmpty,
  again adapting from Foldable.
* Update the foldMap1 example to lists instead of Sum since this is
  recommended for lazy right-associative folds.

Fixes #22847

- - - - -
85a1a575 by romes at 2023-02-14T11:34:25-05:00
fix: Mark ghci Prelude import as implicit

Fixes #22829

In GHCi, we were creating an import declaration for Prelude but we were
not setting it as an implicit declaration. Therefore, ghci's import of
Prelude triggered -Wmissing-import-lists.

Adds regression test T22829 to testsuite

- - - - -
3b019a7a by Cheng Shao at 2023-02-14T11:35:03-05:00
compiler: fix generateCgIPEStub for no-tables-next-to-code builds

generateCgIPEStub already correctly implements the CmmTick finding
logic for when tables-next-to-code is on/off, but it used the wrong
predicate to decide when to switch between the two. Previously it
switches based on whether the codegen is unregisterised, but there do
exist registerised builds that disable tables-next-to-code! This patch
corrects that problem. Fixes #22896.

- - - - -
08c0822c by doyougnu at 2023-02-15T00:16:39-05:00
docs: release notes, user guide: add js backend

Follow up from #21078

- - - - -
79d8fd65 by Bryan Richter at 2023-02-15T00:17:15-05:00
Allow failure in nightly-x86_64-linux-deb10-no_tntc-validate

See #22343

- - - - -
9ca51f9e by Cheng Shao at 2023-02-15T00:17:53-05:00
rts: add the rts_clearMemory function

This patch adds the rts_clearMemory function that does its best to
zero out unused RTS memory for a wasm backend use case. See the
comment above rts_clearMemory() prototype declaration for more
detailed explanation. Closes #22920.

- - - - -
26df73fb by Oleg Grenrus at 2023-02-15T22:20:57-05:00
Add -single-threaded flag to force single threaded rts

This is the small part of implementing
https://github.com/ghc-proposals/ghc-proposals/pull/240

- - - - -
631c6c72 by Cheng Shao at 2023-02-16T06:43:09-05:00
docs: add a section for the wasm backend

Fixes #22658

- - - - -
1878e0bd by Bryan Richter at 2023-02-16T06:43:47-05:00
tests: Mark T12903 fragile everywhere

See #21184

- - - - -
b9420eac by Bryan Richter at 2023-02-16T06:43:47-05:00
Mark all T5435 variants as fragile

See #22970.

- - - - -
df3d94bd by Sylvain Henry at 2023-02-16T06:44:33-05:00
Testsuite: mark T13167 as fragile for JS (#22921)

- - - - -
324e925b by Sylvain Henry at 2023-02-16T06:45:15-05:00
JS: disable debugging info for heap objects

- - - - -
518af814 by Josh Meredith at 2023-02-16T10:16:32-05:00
Factor JS Rts generation for h$c{_,0,1,2} into h$c{n} and improve name caching

- - - - -
34cd308e by Ben Gamari at 2023-02-16T10:17:08-05:00
base: Note move of GHC.Stack.CCS.whereFrom to GHC.InfoProv in changelog

Fixes #22883.

- - - - -
12965aba by Simon Peyton Jones at 2023-02-16T10:17:46-05:00
Narrow the dont-decompose-newtype test

Following #22924 this patch narrows the test that stops
us decomposing newtypes.  The key change is the use of
noGivenNewtypeReprEqs in GHC.Tc.Solver.Canonical.canTyConApp.

We went to and fro on the solution, as you can see in #22924.
The result is carefully documented in
  Note [Decomoposing newtype equalities]

On the way I had revert most of
  commit 3e827c3f74ef76d90d79ab6c4e71aa954a1a6b90
  Author: Richard Eisenberg <rae at cs.brynmawr.edu>
  Date:   Mon Dec 5 10:14:02 2022 -0500

    Do newtype unwrapping in the canonicaliser and rewriter

    See Note [Unwrap newtypes first], which has the details.

It turns out that

(a) 3e827c3f makes GHC behave worse on some recursive newtypes
    (see one of the tests on this commit)
(b) the finer-grained test (namely noGivenNewtypeReprEqs) renders
    3e827c3f unnecessary

- - - - -
5b038888 by Bodigrim at 2023-02-16T10:18:24-05:00
Documentation: add an example of SPEC usage

- - - - -
681e0e8c by sheaf at 2023-02-16T14:09:56-05:00
No default finalizer exception handler

Commit cfc8e2e2 introduced a mechanism for handling of exceptions
that occur during Handle finalization, and 372cf730 set the default
handler to print out the error to stderr.

However, #21680 pointed out we might not want to set this by default,
as it might pollute users' terminals with unwanted information.
So, for the time being, the default handler discards the exception.

Fixes #21680

- - - - -
b3ac17ad by Matthew Pickering at 2023-02-16T14:10:31-05:00
unicode: Don't inline bitmap in generalCategory

generalCategory contains a huge literal string but is marked INLINE,
this will duplicate the string into any use site of generalCategory. In
particular generalCategory is used in functions like isSpace and the
literal gets inlined into this function which makes it massive.

https://github.com/haskell/core-libraries-committee/issues/130

Fixes #22949

-------------------------
Metric Decrease:
    T4029
    T18304
-------------------------

- - - - -
8988eeef by sheaf at 2023-02-16T20:32:27-05:00
Expand synonyms in RoughMap

We were failing to expand type synonyms in the function
GHC.Core.RoughMap.typeToRoughMatchLookupTc, even though the
RoughMap infrastructure crucially relies on type synonym expansion
to work.

This patch adds the missing type-synonym expansion.

Fixes #22985

- - - - -
3dd50e2f by Matthew Pickering at 2023-02-16T20:33:03-05:00
ghcup-metadata: Add test artifact

Add the released testsuite tarball to the generated ghcup metadata.

- - - - -
c6a967d9 by Matthew Pickering at 2023-02-16T20:33:03-05:00
ghcup-metadata: Use Ubuntu and Rocky bindists

Prefer to use the Ubuntu 20.04 and 18.04 binary distributions on Ubuntu
and Linux Mint. Prefer to use the Rocky 8 binary distribution on
unknown distributions.

- - - - -
be0b7209 by Matthew Pickering at 2023-02-17T09:37:16+00:00
Add INLINABLE pragmas to `generic*` functions in Data.OldList

These functions are

* recursive
* overloaded

So it's important to add an `INLINABLE` pragma to each so that they can be
specialised at the use site when the specific numeric type is known.
Adding these pragmas improves the LazyText replicate benchmark (see https://gitlab.haskell.org/ghc/ghc/-/issues/22886#note_481020)

https://github.com/haskell/core-libraries-committee/issues/129

- - - - -
a203ad85 by Sylvain Henry at 2023-02-17T15:59:16-05:00
Merge libiserv with ghci

`libiserv` serves no purpose. As it depends on `ghci` and doesn't have
more dependencies than the `ghci` package, its code could live in the
`ghci` package too.

This commit also moves most of the code from the `iserv` program into
the `ghci` package as well so that it can be reused. This is especially
useful for the implementation of TH for the JS backend (#22261, !9779).

- - - - -
7080a93f by Simon Peyton Jones at 2023-02-20T12:06:32+01:00
Improve GHC.Tc.Gen.App.tcInstFun

It wasn't behaving right when inst_final=False, and the
function had no type variables
   f :: Foo => Int

Rather a corner case, but we might as well do it right.

Fixes #22908

Unexpectedly, three test cases (all using :type in GHCi) got
slightly better output as a result:
  T17403, T14796, T12447

- - - - -
2592ab69 by Cheng Shao at 2023-02-20T10:35:30-05:00
compiler: fix cost centre profiling breakage in wasm NCG due to incorrect register mapping

The wasm NCG used to map CCCS to a wasm global, based on the
observation that CCCS is a transient register that's already handled
by thread state load/store logic, so it doesn't need to be backed by
the rCCCS field in the register table.

Unfortunately, this is wrong, since even when Cmm execution hasn't
yielded back to the scheduler, the Cmm code may call enterFunCCS,
which does use rCCCS.

This breaks cost centre profiling in a subtle way, resulting in
inaccurate stack traces in some test cases. The fix is simple though:
just remove the CCCS mapping.

- - - - -
26243de1 by Alexis King at 2023-02-20T15:27:17-05:00
Handle top-level Addr# literals in the bytecode compiler

Fixes #22376.

- - - - -
0196cc2b by romes at 2023-02-20T15:27:52-05:00
fix: Explicitly flush stdout on plugin

Because of #20791, the plugins tests often fail.  This is a temporary
fix to stop the tests from failing due to unflushed outputs on windows
and the explicit flush should be removed when #20791 is fixed.

- - - - -
4327d635 by Ryan Scott at 2023-02-20T20:44:34-05:00
Don't generate datacon wrappers for `type data` declarations

Data constructor wrappers only make sense for _value_-level data constructors,
but data constructors for `type data` declarations only exist at the _type_
level. This patch does the following:

* The criteria in `GHC.Types.Id.Make.mkDataConRep` for whether a data
  constructor receives a wrapper now consider whether or not its parent data
  type was declared with `type data`, omitting a wrapper if this is the case.

* Now that `type data` data constructors no longer receive wrappers, there is a
  spot of code in `refineDefaultAlt` that panics when it encounters a value
  headed by a `type data` type constructor. I've fixed this with a special case
  in `refineDefaultAlt` and expanded `Note [Refine DEFAULT case alternatives]`
  to explain why we do this.

Fixes #22948.

- - - - -
96dc58b9 by Ryan Scott at 2023-02-20T20:44:35-05:00
Treat type data declarations as empty when checking pattern-matching coverage

The data constructors for a `type data` declaration don't exist at the value
level, so we don't want GHC to warn users to match on them.

Fixes #22964.

- - - - -
ff8e99f6 by Ryan Scott at 2023-02-20T20:44:35-05:00
Disallow `tagToEnum#` on `type data` types

We don't want to allow users to conjure up values of a `type data` type using
`tagToEnum#`, as these simply don't exist at the value level.

- - - - -
8e765aff by Bodigrim at 2023-02-21T12:03:24-05:00
Bump submodule text to 2.0.2

- - - - -
172ff88f by Georgi Lyubenov at 2023-02-21T18:35:56-05:00
GHC proposal 496 - Nullary record wildcards

This patch implements GHC proposal 496, which allows record wildcards
to be used for nullary constructors, e.g.

  data A = MkA1 | MkA2 { fld1 :: Int }
  f :: A -> Int
  f (MkA1 {..}) = 0
  f (MkA2 {..}) = fld1

To achieve this, we add arity information to the record field
environment, so that we can accept a constructor which has no fields
while continuing to reject non-record constructors with more than 1
field. See Note [Nullary constructors and empty record wildcards],
as well as the more general overview in Note [Local constructor info in the renamer],
both in the newly introduced GHC.Types.ConInfo module.

Fixes #22161

- - - - -
f70a0239 by sheaf at 2023-02-21T18:36:35-05:00
ghc-prim: levity-polymorphic array equality ops

This patch changes the pointer-equality comparison operations in
GHC.Prim.PtrEq to work with arrays of unlifted values, e.g.

  sameArray# :: forall {l} (a :: TYPE (BoxedRep l)). Array# a -> Array# a -> Int#

Fixes #22976

- - - - -
9296660b by Andreas Klebinger at 2023-02-21T23:58:05-05:00
base: Correct @since annotation for FP<->Integral bit cast operations.

Fixes #22708

- - - - -
f11d9c27 by romes at 2023-02-21T23:58:42-05:00
fix: Update documentation links

Closes #23008

Additionally batches some fixes to pointers to the Note [Wired-in units],
and a typo in said note.

- - - - -
fb60339f by Bryan Richter at 2023-02-23T14:45:17+02:00
Propagate failure if unable to push notes

- - - - -
8e170f86 by Alexis King at 2023-02-23T16:59:22-05:00
rts: Fix `prompt#` when profiling is enabled

This commit also adds a new -Dk RTS option to the debug RTS to assist
debugging continuation captures. Currently, the printed information is
quite minimal, but more can be added in the future if it proves to be
useful when debugging future issues.

fixes #23001

- - - - -
e9e7a00d by sheaf at 2023-02-23T17:00:01-05:00
Explicit migration timeline for loopy SC solving

This patch updates the warning message introduced in commit
9fb4ca89bff9873e5f6a6849fa22a349c94deaae to specify an explicit
migration timeline: GHC will no longer support this constraint solving
mechanism starting from GHC 9.10.

Fixes #22912

- - - - -
4eb9c234 by Sylvain Henry at 2023-02-24T17:27:45-05:00
JS: make some arithmetic primops faster (#22835)

Don't use BigInt for wordAdd2, mulWord32, and timesInt32.

Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org>

- - - - -
92e76483 by Ben Gamari at 2023-02-24T17:28:20-05:00
Bump terminfo submodule to 0.4.1.6

- - - - -
f229db14 by Ben Gamari at 2023-02-24T17:28:20-05:00
Bump unix submodule to 2.8.1.0

- - - - -
47bd48c1 by Ben Gamari at 2023-02-24T17:28:20-05:00
Bump deepseq submodule to 1.4.8.1

- - - - -
d2012594 by Ben Gamari at 2023-02-24T17:28:20-05:00
Bump directory submodule to 1.3.8.1

- - - - -
df6f70d1 by Ben Gamari at 2023-02-24T17:28:20-05:00
Bump process submodule to v1.6.17.0

- - - - -
4c869e48 by Ben Gamari at 2023-02-24T17:28:20-05:00
Bump hsc2hs submodule to 0.68.8

- - - - -
81d96642 by Ben Gamari at 2023-02-24T17:28:20-05:00
Bump array submodule to 0.5.4.0

- - - - -
6361f771 by Ben Gamari at 2023-02-24T17:28:20-05:00
Bump Cabal submodule to 3.9 pre-release

- - - - -
4085fb6c by Ben Gamari at 2023-02-24T17:28:20-05:00
Bump filepath submodule to 1.4.100.1

- - - - -
2bfad50f by Ben Gamari at 2023-02-24T17:28:20-05:00
Bump haskeline submodule to 0.8.2.1

- - - - -
fdc89a8d by Ben Gamari at 2023-02-24T21:29:32-05:00
gitlab-ci: Run nix-build with -v0

This significantly cuts down on the amount of
noise in the job log.

Addresses #22861.
- - - - -
69fb0b13 by Aaron Allen at 2023-02-24T21:30:10-05:00
Fix ParallelListComp out of scope suggestion

This patch makes it so vars from one block of a parallel list
comprehension are not in scope in a subsequent block during type
checking. This was causing GHC to emit a faulty suggestion when an out
of scope variable shared the occ name of a var from a different block.

Fixes #22940

- - - - -
ece092d0 by Simon Peyton Jones at 2023-02-24T21:30:45-05:00
Fix shadowing bug in prepareAlts

As #23012 showed, GHC.Core.Opt.Simplify.Utils.prepareAlts was
using an OutType to construct an InAlt.  When shadowing is in play,
this is outright wrong.

See Note [Shadowing in prepareAlts].

- - - - -
7825fef9 by Sylvain Henry at 2023-02-24T21:31:25-05:00
JS: Store CI perf results (fix #22923)

- - - - -
b56025f4 by Gergő Érdi at 2023-02-27T13:34:22+00:00
Don't specialise incoherent instance applications

Using incoherent instances, there can be situations where two
occurrences of the same overloaded function at the same type use two
different instances (see #22448). For incoherently resolved instances,
we must mark them with `nospec` to avoid the specialiser rewriting one
to the other. This marking is done during the desugaring of the
`WpEvApp` wrapper.

Fixes #22448

Metric Increase:
    T15304

- - - - -
d0c7bbed by Tom Ellis at 2023-02-27T20:04:07-05:00
Fix SCC grouping example

- - - - -
f84a8cd4 by Bryan Richter at 2023-02-28T05:58:37-05:00
Mark setnumcapabilities001 fragile

- - - - -
29a04d6e by Bryan Richter at 2023-02-28T05:58:37-05:00
Allow nightly-x86_64-linux-deb10-validate+thread_sanitizer to fail

See #22520

- - - - -
9fa54572 by Cheng Shao at 2023-02-28T05:59:15-05:00
ghc-prim: fix hs_cmpxchg64 function prototype

hs_cmpxchg64 must return a StgWord64, otherwise incorrect runtime
results of 64-bit MO_Cmpxchg will appear in 32-bit unregisterised
builds, which go unnoticed at compile-time due to C implicit casting
in .hc files.

- - - - -
0c200ab7 by Simon Peyton Jones at 2023-02-28T11:10:31-05:00
Account for local rules in specImports

As #23024 showed, in GHC.Core.Opt.Specialise.specImports, we were
generating specialisations (a locally-define function) for imported
functions; and then generating specialisations for those
locally-defined functions.  The RULE for the latter should be
attached to the local Id, not put in the rules-for-imported-ids
set.

Fix is easy; similar to what happens in GHC.HsToCore.addExportFlagsAndRules

- - - - -
8b77f9bf by Sylvain Henry at 2023-02-28T11:11:21-05:00
JS: fix for overlap with copyMutableByteArray# (#23033)

The code wasn't taking into account some kind of overlap.

cgrun070 has been extended to test the missing case.

- - - - -
239202a2 by Sylvain Henry at 2023-02-28T11:12:03-05:00
Testsuite: replace some js_skip with req_cmm

req_cmm is more informative than js_skip

- - - - -
7192ef91 by Simon Peyton Jones at 2023-02-28T18:54:59-05:00
Take more care with unlifted bindings in the specialiser

As #22998 showed, we were floating an unlifted binding to top
level, which breaks a Core invariant.

The fix is easy, albeit a little bit conservative.  See
Note [Care with unlifted bindings] in GHC.Core.Opt.Specialise

- - - - -
bb500e2a by Simon Peyton Jones at 2023-02-28T18:55:35-05:00
Account for TYPE vs CONSTRAINT in mkSelCo

As #23018 showed, in mkRuntimeRepCo we need to account for coercions
between TYPE and COERCION.

See Note [mkRuntimeRepCo] in GHC.Core.Coercion.

- - - - -
79ffa170 by Ben Gamari at 2023-03-01T04:17:20-05:00
hadrian: Add dependency from lib/settings to mk/config.mk

In 81975ef375de07a0ea5a69596b2077d7f5959182 we attempted to fix #20253
by adding logic to the bindist Makefile to regenerate the `settings`
file from information gleaned by the bindist `configure` script.
However, this fix had no effect as `lib/settings` is shipped in the
binary distribution (to allow in-place use of the binary distribution).
As `lib/settings` already existed and its rule declared no dependencies,
`make` would fail to use the added rule to regenerate it.

Fix this by explicitly declaring a dependency from `lib/settings` on
`mk/config.mk`.

Fixes #22982.

- - - - -
a2a1a1c0 by Sebastian Graf at 2023-03-01T04:17:56-05:00
Revert the main payload of "Make `drop` and `dropWhile` fuse (#18964)"

This reverts the bits affecting fusion of `drop` and `dropWhile` of commit
0f7588b5df1fc7a58d8202761bf1501447e48914 and keeps just the small refactoring
unifying `flipSeqTake` and `flipSeqScanl'` into `flipSeq`.

It also adds a new test for #23021 (which was the reason for reverting) as
well as adds a clarifying comment to T18964.

Fixes #23021, unfixes #18964.

Metric Increase:
    T18964
Metric Decrease:
    T18964

- - - - -
cf118e2f by Simon Peyton Jones at 2023-03-01T04:18:33-05:00
Refine the test for naughty record selectors

The test for naughtiness in record selectors is surprisingly subtle.
See the revised Note [Naughty record selectors] in GHC.Tc.TyCl.Utils.

Fixes #23038.

- - - - -
86f240ca by romes at 2023-03-01T04:19:10-05:00
fix: Consider strictness annotation in rep_bind

Fixes #23036

- - - - -
1ed573a5 by Richard Eisenberg at 2023-03-02T22:42:06-05:00
Don't suppress *all* Wanteds

Code in GHC.Tc.Errors.reportWanteds suppresses a Wanted if its
rewriters have unfilled coercion holes; see
Note [Wanteds rewrite Wanteds] in GHC.Tc.Types.Constraint.

But if we thereby suppress *all* errors that's really confusing,
and as #22707 shows, GHC goes on without even realising that the
program is broken. Disaster.

This MR arranges to un-suppress them all if they all get suppressed.

Close #22707

- - - - -
8919f341 by Luite Stegeman at 2023-03-02T22:42:45-05:00
Check for platform support for JavaScript foreign imports

GHC was accepting `foreign import javascript` declarations
on non-JavaScript platforms. This adds a check so that these
are only supported on an platform that supports the JavaScript
calling convention.

Fixes #22774

- - - - -
db83f8bb by Ben Gamari at 2023-03-02T22:43:22-05:00
rts: Statically assert alignment of Capability

In #22965 we noticed that changes in the size of `Capability` can result
in unsound behavior due to the `align` pragma claiming an alignment
which we don't in practice observe. Avoid this by statically asserting
that the size is a multiple of the alignment.

- - - - -
5f7a4a6d by Ben Gamari at 2023-03-02T22:43:22-05:00
rts: Introduce stgMallocAlignedBytes

- - - - -
8a6f745d by Ben Gamari at 2023-03-02T22:43:22-05:00
rts: Correctly align Capability allocations

Previously we failed to tell the C allocator that `Capability`s needed
to be aligned, resulting in #22965.

Fixes #22965.
Fixes #22975.

- - - - -
5464c73f by Ben Gamari at 2023-03-02T22:43:22-05:00
rts: Drop no-alignment special case for Windows

For reasons that aren't clear, we were previously not giving Capability
the same favorable alignment on Windows that we provided on other
platforms. Fix this.

- - - - -
a86aae8b by Matthew Pickering at 2023-03-02T22:43:59-05:00
constant folding: Correct type of decodeDouble_Int64 rule

The first argument is Int64# unconditionally, so we better produce
something of that type. This fixes a core lint error found in the ad
package.

Fixes #23019

- - - - -
68dd64ff by Zubin Duggal at 2023-03-02T22:44:35-05:00
ncg/aarch64: Handle MULTILINE_COMMENT identically as COMMENTs

Commit 7566fd9de38c67360c090f828923d41587af519c with the fix for #22798 was
incomplete as it failed to handle MULTILINE_COMMENT pseudo-instructions, and
didn't completly fix the compiler panics when compiling with `-fregs-graph`.

Fixes #23002

- - - - -
2f97c861 by Simon Peyton Jones at 2023-03-02T22:45:11-05:00
Get the right in-scope set in etaBodyForJoinPoint

Fixes #23026

- - - - -
45af8482 by David Feuer at 2023-03-03T11:40:47-05:00
Export getSolo from Data.Tuple

Proposed in
[CLC proposal #113](https://github.com/haskell/core-libraries-committee/issues/113)
and
[approved by the CLC](https://github.com/haskell/core-libraries-committee/issues/113#issuecomment-1452452191)

- - - - -
0c694895 by David Feuer at 2023-03-03T11:40:47-05:00
Document getSolo

- - - - -
bd0536af by Simon Peyton Jones at 2023-03-03T11:41:23-05:00
More fixes for `type data` declarations

This MR fixes #23022 and #23023.  Specifically

* Beef up Note [Type data declarations] in GHC.Rename.Module,
  to make invariant (I1) explicit, and to name the several
  wrinkles.

  And add references to these specific wrinkles.

* Add a Lint check for invariant (I1) above.
  See GHC.Core.Lint.checkTypeDataConOcc

* Disable the `caseRules` for dataToTag# for `type data` values.
  See Wrinkle (W2c) in the Note above.  Fixes #23023.

* Refine the assertion in dataConRepArgTys, so that it does not
  complain about the absence of a wrapper for a `type data` constructor
  Fixes #23022.

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

- - - - -
858f34d5 by Oleg Grenrus at 2023-03-04T01:13:55+02:00
Add decideSymbol, decideChar, decideNat, decTypeRep, decT and hdecT

These all type-level equality decision procedures.

Implementes a CLC proposal https://github.com/haskell/core-libraries-committee/issues/98

- - - - -
bf43ba92 by Simon Peyton Jones at 2023-03-04T01:18:23-05:00
Add test for T22793

- - - - -
c6e1f3cd by Chris Wendt at 2023-03-04T03:35:18-07:00
Fix typo in docs referring to threadLabel

- - - - -
232cfc24 by Simon Peyton Jones at 2023-03-05T19:57:30-05:00
Add regression test for #22328

- - - - -
5ed77deb by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00
Enable response files for linker if supported

- - - - -
1e0f6c89 by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00
Synchronize `configure.ac` and `distrib/configure.ac.in`

- - - - -
70560952 by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00
Fix `hadrian/bindist/config.mk.in`

… as suggested by @bgamari

- - - - -
b042b125 by sheaf at 2023-03-06T17:06:50-05:00
Apply 1 suggestion(s) to 1 file(s)
- - - - -
674b6b81 by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00
Try to create somewhat portable `ld` command

I cannot figure out a good way to generate an `ld` command
that works on both Linux and macOS.  Normally you'd use something
like `AC_LINK_IFELSE` for this purpose (I think), but that won't
let us test response file support.

- - - - -
83b0177e by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00
Quote variables

… as suggested by @bgamari

- - - - -
845f404d by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00
Fix configure failure on alpine linux

- - - - -
c56a3ae6 by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00
Small fixes to configure script

- - - - -
cad5c576 by Andrei Borzenkov at 2023-03-06T17:07:33-05:00
Convert diagnostics in GHC.Rename.Module to proper TcRnMessage (#20115)

I've turned almost all occurrences of TcRnUnknownMessage in GHC.Rename.Module
module into a proper TcRnMessage.
Instead, these TcRnMessage messages were introduced:
  TcRnIllegalInstanceHeadDecl
  TcRnUnexpectedStandaloneDerivingDecl
  TcRnUnusedVariableInRuleDecl
  TcRnUnexpectedStandaloneKindSig
  TcRnIllegalRuleLhs
  TcRnBadAssocRhs
  TcRnDuplicateRoleAnnot
  TcRnDuplicateKindSig
  TcRnIllegalDerivStrategy
  TcRnIllegalMultipleDerivClauses
  TcRnNoDerivStratSpecified
  TcRnStupidThetaInGadt
  TcRnBadImplicitSplice
  TcRnShadowedTyVarNameInFamResult
  TcRnIncorrectTyVarOnLhsOfInjCond
  TcRnUnknownTyVarsOnRhsOfInjCond

Was introduced one helper type:
  RuleLhsErrReason

- - - - -
c6432eac by Apoorv Ingle at 2023-03-06T23:26:12+00:00
Constraint simplification loop now depends on `ExpansionFuel`
instead of a boolean flag for `CDictCan.cc_pend_sc`.
Pending givens get a fuel of 3 while Wanted and quantified constraints get a fuel of 1.
This helps pending given constraints to keep up with pending wanted constraints in case of
`UndecidableSuperClasses` and superclass expansions while simplifying the infered type.

Adds 3 dynamic flags for controlling the fuels for each type of constraints
`-fgivens-expansion-fuel` for givens `-fwanteds-expansion-fuel` for wanteds and `-fqcs-expansion-fuel` for quantified constraints

Fixes #21909
Added Tests T21909, T21909b
Added Note [Expanding Recursive Superclasses and ExpansionFuel]

- - - - -
a5afc8ab by Bodigrim at 2023-03-06T22:51:01-05:00
Documentation: describe laziness of several function from Data.List

- - - - -
c9efc3b6 by Simon Peyton Jones at 2023-03-07T08:44:43+00:00
Refactor the constraint solver pipeline

The big change is to put the entire type-equality solver into
GHC.Tc.Solver.Equality, rather than scattering it over Canonical
and Interact.  Other changes

* EqCt becomes its own data type, a bit like QCInst.  This is
  great because EqualCtList is then just [EqCt]

* New module GHC.Tc.Solver.Dict has come of the class-contraint
  solver.  In due course it will be all.  One step at a time.

This MR is intended to have zero change in behaviour: it is a
pure refactor.  It opens the way to subsequent tidying up, we
believe.

- - - - -
9a8e9a74 by Simon Peyton Jones at 2023-03-07T12:50:53+00:00
Wibbles

- - - - -
2c33414c by Simon Peyton Jones at 2023-03-10T09:55:00+00:00
DRAFT: Refactor the way we establish a canonical constraint

Relevant to #22194

Incomplete; but I'd like to see the CI results

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- .gitlab/rel_eng/upload_ghc_libs.py
- .gitlab/test-metrics.sh
- CODEOWNERS
- cabal.project-reinstall
- compile_flags.txt
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/Wasm/FromCmm.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Class.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/Specialise.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/081640f1e0b5a9def306f3e13c1825fef5403c95...2c33414c79dde79d3099f07200e3038044db1236

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/081640f1e0b5a9def306f3e13c1825fef5403c95...2c33414c79dde79d3099f07200e3038044db1236
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/20230310/3e2301f6/attachment-0001.html>


More information about the ghc-commits mailing list