[Git][ghc/ghc][wip/toolchain-selection] 113 commits: Report scoped kind variables at the type-checking phase (#16635)
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Mon Jul 3 09:40:49 UTC 2023
Rodrigo Mesquita pushed to branch wip/toolchain-selection at Glasgow Haskell Compiler / GHC
Commits:
78cd1132 by Andrei Borzenkov at 2023-06-15T11:16:11+04:00
Report scoped kind variables at the type-checking phase (#16635)
This patch modifies the renamer to respect ScopedTypeVariables in kind
signatures. This means that kind variables bound by the outermost
`forall` now scope over the type:
type F = '[Right @a @() () :: forall a. Either a ()]
-- ^^^^^^^^^^^^^^^ ^^^
-- in scope here bound here
However, any use of such variables is a type error, because we don't
have type-level lambdas to bind them in Core. This is described in the
new Note [Type variable scoping errors during type check] in GHC.Tc.Types.
- - - - -
4a41ba75 by Sylvain Henry at 2023-06-15T18:09:15-04:00
JS: testsuite: use correct ticket number
Replace #22356 with #22349 for these tests because #22356 has been fixed
but now these tests fail because of #22349.
- - - - -
15f150c8 by Sylvain Henry at 2023-06-15T18:09:16-04:00
JS: testsuite: update ticket numbers
- - - - -
08d8e9ef by Sylvain Henry at 2023-06-15T18:09:16-04:00
JS: more triage
- - - - -
e8752e12 by Krzysztof Gogolewski at 2023-06-15T18:09:52-04:00
Fix test T18522-deb-ppr
Fixes #23509
- - - - -
62c56416 by Ben Price at 2023-06-16T05:52:39-04:00
Lint: more details on "Occurrence is GlobalId, but binding is LocalId"
This is helpful when debugging a pass which accidentally shadowed a
binder.
- - - - -
d4c10238 by Ryan Hendrickson at 2023-06-16T05:53:22-04:00
Clean a stray bit of text in user guide
- - - - -
93647b5c by Vladislav Zavialov at 2023-06-16T05:54:02-04:00
testsuite: Add forall visibility test cases
The added tests ensure that the type checker does not confuse
visible and invisible foralls.
VisFlag1: kind-checking type applications and inferred type variable instantiations
VisFlag1_ql: kind-checking Quick Look instantiations
VisFlag2: kind-checking type family instances
VisFlag3: checking kind annotations on type parameters of associated type families
VisFlag4: checking kind annotations on type parameters in type declarations with SAKS
VisFlag5: checking the result kind annotation of data family instances
- - - - -
a5f0c00e by Sylvain Henry at 2023-06-16T12:25:40-04:00
JS: factorize SaneDouble into its own module
Follow-up of b159e0e9 whose ticket is #22736
- - - - -
0baf9e7c by Krzysztof Gogolewski at 2023-06-16T12:26:17-04:00
Add tests for #21973
- - - - -
640ea90e by Diego Diverio at 2023-06-16T23:07:55-04:00
Update documentation for `<**>`
- - - - -
2469a813 by Diego Diverio at 2023-06-16T23:07:55-04:00
Update text
- - - - -
1f515bbb by Diego Diverio at 2023-06-16T23:07:55-04:00
Update examples
- - - - -
7af99a0d by Diego Diverio at 2023-06-16T23:07:55-04:00
Update documentation to actually display code correctly
- - - - -
800aad7e by Andrei Borzenkov at 2023-06-16T23:08:32-04:00
Type/data instances: require that variables on the RHS are mentioned on the LHS (#23512)
GHC Proposal #425 "Invisible binders in type declarations" restricts the
scope of type and data family instances as follows:
In type family and data family instances, require that every variable
mentioned on the RHS must also occur on the LHS.
For example, here are three equivalent type instance definitions accepted before this patch:
type family F1 a :: k
type instance F1 Int = Any :: j -> j
type family F2 a :: k
type instance F2 @(j -> j) Int = Any :: j -> j
type family F3 a :: k
type instance forall j. F3 Int = Any :: j -> j
- In F1, j is implicitly quantified and it occurs only on the RHS;
- In F2, j is implicitly quantified and it occurs both on the LHS and the RHS;
- In F3, j is explicitly quantified.
Now F1 is rejected with an out-of-scope error, while F2 and F3 continue to be accepted.
- - - - -
9132d529 by Sylvain Henry at 2023-06-18T02:50:34-04:00
JS: testsuite: use correct ticket numbers
- - - - -
c3a1274c by Sylvain Henry at 2023-06-18T02:50:34-04:00
JS: don't dump eventlog to stderr by default
Fix T16707
Bump stm submodule
- - - - -
89bb8ad8 by Ryan Hendrickson at 2023-06-18T02:51:14-04:00
Fix TH name lookup for symbolic tycons (#23525)
- - - - -
cb9e1ce4 by Finley McIlwaine at 2023-06-18T21:16:45-06:00
IPE data compression
IPE data resulting from the `-finfo-table-map` flag may now be
compressed by configuring the GHC build with the
`--enable-ipe-data-compression` flag. This results in about a 20%
reduction in the size of IPE-enabled build results.
The compression library, zstd, may optionally be statically linked by
configuring with the `--enabled-static-libzstd` flag (on non-darwin
platforms)
libzstd version 1.4.0 or greater is required.
- - - - -
0cbc3ae0 by Gergő Érdi at 2023-06-19T09:11:38-04:00
Add `IfaceWarnings` to represent the `ModIface`-storable parts
of a `Warnings GhcRn`.
Fixes #23516
- - - - -
3e80c2b4 by Arnaud Spiwack at 2023-06-20T03:19:41-04:00
Avoid desugaring non-recursive lets into recursive lets
This prepares for having linear let expressions in the frontend.
When desugaring lets, SPECIALISE statements create more copies of a
let binding. Because of the rewrite rules attached to the bindings,
there are dependencies between the generated binds.
Before this commit, we simply wrapped all these in a mutually
recursive let block, and left it to the simplified to sort it out.
With this commit: we are careful to generate the bindings in
dependency order, so that we can wrap them in consecutive lets (if the
source is non-recursive).
- - - - -
9fad49e0 by Ben Gamari at 2023-06-20T03:20:19-04:00
rts: Do not call exit() from SIGINT handler
Previously `shutdown_handler` would call `stg_exit` if the scheduler was
Oalready found to be in `SCHED_INTERRUPTING` state (or higher). However,
`stg_exit` is not signal-safe as it calls `exit` (which calls `atexit`
handlers). The only safe thing to do in this situation is to call
`_exit`, which terminates with minimal cleanup.
Fixes #23417.
- - - - -
7485f848 by Bodigrim at 2023-06-20T03:20:57-04:00
Bump Cabal submodule
This requires changing the recomp007 test because now cabal passes
`this-unit-id` to executable components, and that unit-id contains a
hash which includes the ABI of the dependencies. Therefore changing the
dependencies means that -this-unit-id changes and recompilation is
triggered.
The spririt of the test is to test GHC's recompilation logic assuming
that `-this-unit-id` is constant, so we explicitly pass `-ipid` to
`./configure` rather than letting `Cabal` work it out.
- - - - -
1464a2a8 by mangoiv at 2023-06-20T03:21:34-04:00
[feat] add a hint to `HasField` error message
- add a hint that indicates that the record that the record dot is used
on might just be missing a field
- as the intention of the programmer is not entirely clear, it is only
shown if the type is known
- This addresses in part issue #22382
- - - - -
b65e78dd by Ben Gamari at 2023-06-20T16:56:43-04:00
rts/ipe: Fix unused lock warning
- - - - -
6086effd by Ben Gamari at 2023-06-20T16:56:44-04:00
rts/ProfilerReportJson: Fix memory leak
- - - - -
1e48c434 by Ben Gamari at 2023-06-20T16:56:44-04:00
rts: Various warnings fixes
- - - - -
471486b9 by Ben Gamari at 2023-06-20T16:56:44-04:00
rts: Fix printf format mismatch
- - - - -
80603fb3 by Ben Gamari at 2023-06-20T16:56:44-04:00
rts: Fix incorrect #include <sys/poll.h>
According to Alpine's warnings and poll(2), <poll.h> should be
preferred.
- - - - -
ff18e6fd by Ben Gamari at 2023-06-20T16:56:44-04:00
nonmoving: Fix unused definition warrnings
- - - - -
6e7fe8ee by Ben Gamari at 2023-06-20T16:56:44-04:00
Disable futimens on Darwin.
See #22938
- - - - -
b7706508 by Ben Gamari at 2023-06-20T16:56:44-04:00
rts: Fix incorrect CPP guard
- - - - -
94f00e9b by Ben Gamari at 2023-06-20T16:56:44-04:00
hadrian: Ensure that -Werror is passed when compiling the RTS.
Previously the `+werror` transformer would only pass `-Werror` to GHC,
which does not ensure that the same is passed to the C compiler when
building the RTS. Arguably this is itself a bug but for now we will just
work around this by passing `-optc-Werror` to GHC.
I tried to enable `-Werror` in all C compilations but the boot libraries
are something of a portability nightmare.
- - - - -
5fb54bf8 by Ben Gamari at 2023-06-20T16:56:44-04:00
rts: Disable `#pragma GCC`s on clang compilers
Otherwise the build fails due to warnings. See #23530.
- - - - -
cf87f380 by Ben Gamari at 2023-06-20T16:56:44-04:00
rts: Fix capitalization of prototype
- - - - -
17f250d7 by Ben Gamari at 2023-06-20T16:56:44-04:00
rts: Fix incorrect format specifier
- - - - -
0ff1c501 by Josh Meredith at 2023-06-20T16:57:20-04:00
JS: remove js_broken(22576) in favour of the pre-existing wordsize(32) condition (#22576)
- - - - -
3d1d42b7 by Finley McIlwaine at 2023-06-21T12:04:58-04:00
Memory usage fixes for Haddock
- Do not include `mi_globals` in the `NoBackend` backend. It was only included
for Haddock, but Haddock does not actually need it. This causes a 200MB
reduction in max residency when generating haddocks on the Agda codebase
(roughly 1GB to 800MB).
- Make haddock_{parser,renamer}_perf tests more accurate by forcing docs to
be written to interface files using `-fwrite-interface`
Bumps haddock submodule.
Metric Decrease:
haddock.base
- - - - -
8185b1c2 by Finley McIlwaine at 2023-06-21T12:04:58-04:00
Fix associated data family doc structure items
Associated data families were being given their own export DocStructureItems,
which resulted in them being documented separately from their classes in
haddocks. This commit fixes it.
- - - - -
4d356ea3 by Sylvain Henry at 2023-06-21T12:04:59-04:00
JS: implement TH support
- Add ghc-interp.js bootstrap script for the JS interpreter
- Interactively link and execute iserv code from the ghci package
- Incrementally load and run JS code for splices into the running iserv
Co-authored-by: Luite Stegeman <stegeman at gmail.com>
- - - - -
3249cf12 by Sylvain Henry at 2023-06-21T12:04:59-04:00
Don't use getKey
- - - - -
f84ff161 by Sylvain Henry at 2023-06-21T12:04:59-04:00
Stg: return imported FVs
This is used to determine what to link when using the interpreter.
For now it's only used by the JS interpreter but it could easily be used
by the native interpreter too (instead of extracting names from compiled BCOs).
- - - - -
fab2ad23 by Sylvain Henry at 2023-06-21T12:04:59-04:00
Fix some recompilation avoidance tests
- - - - -
a897dc13 by Sylvain Henry at 2023-06-21T12:04:59-04:00
TH_import_loop is now broken as expected
- - - - -
dbb4ad51 by Sylvain Henry at 2023-06-21T12:04:59-04:00
JS: always recompile when TH is enabled (cf #23013)
- - - - -
711b1d24 by Bartłomiej Cieślar at 2023-06-21T12:59:27-04:00
Add support for deprecating exported items (proposal #134)
This is an implementation of the deprecated exports proposal #134.
The proposal introduces an ability to introduce warnings to exports.
This allows for deprecating a name only when it is exported from a specific
module, rather than always depreacting its usage. In this example:
module A ({-# DEPRECATED "do not use" #-} x) where
x = undefined
---
module B where
import A(x)
`x` will emit a warning when it is explicitly imported.
Like the declaration warnings, export warnings are first accumulated within
the `Warnings` struct, then passed into the ModIface, from which they are
then looked up and warned about in the importing module in the `lookup_ie`
helpers of the `filterImports` function (for the explicitly imported names)
and in the `addUsedGRE(s)` functions where they warn about regular usages
of the imported name.
In terms of the AST information, the custom warning is stored in the
extension field of the variants of the `IE` type (see Trees that Grow for
more information).
The commit includes a bump to the haddock submodule added in MR #28
Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com>
- - - - -
c1865854 by Ben Gamari at 2023-06-21T12:59:30-04:00
configure: Bump version to 9.8
Bumps Haddock submodule
- - - - -
4e1de71c by Ben Gamari at 2023-06-21T21:07:48-04:00
configure: Bump version to 9.9
Bumps haddock submodule.
- - - - -
5b6612bc by Ben Gamari at 2023-06-23T03:56:49-04:00
rts: Work around missing prototypes errors
Darwin's toolchain inexpliciably claims that `write_barrier` and friends
have declarations without prototypes, despite the fact that (a) they are
definitions, and (b) the prototypes appear only a few lines above. Work
around this by making the definitions proper prototypes.
- - - - -
43b66a13 by Matthew Pickering at 2023-06-23T03:57:26-04:00
ghcup-metadata: Fix date modifier (M = minutes, m = month)
Fixes #23552
- - - - -
564164ef by Luite Stegeman at 2023-06-24T10:27:29+09:00
Support large stack frames/offsets in GHCi bytecode interpreter
Bytecode instructions like PUSH_L (push a local variable) contain
an operand that refers to the stack slot. Before this patch, the
operand type was SmallOp (Word16), limiting the maximum stack
offset to 65535 words. This could cause compiler panics in some
cases (See #22888).
This patch changes the operand type for stack offsets from
SmallOp to Op, removing the stack offset limit.
Fixes #22888
- - - - -
8d6574bc by Sylvain Henry at 2023-06-26T13:15:06-04:00
JS: support levity-polymorphic datatypes (#22360,#22291)
- thread knowledge about levity into PrimRep instead of panicking
- JS: remove assumption that unlifted heap objects are rts objects (TVar#, etc.)
Doing this also fixes #22291 (test added).
There is a small performance hit (~1% more allocations).
Metric Increase:
T18698a
T18698b
- - - - -
5578bbad by Matthew Pickering at 2023-06-26T13:15:43-04:00
MR Review Template: Mention "Blocked on Review" label
In order to improve our MR review processes we now have the label
"Blocked on Review" which allows people to signal that a MR is waiting
on a review to happen.
See: https://mail.haskell.org/pipermail/ghc-devs/2023-June/021255.html
- - - - -
4427e9cf by Matthew Pickering at 2023-06-26T13:15:43-04:00
Move MR template to Default.md
This makes it more obvious what you have to modify to affect the default
template rather than looking in the project settings.
- - - - -
522bd584 by Arnaud Spiwack at 2023-06-26T13:16:33-04:00
Revert "Avoid desugaring non-recursive lets into recursive lets"
This (temporary) reverts commit 3e80c2b40213bebe302b1bd239af48b33f1b30ef.
Fixes #23550
- - - - -
c59fbb0b by Torsten Schmits at 2023-06-26T19:34:20+02:00
Propagate breakpoint information when inlining across modules
Tracking ticket: #23394
MR: !10448
* Add constructor `IfaceBreakpoint` to `IfaceTickish`
* Store breakpoint data in interface files
* Store `BreakArray` for the breakpoint's module, not the current module, in BCOs
* Store module name in BCOs instead of `Unique`, since the `Unique` from an `Iface` doesn't match the modules in GHCi's
state
* Allocate module name in `ModBreaks`, like `BreakArray`
* Lookup breakpoint by module name in GHCi
* Skip creating breakpoint instructions when no `ModBreaks` are available, rather than injecting `ModBreaks` in the
linker when breakpoints are enabled, and panicking when `ModBreaks` is missing
- - - - -
6f904808 by Greg Steuck at 2023-06-27T16:53:07-04:00
Remove undefined FP_PROG_LD_BUILD_ID from configure.ac's
- - - - -
e89aa072 by Andrei Borzenkov at 2023-06-27T16:53:44-04:00
Remove arity inference in type declarations (#23514)
Arity inference in type declarations was introduced
as a workaround for the lack of @k-binders.
They were added in 4aea0a72040, so I simplified all
of this by simply removing arity inference altogether.
This is part of GHC Proposal #425 "Invisible binders in type
declarations".
- - - - -
459dee1b by Torsten Schmits at 2023-06-27T16:54:20-04:00
Relax defaulting of RuntimeRep/Levity when printing
Fixes #16468
MR: !10702
Only default RuntimeRep to LiftedRep when variables are bound by the toplevel forall
- - - - -
151f8f18 by Torsten Schmits at 2023-06-27T16:54:57-04:00
Remove duplicate link label in linear types docs
- - - - -
ecdc4353 by Rodrigo Mesquita at 2023-06-28T12:24:57-04:00
Stop configuring unused Ld command in `settings`
GHC has no direct dependence on the linker. Rather, we depend upon the C
compiler for linking and an object-merging program (which is typically
`ld`) for production of GHCi objects and merging of C stubs into final
object files.
Despite this, for historical reasons we still recorded information about
the linker into `settings`. Remove these entries from `settings`,
`hadrian/cfg/system.config`, as well as the `configure` logic
responsible for this information.
Closes #23566.
- - - - -
bf9ec3e4 by Bryan Richter at 2023-06-28T12:25:33-04:00
Remove extraneous debug output
- - - - -
7eb68dd6 by Bryan Richter at 2023-06-28T12:25:33-04:00
Work with unset vars in -e mode
- - - - -
49c27936 by Bryan Richter at 2023-06-28T12:25:33-04:00
Pass positional arguments in their positions
By quoting $cmd, the default "bash -i" is a single argument to run, and
no file named "bash -i" actually exists to be run.
- - - - -
887dc4fc by Bryan Richter at 2023-06-28T12:25:33-04:00
Handle unset value in -e context
- - - - -
5ffc7d7b by Rodrigo Mesquita at 2023-06-28T21:07:36-04:00
Configure CPP into settings
There is a distinction to be made between the Haskell Preprocessor and
the C preprocessor. The former is used to preprocess Haskell files,
while the latter is used in C preprocessing such as Cmm files.
In practice, they are both the same program (usually the C compiler) but
invoked with different flags.
Previously we would, at configure time, configure the haskell
preprocessor and save the configuration in the settings file, but,
instead of doing the same for CPP, we had hardcoded in GHC that the CPP
program was either `cc -E` or `cpp`.
This commit fixes that asymmetry by also configuring CPP at configure
time, and tries to make more explicit the difference between HsCpp and
Cpp (see Note [Preprocessing invocations]).
Note that we don't use the standard CPP and CPPFLAGS to configure Cpp,
but instead use the non-standard --with-cpp and --with-cpp-flags.
The reason is that autoconf sets CPP to "$CC -E", whereas we expect the
CPP command to be configured as a standalone executable rather than a
command. These are symmetrical with --with-hs-cpp and
--with-hs-cpp-flags.
Cleanup: Hadrian no longer needs to pass the CPP configuration for CPP
to be C99 compatible through -optP, since we now configure that
into settings.
Closes #23422
- - - - -
5efa9ca5 by Ben Gamari at 2023-06-28T21:08:13-04:00
hadrian: Always canonicalize topDirectory
Hadrian's `topDirectory` is intended to provide an absolute path to the
root of the GHC tree. However, if the tree is reached via a symlink this
One question here is whether the `canonicalizePath` call is expensive
enough to warrant caching. In a quick microbenchmark I observed that
`canonicalizePath "."` takes around 10us per call; this seems
sufficiently low not to worry.
Alternatively, another approach here would have been to rather move the
canonicalization into `m4/fp_find_root.m4`. This would have avoided
repeated canonicalization but sadly path canonicalization is a hard
problem in POSIX shell.
Addresses #22451.
- - - - -
b3e1436f by aadaa_fgtaa at 2023-06-28T21:08:53-04:00
Optimise ELF linker (#23464)
- cache last elements of `relTable`, `relaTable` and `symbolTables` in `ocInit_ELF`
- cache shndx table in ObjectCode
- run `checkProddableBlock` only with debug rts
- - - - -
30525b00 by Ben Gamari at 2023-06-28T21:09:30-04:00
compiler: Introduce MO_{ACQUIRE,RELEASE}_FENCE
- - - - -
b787e259 by Ben Gamari at 2023-06-28T21:09:30-04:00
compiler: Drop MO_WriteBarrier
rts: Drop write_barrier
- - - - -
7550b4a5 by Ben Gamari at 2023-06-28T21:09:30-04:00
rts: Drop load_store_barrier()
This is no longer used.
- - - - -
d5f2875e by Ben Gamari at 2023-06-28T21:09:31-04:00
rts: Drop last instances of prim_{write,read}_barrier
- - - - -
965ac2ba by Ben Gamari at 2023-06-28T21:09:31-04:00
rts: Eliminate remaining uses of load_load_barrier
- - - - -
0fc5cb97 by Sven Tennie at 2023-06-28T21:09:31-04:00
compiler: Drop MO_ReadBarrier
- - - - -
7a7d326c by Ben Gamari at 2023-06-28T21:09:31-04:00
rts: Drop load_load_barrier
This is no longer used.
- - - - -
9f63da66 by Sven Tennie at 2023-06-28T21:09:31-04:00
Delete write_barrier function
- - - - -
bb0ed354 by Ben Gamari at 2023-06-28T21:09:31-04:00
rts: Make collectFreshWeakPtrs definition a prototype
x86-64/Darwin's toolchain inexplicably warns that collectFreshWeakPtrs
needs to be a prototype.
- - - - -
ef81a1eb by Sven Tennie at 2023-06-28T21:10:08-04:00
Fix number of free double regs
D1..D4 are defined for aarch64 and thus not free.
- - - - -
c335fb7c by Ryan Scott at 2023-06-28T21:10:44-04:00
Fix typechecking of promoted empty lists
The `'[]` case in `tc_infer_hs_type` is smart enough to handle arity-0 uses of
`'[]` (see the newly added `T23543` test case for an example), but the `'[]`
case in `tc_hs_type` was not. We fix this by changing the `tc_hs_type` case to
invoke `tc_infer_hs_type`, as prescribed in `Note [Future-proofing the type
checker]`.
There are some benign changes to test cases' expected output due to the new
code path using `forall a. [a]` as the kind of `'[]` rather than `[k]`.
Fixes #23543.
- - - - -
fcf310e7 by Rodrigo Mesquita at 2023-06-28T21:11:21-04:00
Configure MergeObjs supports response files rather than Ld
The previous configuration script to test whether Ld supported response
files was
* Incorrect (see #23542)
* Used, in practice, to check if the *merge objects tool* supported
response files.
This commit modifies the macro to run the merge objects tool (rather
than Ld), using a response file, and checking the result with $NM
Fixes #23542
- - - - -
78b2f3cc by Sylvain Henry at 2023-06-28T21:12:02-04:00
JS: fix JS stack printing (#23565)
- - - - -
9f01d14b by Matthew Pickering at 2023-06-29T04:13:41-04:00
Add -fpolymorphic-specialisation flag (off by default at all optimisation levels)
Polymorphic specialisation has led to a number of hard to diagnose
incorrect runtime result bugs (see #23469, #23109, #21229, #23445) so
this commit introduces a flag `-fpolymorhphic-specialisation` which
allows users to turn on this experimental optimisation if they are
willing to buy into things going very wrong.
Ticket #23469
- - - - -
b1e611d5 by Ben Gamari at 2023-06-29T04:14:17-04:00
Rip out runtime linker/compiler checks
We used to choose flags to pass to the toolchain at runtime based on the
platform running GHC, and in this commit we drop all of those runtime
linker checks
Ultimately, this represents a change in policy: We no longer adapt at
runtime to the toolchain being used, but rather make final decisions
about the toolchain used at /configure time/
(we have deleted Note [Run-time linker info] altogether!).
This works towards the goal of having all toolchain configuration logic
living in the same place, which facilities the work towards a
runtime-retargetable GHC (see #19877).
As of this commit, the runtime linker/compiler logic was moved to
autoconf, but soon it, and the rest of the existing toolchain
configuration logic, will live in the standalone ghc-toolchain program
(see !9263)
In particular, what used to be done at runtime is now as follows:
* The flags -Wl,--no-as-needed for needed shared libs are configured
into settings
* The flag -fstack-check is configured into settings
* The check for broken tables-next-to-code was outdated
* We use the configured c compiler by default as the assembler program
* We drop `asmOpts` because we already configure -Qunused-arguments flag
into settings (see !10589)
Fixes #23562
Co-author: Rodrigo Mesquita (@alt-romes)
- - - - -
8b35e8ca by Ben Gamari at 2023-06-29T18:46:12-04:00
Define FFI_GO_CLOSURES
The libffi shipped with Apple's XCode toolchain does not contain a
definition of the FFI_GO_CLOSURES macro, despite containing references
to said macro. Work around this by defining the macro, following the
model of a similar workaround in OpenJDK [1].
[1] https://github.com/openjdk/jdk17u-dev/pull/741/files
- - - - -
d7ef1704 by Ben Gamari at 2023-06-29T18:46:12-04:00
base: Fix incorrect CPP guard
This was guarded on `darwin_HOST_OS` instead of `defined(darwin_HOST_OS)`.
- - - - -
7c7d1f66 by Ben Gamari at 2023-06-29T18:46:48-04:00
rts/Trace: Ensure that debugTrace arguments are used
As debugTrace is a macro we must take care to ensure that
the fact is clear to the compiler lest we see warnings.
- - - - -
cb92051e by Ben Gamari at 2023-06-29T18:46:48-04:00
rts: Various warnings fixes
- - - - -
dec81dd1 by Ben Gamari at 2023-06-29T18:46:48-04:00
hadrian: Ignore warnings in unix and semaphore-compat
- - - - -
d7f6448a by Matthew Pickering at 2023-06-30T12:38:43-04:00
hadrian: Fix dependencies of docs:* rule
For the docs:* rule we need to actually build the package rather than
just the haddocks for the dependent packages. Therefore we depend on the
.conf files of the packages we are trying to build documentation for as
well as the .haddock files.
Fixes #23472
- - - - -
cec90389 by sheaf at 2023-06-30T12:39:27-04:00
Add tests for #22106
Fixes #22106
- - - - -
083794b1 by Torsten Schmits at 2023-07-03T03:27:27-04:00
Add -fbreak-points to control breakpoint insertion
Rather than statically enabling breakpoints only for the interpreter,
this adds a new flag.
Tracking ticket: #23057
MR: !10466
- - - - -
fd8c5769 by Ben Gamari at 2023-07-03T03:28:04-04:00
rts: Ensure that pinned allocations respect block size
Previously, it was possible for pinned, aligned allocation requests to
allocate beyond the end of the pinned accumulator block. Specifically,
we failed to account for the padding needed to achieve the requested
alignment in the "large object" check. With large alignment requests,
this can result in the allocator using the capability's pinned object
accumulator block to service a request which is larger than
`PINNED_EMPTY_SIZE`.
To fix this we reorganize `allocatePinned` to consistently account for
the alignment padding in all large object checks. This is a bit subtle
as we must handle the case of a small allocation request filling the
accumulator block, as well as large requests.
Fixes #23400.
- - - - -
98185d52 by Ben Gamari at 2023-07-03T03:28:05-04:00
testsuite: Add test for #23400
- - - - -
4aac0540 by Ben Gamari at 2023-07-03T03:28:42-04:00
ghc-heap: Support for BLOCKING_QUEUE closures
- - - - -
03f941f4 by Ben Bellick at 2023-07-03T03:29:29-04:00
Add some structured diagnostics in Tc/Validity.hs
This addresses the work of ticket #20118
Created the following constructors for TcRnMessage
- TcRnInaccessibleCoAxBranch
- TcRnPatersonCondFailure
- - - - -
6074cc3c by Moisés Ackerman at 2023-07-03T03:30:13-04:00
Add failing test case for #23492
- - - - -
356a2692 by Moisés Ackerman at 2023-07-03T03:30:13-04:00
Use generated src span for catch-all case of record selector functions
This fixes #23492. The problem was that we used the real source span
of the field declaration for the generated catch-all case in the
selector function, in particular in the generated call to
`recSelError`, which meant it was included in the HIE output. Using
`generatedSrcSpan` instead means that it is not included.
- - - - -
3efe7f39 by Moisés Ackerman at 2023-07-03T03:30:13-04:00
Introduce genLHsApp and genLHsLit helpers in GHC.Rename.Utils
- - - - -
dd782343 by Moisés Ackerman at 2023-07-03T03:30:13-04:00
Construct catch-all default case using helpers
GHC.Rename.Utils concrete helpers instead of wrapGenSpan + HS AST constructors
- - - - -
0e09c38e by Ryan Hendrickson at 2023-07-03T03:30:56-04:00
Add regression test for #23549
- - - - -
32741743 by Alexis King at 2023-07-03T03:31:36-04:00
perf tests: Increase default stack size for MultiLayerModules
An unhelpfully small stack size appears to have been the real culprit
behind the metric fluctuations in #19293. Debugging metric decreases
triggered by !10729 helped to finally identify the problem.
Metric Decrease:
MultiLayerModules
MultiLayerModulesTH_Make
T13701
T14697
- - - - -
82ac6bf1 by Bryan Richter at 2023-07-03T03:32:15-04:00
Add missing void prototypes to rts functions
See #23561.
- - - - -
6078b429 by Ben Gamari at 2023-07-03T03:32:51-04:00
gitlab-ci: Refactor compilation of gen_ci
Flakify and document it, making it far less sensitive to the build
environment.
- - - - -
aa2db0ae by Ben Gamari at 2023-07-03T03:33:29-04:00
testsuite: Update documentation
- - - - -
924a2362 by Gregory Gerasev at 2023-07-03T03:34:10-04:00
Better error for data deriving of type synonym/family. Closes #23522
- - - - -
4457da2a by Dave Barton at 2023-07-03T03:34:51-04:00
Fix some broken links and typos
- - - - -
b7c43f59 by Ben Gamari at 2023-07-03T10:38:12+01:00
configure: Rip out Solaris dyld check
Solaris 11 was released over a decade ago and, moreover, I doubt we have
any Solaris users
- - - - -
1a65bd87 by Ben Gamari at 2023-07-03T10:38:12+01:00
ghc-toolchain: Initial commit
- - - - -
09fa741c by Rodrigo Mesquita at 2023-07-03T10:38:12+01:00
Create ghc_toolchain.m4
Don't pass options to ghc-toolchain, it should arrive at the same conclusion as configure for now
- - - - -
35124c55 by Rodrigo Mesquita at 2023-07-03T10:40:21+01:00
ghc-toolchain: Toolchain Selection
ghc-toolchain: Rename readProcess to readProcessStdout
Fixes bugs regarding a translation from the original autconf program
that failed to account for the exit code.
The longer name reenforces that we really only care about the stdout,
and the exit code and stderr of the program are irrelevant for the case.
Fixes
Re-introduce ld-override option
ghc-toolchain library and usage in hadrian flags
Re-introduce flags in hadrian config
ghc-toolchain: UseLibFFI, LdCompactUnwind, LdFileList
A more complete ghc-toolchain.
Added configuration of:
* Use libffi for adjustors
* Supports compact unwind
* Supports filelist
Handle passing CPP cmd and flags from configure to ghc-toolchain
Rip more of configure that is no longer being used
Remove configure checks of GNUnoexecStack and ident directive
And fix bug in ghc-toolchain respective code
Rip out more from hadrians system.config.in
Configure CLink supports response files
Read deleted keys from host and target's target
Delete CMD_OPTS_STAGEX
Instead of having configure configure different options for different
programs depend on the stage, we delete this completely and have hadrian
select the correct target toolchain configuration file depending on the
stage, from which it can read those options.
Fix [host|target]-[os|arch] vs [host|target]-haskell-[os|arch]
Handle unspecified vs specified flags and commands better
Configure Cpp and HsCpp separately
Fixes for compilation
Link is GNU linkerg
Revert "Rip more of configure that is no longer being used"
I realized we still need this function in rts/configure.ac
This reverts commit 01f5d4b4.
Revert get_arm_isa deletion from 74f03f24
As in the previous commit, we still need this info from the rts
configure script.
I suppose it could be useful for the rts to also read somehow the
toolchain information...
helper AC function for enable/disable
Delete unused imports of SysTools.Info
Drop PROG_CPP in distrib/autoconf too
Get rid of MonadCatch instances and dependencies
ghc-toolchain: Check Cc supports extra-via-c-flags
Consider empty programs as non-specified programs
Cpp and HsCpp cleanup
Add comment from check for gold t22266
Remove more settings bits from hadrian/cfg
Use llvm target from ghc-toolchain
Print default.target
Fix bugs in MergeTool and Ar
Add check and log errors on error
X
Revert LLVMTarget deletion in mkprojectmkin
Fix stack job
Fixes for ghc-toolchain to match configure output
ghc-toolchain: Fix ar supports at file
Fixes
ghc-toolchain: Fix check for gold bug
ghc-toolchain: configure linker options correctly
Support more targets and dont use llvmtarget
allow duplos in place of triples
A TODO comment
ghc-toolchain: set CC LD plat. dependent flags
A lot to be said about the approach of configuring linker flags (what
used to be SET CC LD platform dependent flags in configure), we might
want to re-do this all eventually...
Perhaps I ought to add a TODO at the top level of these functions?
We might also not do it altogether, some of these might be outdated?
Move osElfTarget from GHC.Platform to GHC.Platform.ArchOS, to use it in
Toolchain.Tools.Link to correctly determine if -Wl,--no-as-needed is required
- - - - -
99c77526 by Rodrigo Mesquita at 2023-07-03T10:40:22+01:00
configure: Create and validate toolchain target file
Interpolate LeadingUnderscore in distrib/configure.ac.in
- - - - -
ab75aa02 by Rodrigo Mesquita at 2023-07-03T10:40:22+01:00
Split GHC.Platform.ArchOS from ghc-boot into ghc-platform
- - - - -
f10acf66 by Rodrigo Mesquita at 2023-07-03T10:40:22+01:00
Use ghc-platform instead of ghc-boot
- - - - -
30 changed files:
- .gitignore
- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/darwin/toolchain.nix
- + .gitlab/generate-ci/LICENSE
- + .gitlab/generate-ci/README.mkd
- + .gitlab/generate-ci/flake.lock
- + .gitlab/generate-ci/flake.nix
- .gitlab/gen_ci.hs → .gitlab/generate-ci/gen_ci.hs
- + .gitlab/generate-ci/generate-ci.cabal
- + .gitlab/generate-ci/generate-job-metadata
- + .gitlab/generate-ci/generate-jobs
- − .gitlab/generate_job_metadata
- − .gitlab/generate_jobs
- .gitlab/jobs.yaml
- .gitlab/merge_request_templates/merge-request.md → .gitlab/merge_request_templates/Default.md
- compiler/GHC.hs
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/Utils.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5c555310e9d6d80010220202252aeadc4a0b7f30...f10acf66c700aaf493611a90e13e11317dcfbd63
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5c555310e9d6d80010220202252aeadc4a0b7f30...f10acf66c700aaf493611a90e13e11317dcfbd63
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/20230703/be24038b/attachment-0001.html>
More information about the ghc-commits
mailing list