[Git][ghc/ghc][wip/enable-late-ccs-release] 467 commits: nativeGen: Explicitly set flags of text sections on Windows
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Tue Oct 17 14:39:22 UTC 2023
Matthew Pickering pushed to branch wip/enable-late-ccs-release at Glasgow Haskell Compiler / GHC
Commits:
3ece9856 by Ben Gamari at 2023-07-21T07:30:45-04:00
nativeGen: Explicitly set flags of text sections on Windows
The binutils documentation (for COFF) claims,
> If no flags are specified, the default flags depend upon the section
> name. If the section name is not recognized, the default will be for the
> section to be loaded and writable.
We previously assumed that this would do the right thing for split
sections (e.g. a section named `.text$foo` would be correctly inferred
to be a text section). However, we have observed that this is not the
case (at least under the clang toolchain used on Windows): when
split-sections is enabled, text sections are treated by the assembler as
data (matching the "default" behavior specified by the documentation).
Avoid this by setting section flags explicitly. This should fix split
sections on Windows.
Fixes #22834.
- - - - -
db7f7240 by Ben Gamari at 2023-07-21T07:30:45-04:00
nativeGen: Set explicit section types on all platforms
- - - - -
b444c16f by Finley McIlwaine at 2023-07-21T07:31:28-04:00
Insert documentation into parsed signature modules
Causes haddock comments in signature modules to be properly
inserted into the AST (just as they are for regular modules)
if the `-haddock` flag is given.
Also adds a test that compares `-ddump-parsed-ast` output
for a signature module to prevent further regressions.
Fixes #23315
- - - - -
c30cea53 by Ben Gamari at 2023-07-21T23:23:49-04:00
primops: Introduce unsafeThawByteArray#
This addresses an odd asymmetry in the ByteArray# primops, which
previously provided unsafeFreezeByteArray# but no corresponding
thaw operation.
Closes #22710
- - - - -
87f9bd47 by Ben Gamari at 2023-07-21T23:23:49-04:00
testsuite: Elaborate in interface stability README
This discussion didn't make it into the original MR.
- - - - -
e4350b41 by Matthew Pickering at 2023-07-21T23:24:25-04:00
Allow users to override non-essential haddock options in a Flavour
We now supply the non-essential options to haddock using the `extraArgs`
field, which can be specified in a Flavour so that if an advanced user
wants to change how documentation is generated then they can use
something other than the `defaultHaddockExtraArgs`.
This does have the potential to regress some packaging if a user has
overridden `extraArgs` themselves, because now they also need to add
the haddock options to extraArgs. This can easily be done by appending
`defaultHaddockExtraArgs` to their extraArgs invocation but someone
might not notice this behaviour has changed.
In any case, I think passing the non-essential options in this manner is
the right thing to do and matches what we do for the "ghc" builder,
which by default doesn't pass any optmisation levels, and would likewise
be very bad if someone didn't pass suitable `-O` levels for builds.
Fixes #23625
- - - - -
fc186b0c by Ilias Tsitsimpis at 2023-07-21T23:25:03-04:00
ghc-prim: Link against libatomic
Commit b4d39adbb58 made 'hs_cmpxchg64()' available to all architectures.
Unfortunately this made GHC to fail to build on armel, since armel needs
libatomic to support atomic operations on 64-bit word sizes.
Configure libraries/ghc-prim/ghc-prim.cabal to link against libatomic,
the same way as we do in rts/rts.cabal.
- - - - -
4f5538a8 by Matthew Pickering at 2023-07-21T23:25:39-04:00
simplifier: Correct InScopeSet in rule matching
The in-scope set passedto the `exprIsLambda_maybe` call lacked all the
in-scope binders. @simonpj suggests this fix where we augment the
in-scope set with the free variables of expression which fixes this
failure mode in quite a direct way.
Fixes #23630
- - - - -
5ad8d597 by Krzysztof Gogolewski at 2023-07-21T23:26:17-04:00
Add a test for #23413
It was fixed by commit e1590ddc661d6: Add the SolverStage monad.
- - - - -
7e05f6df by sheaf at 2023-07-21T23:26:56-04:00
Finish migration of diagnostics in GHC.Tc.Validity
This patch finishes migrating the error messages in GHC.Tc.Validity
to use the new diagnostic infrastructure.
It also refactors the error message datatypes for class and family
instances, to common them up under a single datatype as much as possible.
- - - - -
4876fddc by Matthew Pickering at 2023-07-21T23:27:33-04:00
ci: Enable some more jobs to run in a marge batch
In !10907 I made the majority of jobs not run on a validate pipeline but
then forgot to renable a select few jobs on the marge batch MR.
- - - - -
026991d7 by Jens Petersen at 2023-07-21T23:28:13-04:00
user_guide/flags.py: python-3.12 no longer includes distutils
packaging.version seems able to handle this fine
- - - - -
b91bbc2b by Matthew Pickering at 2023-07-21T23:28:50-04:00
ci: Mention ~full-ci label in MR template
We mention that if you need a full validation pipeline then you can
apply the ~full-ci label to your MR in order to test against the full
validation pipeline (like we do for marge).
- - - - -
42b05e9b by sheaf at 2023-07-22T12:36:00-04:00
RTS: declare setKeepCAFs symbol
Commit 08ba8720 failed to declare the dependency of keepCAFsForGHCi on
the symbol setKeepCAFs in the RTS, which led to undefined symbol errors
on Windows, as exhibited by the testcase frontend001.
Thanks to Moritz Angermann and Ryan Scott for the diagnosis and fix.
Fixes #22961
- - - - -
a72015d6 by sheaf at 2023-07-22T12:36:01-04:00
Mark plugins-external as broken on Windows
This test is broken on Windows, so we explicitly mark it as such now
that we stop skipping plugin tests on Windows.
- - - - -
cb9c93d7 by sheaf at 2023-07-22T12:36:01-04:00
Stop marking plugin tests as fragile on Windows
Now that b2bb3e62 has landed we are in a better situation with
regards to plugins on Windows, allowing us to unmark many plugin tests
as fragile.
Fixes #16405
- - - - -
a7349217 by Krzysztof Gogolewski at 2023-07-22T12:36:37-04:00
Misc cleanup
- Remove unused RDR names
- Fix typos in comments
- Deriving: simplify boxConTbl and remove unused litConTbl
- chmod -x GHC/Exts.hs, this seems accidental
- - - - -
33b6850a by Vladislav Zavialov at 2023-07-23T10:27:37-04:00
Visible forall in types of terms: Part 1 (#22326)
This patch implements part 1 of GHC Proposal #281,
introducing explicit `type` patterns and `type` arguments.
Summary of the changes:
1. New extension flag:
RequiredTypeArguments
2. New user-facing syntax:
`type p` patterns (represented by EmbTyPat)
`type e` expressions (represented by HsEmbTy)
3. Functions with required type arguments (visible forall)
can now be defined and applied:
idv :: forall a -> a -> a -- signature (relevant change: checkVdqOK in GHC/Tc/Validity.hs)
idv (type a) (x :: a) = x -- definition (relevant change: tcPats in GHC/Tc/Gen/Pat.hs)
x = idv (type Int) 42 -- usage (relevant change: tcInstFun in GHC/Tc/Gen/App.hs)
4. template-haskell support:
TH.TypeE corresponds to HsEmbTy
TH.TypeP corresponds to EmbTyPat
5. Test cases and a new User's Guide section
Changes *not* included here are the t2t (term-to-type) transformation
and term variable capture; those belong to part 2.
- - - - -
73b5c7ce by sheaf at 2023-07-23T10:28:18-04:00
Add test for #22424
This is a simple Template Haskell test in which we refer to
record selectors by their exact Names, in two different ways.
Fixes #22424
- - - - -
83cbc672 by Ben Gamari at 2023-07-24T07:40:49+00:00
ghc-toolchain: Initial commit
- - - - -
31dcd26c by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
ghc-toolchain: Toolchain Selection
This commit integrates ghc-toolchain, the brand new way of configuring
toolchains for GHC, with the Hadrian build system, with configure, and
extends and improves the first iteration of ghc-toolchain.
The general overview is
* We introduce a program invoked `ghc-toolchain --triple=...` which, when run,
produces a file with a `Target`. A `GHC.Toolchain.Target.Target`
describes the properties of a target and the toolchain (executables
and configured flags) to produce code for that target
* Hadrian was modified to read Target files, and will both
* Invoke the toolchain configured in the Target file as needed
* Produce a `settings` file for GHC based on the Target file for that stage
* `./configure` will invoke ghc-toolchain to generate target files, but
it will also generate target files based on the flags configure itself
configured (through `.in` files that are substituted)
* By default, the Targets generated by configure are still (for now) the ones used by Hadrian
* But we additionally validate the Target files generated by
ghc-toolchain against the ones generated by configure, to get a head
start on catching configuration bugs before we transition
completely.
* When we make that transition, we will want to drop a lot of the
toolchain configuration logic from configure, but keep it otherwise.
* For each compiler stage we should have 1 target file (up to a stage compiler we can't run in our machine)
* We just have a HOST target file, which we use as the target for stage0
* And a TARGET target file, which we use for stage1 (and later stages, if not cross compiling)
* Note there is no BUILD target file, because we only support cross compilation where BUILD=HOST
* (for more details on cross-compilation see discussion on !9263)
See also
* Note [How we configure the bundled windows toolchain]
* Note [ghc-toolchain consistency checking]
* Note [ghc-toolchain overview]
Ticket: #19877
MR: !9263
- - - - -
a732b6d3 by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
Add flag to enable/disable ghc-toolchain based configurations
This flag is disabled by default, and we'll use the
configure-generated-toolchains by default until we remove the toolchain
configuration logic from configure.
- - - - -
61eea240 by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
Split ghc-toolchain executable to new packge
In light of #23690, we split the ghc-toolchain executable out of the
library package to be able to ship it in the bindist using Hadrian.
Ideally, we eventually revert this commit.
- - - - -
38e795ff by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00
Ship ghc-toolchain in the bindist
Add the ghc-toolchain binary to the binary distribution we ship to
users, and teach the bindist configure to use the existing ghc-toolchain.
- - - - -
32cae784 by Matthew Craven at 2023-07-24T16:48:24-04:00
Kill off gen_bytearray_addr_access_ops.py
The relevant primop descriptions are now
generated directly by genprimopcode.
This makes progress toward fixing #23490, but it is not
a complete fix since there is more than one way in which
cabal-reinstall (hadrian/build build-cabal) is broken.
- - - - -
02e6a6ce by Matthew Pickering at 2023-07-24T16:49:00-04:00
compiler: Remove unused `containers.h` include
Fixes #23712
- - - - -
822ef66b by Matthew Pickering at 2023-07-25T08:44:50-04:00
Fix pretty printing of WARNING pragmas
There is still something quite unsavoury going on with WARNING pragma
printing because the printing relies on the fact that for decl
deprecations the SourceText of WarningTxt is empty. However, I let that
lion sleep and just fixed things directly.
Fixes #23465
- - - - -
e7b38ede by Matthew Pickering at 2023-07-25T08:45:28-04:00
ci-images: Bump to commit which has 9.6 image
The test-bootstrap job has been failing for 9.6 because we accidentally
used a non-master commit.
- - - - -
bb408936 by Matthew Pickering at 2023-07-25T08:45:28-04:00
Update bootstrap plans for 9.6.2 and 9.4.5
- - - - -
355e1792 by Alan Zimmerman at 2023-07-26T10:17:32-04:00
EPA: Simplify GHC/Parser.y comb4/comb5
Use the HasLoc instance from Ast.hs to allow comb4/comb5 to work with
anything with a SrcSpan
Also get rid of some more now unnecessary reLoc calls.
- - - - -
9393df83 by Gavin Zhao at 2023-07-26T10:18:16-04:00
compiler: make -ddump-asm work with wasm backend NCG
Fixes #23503.
Now the `-ddump-asm` flag is respected in the wasm backend
NCG, so developers can directly view the generated ASM instead of
needing to pass `-S` or `-keep-tmp-files` and manually find & open
the assembly file.
Ideally, we should be able to output the assembly files in smaller
chunks like in other NCG backends. This would also make dumping assembly
stats easier. However, this would require a large refactoring, so for
short-term debugging purposes I think the current approach works fine.
Signed-off-by: Gavin Zhao <git at gzgz.dev>
- - - - -
79463036 by Krzysztof Gogolewski at 2023-07-26T10:18:54-04:00
llvm: Restore accidentally deleted code in 0fc5cb97
Fixes #23711
- - - - -
20db7e26 by Rodrigo Mesquita at 2023-07-26T10:19:33-04:00
configure: Default missing options to False when preparing ghc-toolchain Targets
This commit fixes building ghc with 9.2 as the boostrap compiler.
The ghc-toolchain patch assumed all _STAGE0 options were available, and
forgot to account for this missing information in 9.2.
Ghc 9.2 does not have in settings whether ar supports -l, hence can't
report it with --info (unliked 9.4 upwards).
The fix is to default the missing information (we default "ar supports
-l" and other missing options to False)
- - - - -
fac9e84e by Naïm Favier at 2023-07-26T10:20:16-04:00
docs: Fix typo
- - - - -
503fd647 by Bartłomiej Cieślar at 2023-07-26T17:23:10-04:00
This MR is an implementation of the proposal #516.
It adds a warning -Wincomplete-record-selectors for usages of a record
field access function (either a record selector or getField @"rec"),
while trying to silence the warning whenever it can be sure that a constructor
without the record field would not be invoked (which would otherwise cause
the program to fail). For example:
data T = T1 | T2 {x :: Bool}
f a = x a -- this would throw an error
g T1 = True
g a = x a -- this would not throw an error
h :: HasField "x" r Bool => r -> Bool
h = getField @"x"
j :: T -> Bool
j = h -- this would throw an error because of the `HasField`
-- constraint being solved
See the tests DsIncompleteRecSel* and TcIncompleteRecSel for more examples of the warning.
See Note [Detecting incomplete record selectors] in GHC.HsToCore.Expr for implementation details
- - - - -
af6fdf42 by Arnaud Spiwack at 2023-07-26T17:23:52-04:00
Fix user-facing label in MR template
- - - - -
5d45b92a by Matthew Pickering at 2023-07-27T05:46:46-04:00
ci: Test bootstrapping configurations with full-ci and on marge batches
There have been two incidents recently where bootstrapping has been
broken by removing support for building with 9.2.*.
The process for bumping the minimum required version starts with bumping
the configure version and then other CI jobs such as the bootstrap jobs
have to be updated. We must not silently bump the minimum required
version.
Now we are running a slimmed down validate pipeline it seems worthwile
to test these bootstrap configurations in the full-ci pipeline.
- - - - -
25d4fee7 by Matthew Pickering at 2023-07-27T05:46:46-04:00
bootstrap: Remove ghc-9_2_* plans
We are anticipating shortly making it necessary to use ghc-9.4 to boot
the compiler.
- - - - -
2f66da16 by Matthew Pickering at 2023-07-27T05:46:46-04:00
Update bootstrap plans for ghc-platform and ghc-toolchain dependencies
Fixes #23735
- - - - -
c8c6eab1 by Matthew Pickering at 2023-07-27T05:46:46-04:00
bootstrap: Disable -selftest flag from bootstrap plans
This saves on building one dependency (QuickCheck) which is unecessary
for bootstrapping.
- - - - -
a80ca086 by Andrew Lelechenko at 2023-07-27T05:47:26-04:00
Link reference paper and package from System.Mem.{StableName,Weak}
- - - - -
a5319358 by David Knothe at 2023-07-28T13:13:10-04:00
Update Match Datatype
EquationInfo currently contains a list of the equation's patterns together with a CoreExpr that is to be evaluated after a successful match on this equation.
All the match-functions only operate on the first pattern of an equation - after successfully matching it, match is called recursively on the tail of the pattern list.
We can express this more clearly and make the code a little more elegant by updating the datatype of EquationInfo as follows:
data EquationInfo
= EqnMatch { eqn_pat = Pat GhcTc, eqn_rest = EquationInfo }
| EqnDone { eqn_rhs = MatchResult CoreExpr }
An EquationInfo now explicitly exposes its first pattern which most functions operate on, and exposes the equation that remains after processing the first pattern. An EqnDone signifies an empty equation where the CoreExpr can now be evaluated.
- - - - -
86ad1af9 by David Binder at 2023-07-28T13:13:53-04:00
Improve documentation for Data.Fixed
- - - - -
f8fa1d08 by Ben Gamari at 2023-07-28T13:14:31-04:00
ghc-prim: Use C11 atomics
Previously `ghc-prim`'s atomic wrappers used the legacy `__sync_*`
family of C builtins. Here we refactor these to rather use the
appropriate C11 atomic equivalents, allowing us to be more explicit
about the expected ordering semantics.
- - - - -
0bfc8908 by Finley McIlwaine at 2023-07-28T18:46:26-04:00
Include -haddock in DynFlags fingerprint
The -haddock flag determines whether or not the resulting .hi files
contain haddock documentation strings. If the existing .hi files do
not contain haddock documentation strings and the user requests them,
we should recompile.
- - - - -
40425c50 by Andreas Klebinger at 2023-07-28T18:47:02-04:00
Aarch64 NCG: Use encoded immediates for literals.
Try to generate
instr x2, <imm>
instead of
mov x1, lit
instr x2, x1
When possible. This get's rid if quite a few redundant
mov instructions.
I believe this causes a metric decrease for LargeRecords as
we reduce register pressure.
-------------------------
Metric Decrease:
LargeRecord
-------------------------
- - - - -
e9a0fa3f by Andrew Lelechenko at 2023-07-28T18:47:42-04:00
Bump filepath submodule to 1.4.100.4
Resolves #23741
Metric Decrease:
MultiComponentModules
MultiComponentModulesRecomp
MultiLayerModules
MultiLayerModulesRecomp
T10421
T12234
T12425
T13035
T13701
T13719
T16875
T18304
T18698a
T18698b
T21839c
T9198
TcPlugin_RewritePerf
hard_hole_fits
Metric decrease on Windows can be probably attributed to https://github.com/haskell/filepath/pull/183
- - - - -
ee93edfd by Andrew Lelechenko at 2023-07-28T18:48:21-04:00
Add since pragmas to GHC.IO.Handle.FD
- - - - -
d0369802 by Simon Peyton Jones at 2023-07-30T09:24:48+01:00
Make the occurrence analyser smarter about join points
This MR addresses #22404. There is a big Note
Note [Occurrence analysis for join points]
that explains it all. Significant changes
* New field occ_join_points in OccEnv
* The NonRec case of occAnalBind splits into two cases:
one for existing join points (which does the special magic for
Note [Occurrence analysis for join points], and one for other
bindings.
* mkOneOcc adds in info from occ_join_points.
* All "bring into scope" activity is centralised in the
new function `addInScope`.
* I made a local data type LocalOcc for use inside the occurrence analyser
It is like OccInfo, but lacks IAmDead and IAmALoopBreaker, which in turn
makes computationns over it simpler and more efficient.
* I found quite a bit of allocation in GHC.Core.Rules.getRules
so I optimised it a bit.
More minor changes
* I found I was using (Maybe Arity) a lot, so I defined a new data
type JoinPointHood and used it everwhere. This touches a lot of
non-occ-anal files, but it makes everything more perspicuous.
* Renamed data constructor WithUsageDetails to WUD, and
WithTailUsageDetails to WTUD
This also fixes #21128, on the way.
--------- Compiler perf -----------
I spent quite a time on performance tuning, so even though it
does more than before, the occurrence analyser runs slightly faster
on average. Here are the compile-time allocation changes over 0.5%
CoOpt_Read(normal) ghc/alloc 766,025,520 754,561,992 -1.5%
CoOpt_Singletons(normal) ghc/alloc 759,436,840 762,925,512 +0.5%
LargeRecord(normal) ghc/alloc 1,814,482,440 1,799,530,456 -0.8%
PmSeriesT(normal) ghc/alloc 68,159,272 67,519,720 -0.9%
T10858(normal) ghc/alloc 120,805,224 118,746,968 -1.7%
T11374(normal) ghc/alloc 164,901,104 164,070,624 -0.5%
T11545(normal) ghc/alloc 79,851,808 78,964,704 -1.1%
T12150(optasm) ghc/alloc 73,903,664 71,237,544 -3.6% GOOD
T12227(normal) ghc/alloc 333,663,200 331,625,864 -0.6%
T12234(optasm) ghc/alloc 52,583,224 52,340,344 -0.5%
T12425(optasm) ghc/alloc 81,943,216 81,566,720 -0.5%
T13056(optasm) ghc/alloc 294,517,928 289,642,512 -1.7%
T13253-spj(normal) ghc/alloc 118,271,264 59,859,040 -49.4% GOOD
T15164(normal) ghc/alloc 1,102,630,352 1,091,841,296 -1.0%
T15304(normal) ghc/alloc 1,196,084,000 1,166,733,000 -2.5%
T15630(normal) ghc/alloc 148,729,632 147,261,064 -1.0%
T15703(normal) ghc/alloc 379,366,664 377,600,008 -0.5%
T16875(normal) ghc/alloc 32,907,120 32,670,976 -0.7%
T17516(normal) ghc/alloc 1,658,001,888 1,627,863,848 -1.8%
T17836(normal) ghc/alloc 395,329,400 393,080,248 -0.6%
T18140(normal) ghc/alloc 71,968,824 73,243,040 +1.8%
T18223(normal) ghc/alloc 456,852,568 453,059,088 -0.8%
T18282(normal) ghc/alloc 129,105,576 131,397,064 +1.8%
T18304(normal) ghc/alloc 71,311,712 70,722,720 -0.8%
T18698a(normal) ghc/alloc 208,795,112 210,102,904 +0.6%
T18698b(normal) ghc/alloc 230,320,736 232,697,976 +1.0% BAD
T19695(normal) ghc/alloc 1,483,648,128 1,504,702,976 +1.4%
T20049(normal) ghc/alloc 85,612,024 85,114,376 -0.6%
T21839c(normal) ghc/alloc 415,080,992 410,906,216 -1.0% GOOD
T4801(normal) ghc/alloc 247,590,920 250,726,272 +1.3%
T6048(optasm) ghc/alloc 95,699,416 95,080,680 -0.6%
T783(normal) ghc/alloc 335,323,384 332,988,120 -0.7%
T9233(normal) ghc/alloc 709,641,224 685,947,008 -3.3% GOOD
T9630(normal) ghc/alloc 965,635,712 948,356,120 -1.8%
T9675(optasm) ghc/alloc 444,604,152 428,987,216 -3.5% GOOD
T9961(normal) ghc/alloc 303,064,592 308,798,800 +1.9% BAD
WWRec(normal) ghc/alloc 503,728,832 498,102,272 -1.1%
geo. mean -1.0%
minimum -49.4%
maximum +1.9%
In fact these figures seem to vary between platforms; generally worse
on i386 for some reason. The Windows numbers vary by 1% espec in
benchmarks where the total allocation is low. But the geom mean stays
solidly negative, which is good. The "increase/decrease" list below
covers all platforms.
The big win on T13253-spj comes because it has a big nest of join
points, each occurring twice in the next one. The new occ-anal takes
only one iteration of the simplifier to do the inlining; the old one
took four. Moreover, we get much smaller code with the new one:
New: Result size of Tidy Core
= {terms: 429, types: 84, coercions: 0, joins: 14/14}
Old: Result size of Tidy Core
= {terms: 2,437, types: 304, coercions: 0, joins: 10/10}
--------- Runtime perf -----------
No significant changes in nofib results, except a 1% reduction in
compiler allocation.
Metric Decrease:
CoOpt_Read
T13253-spj
T9233
T9630
T9675
T12150
T21839c
LargeRecord
MultiComponentModulesRecomp
T10421
T13701
T10421
T13701
T12425
Metric Increase:
T18140
T9961
T18282
T18698a
T18698b
T19695
- - - - -
42aa7fbd by Julian Ospald at 2023-07-30T17:22:01-04:00
Improve documentation around IOException and ioe_filename
See:
* https://github.com/haskell/core-libraries-committee/issues/189
* https://github.com/haskell/unix/pull/279
* https://github.com/haskell/unix/pull/289
- - - - -
33598ecb by Sylvain Henry at 2023-08-01T14:45:54-04:00
JS: implement getMonotonicTime (fix #23687)
- - - - -
d2bedffd by Bartłomiej Cieślar at 2023-08-01T14:46:40-04:00
Implementation of the Deprecated Instances proposal #575
This commit implements the ability to deprecate certain instances,
which causes the compiler to emit the desired deprecation message
whenever they are instantiated. For example:
module A where
class C t where
instance {-# DEPRECATED "dont use" #-} C Int where
module B where
import A
f :: C t => t
f = undefined
g :: Int
g = f -- "dont use" emitted here
The implementation is as follows:
- In the parser, we parse deprecations/warnings attached to instances:
instance {-# DEPRECATED "msg" #-} Show X
deriving instance {-# WARNING "msg2" #-} Eq Y
(Note that non-standalone deriving instance declarations do not support
this mechanism.)
- We store the resulting warning message in `ClsInstDecl` (respectively, `DerivDecl`).
In `GHC.Tc.TyCl.Instance.tcClsInstDecl` (respectively, `GHC.Tc.Deriv.Utils.newDerivClsInst`),
we pass on that information to `ClsInst` (and eventually store it in `IfaceClsInst` too).
- Finally, when we solve a constraint using such an instance, in
`GHC.Tc.Instance.Class.matchInstEnv`, we emit the appropriate warning
that was stored in `ClsInst`.
Note that we only emit a warning when the instance is used in a different module
than it is defined, which keeps the behaviour in line with the deprecation of
top-level identifiers.
Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com>
- - - - -
d5a65af6 by Ben Gamari at 2023-08-01T14:47:18-04:00
compiler: Style fixes
- - - - -
7218c80a by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Fix implicit cast
This ensures that Task.h can be built with a C++ compiler.
- - - - -
d6d5aafc by Ben Gamari at 2023-08-01T14:47:19-04:00
testsuite: Fix warning in hs_try_putmvar001
- - - - -
d9eddf7a by Ben Gamari at 2023-08-01T14:47:19-04:00
testsuite: Add AtomicModifyIORef test
- - - - -
f9eea4ba by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Introduce NO_WARN macro
This allows fine-grained ignoring of warnings.
- - - - -
497b24ec by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Simplify atomicModifyMutVar2# implementation
Previously we would perform a redundant load in the non-threaded RTS in
atomicModifyMutVar2# implementation for the benefit of the non-moving
GC's write barrier. Eliminate this.
- - - - -
52ee082b by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Introduce more principled fence operations
- - - - -
cd3c0377 by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Introduce SET_INFO_RELAXED
- - - - -
6df2352a by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Style fixes
- - - - -
4ef6f319 by Ben Gamari at 2023-08-01T14:47:19-04:00
codeGen/tsan: Rework handling of spilling
- - - - -
f9ca7e27 by Ben Gamari at 2023-08-01T14:47:19-04:00
hadrian: More debug information
- - - - -
df4153ac by Ben Gamari at 2023-08-01T14:47:19-04:00
Improve TSAN documentation
- - - - -
fecae988 by Ben Gamari at 2023-08-01T14:47:19-04:00
hadrian: More selective TSAN instrumentation
- - - - -
465a9a0b by Alan Zimmerman at 2023-08-01T14:47:56-04:00
EPA: Provide correct annotation span for ImportDecl
Use the whole declaration, rather than just the span of the 'import'
keyword.
Metric Decrease:
T9961
T5205
Metric Increase:
T13035
- - - - -
ae63d0fa by Bartłomiej Cieślar at 2023-08-01T14:48:40-04:00
Add cases to T23279: HasField for deprecated record fields
This commit adds additional tests from ticket #23279 to ensure that we don't
regress on reporting deprecated record fields in conjunction with HasField,
either when using overloaded record dot syntax or directly through `getField`.
Fixes #23279
- - - - -
00fb6e6b by Andreas Klebinger at 2023-08-01T14:49:17-04:00
AArch NCG: Pure refactor
Combine some alternatives. Add some line breaks for overly long lines
- - - - -
8f3b3b78 by Andreas Klebinger at 2023-08-01T14:49:54-04:00
Aarch ncg: Optimize immediate use for address calculations
When the offset doesn't fit into the immediate we now just reuse the
general getRegister' code path which is well optimized to compute the
offset into a register instead of a special case for CmmRegOff.
This means we generate a lot less code under certain conditions which is
why performance metrics for these improve.
-------------------------
Metric Decrease:
T4801
T5321FD
T5321Fun
-------------------------
- - - - -
74a882dc by MorrowM at 2023-08-02T06:00:03-04:00
Add a RULE to make lookup fuse
See https://github.com/haskell/core-libraries-committee/issues/175
Metric Increase:
T18282
- - - - -
cca74dab by Ben Gamari at 2023-08-02T06:00:39-04:00
hadrian: Ensure that way-flags are passed to CC
Previously the way-specific compilation flags (e.g. `-DDEBUG`,
`-DTHREADED_RTS`) would not be passed to the CC invocations. This meant
that C dependency files would not correctly reflect
dependencies predicated on the way, resulting in the rather
painful #23554.
Closes #23554.
- - - - -
622b483c by Jaro Reinders at 2023-08-02T06:01:20-04:00
Native 32-bit Enum Int64/Word64 instances
This commits adds more performant Enum Int64 and Enum Word64 instances
for 32-bit platforms, replacing the Integer-based implementation.
These instances are a copy of the Enum Int and Enum Word instances with
minimal changes to manipulate Int64 and Word64 instead.
On i386 this yields a 1.5x performance increase and for the JavaScript
back end it even yields a 5.6x speedup.
Metric Decrease:
T18964
- - - - -
c8bd7fa4 by Sylvain Henry at 2023-08-02T06:02:03-04:00
JS: fix typos in constants (#23650)
- - - - -
b9d5bfe9 by Josh Meredith at 2023-08-02T06:02:40-04:00
JavaScript: update MK_TUP macros to use current tuple constructors (#23659)
- - - - -
28211215 by Matthew Pickering at 2023-08-02T06:03:19-04:00
ci: Pass -Werror when building hadrian in hadrian-ghc-in-ghci job
Warnings when building Hadrian can end up cluttering the output of HLS,
and we've had bug reports in the past about these warnings when building
Hadrian. It would be nice to turn on -Werror on at least one build of
Hadrian in CI to avoid a patch introducing warnings when building
Hadrian.
Fixes #23638
- - - - -
aca20a5d by Ben Gamari at 2023-08-02T06:03:55-04:00
codeGen: Ensure that TSAN is aware of writeArray# write barriers
By using a proper release store instead of a fence.
- - - - -
453c0531 by Ben Gamari at 2023-08-02T06:03:55-04:00
codeGen: Ensure that array reads have necessary barriers
This was the cause of #23541.
- - - - -
93a0d089 by Arnaud Spiwack at 2023-08-02T06:04:37-04:00
Add test for #23550
- - - - -
6a2f4a20 by Arnaud Spiwack at 2023-08-02T06:04:37-04:00
Desugar non-recursive lets to non-recursive lets (take 2)
This reverts commit 522bd584f71ddeda21efdf0917606ce3d81ec6cc. And
takes care of the case that I missed in my previous attempt. Namely
the case of an AbsBinds with no type variables and no dictionary
variable.
Ironically, the comment explaining why non-recursive lets were
desugared to recursive lets were pointing specifically at this case
as the reason. I just failed to understand that it was until Simon PJ
pointed it out to me.
See #23550 for more discussion.
- - - - -
ff81d53f by jade at 2023-08-02T06:05:20-04:00
Expand documentation of List & Data.List
This commit aims to improve the documentation and examples
of symbols exported from Data.List
- - - - -
fa4e5913 by Jade at 2023-08-02T06:06:03-04:00
Improve documentation of Semigroup & Monoid
This commit aims to improve the documentation of various symbols
exported from Data.Semigroup and Data.Monoid
- - - - -
e2c91bff by Gergő Érdi at 2023-08-03T02:55:46+01:00
Desugar bindings in the context of their evidence
Closes #23172
- - - - -
481f4a46 by Gergő Érdi at 2023-08-03T07:48:43+01:00
Add flag to `-f{no-}specialise-incoherents` to enable/disable specialisation of
incoherent instances
Fixes #23287
- - - - -
d751c583 by Profpatsch at 2023-08-04T12:24:26-04:00
base: Improve String & IsString documentation
- - - - -
01db1117 by Ben Gamari at 2023-08-04T12:25:02-04:00
rts/win32: Ensure reliability of IO manager shutdown
When the Win32 threaded IO manager shuts down, `ioManagerDie` sends an
`IO_MANAGER_DIE` event to the IO manager thread using the
`io_manager_event` event object. Finally, it will closes the event object,
and invalidate `io_manager_event`.
Previously, `readIOManagerEvent` would see that `io_manager_event` is
invalid and return `0`, suggesting that everything is right with the
world. This meant that if `ioManagerDie` invalidated the handle before
the event manager was blocked on the event we would end up in a
situation where the event manager would never realize it was asked to
shut down.
Fix this by ensuring that `readIOManagerEvent` instead returns
`IO_MANAGER_DIE` when we detect that the event object has been
invalidated by `ioManagerDie`.
Fixes #23691.
- - - - -
fdef003a by Ryan Scott at 2023-08-04T12:25:39-04:00
Look through TH splices in splitHsApps
This modifies `splitHsApps` (a key function used in typechecking function
applications) to look through untyped TH splices and quasiquotes. Not doing so
was the cause of #21077. This builds on !7821 by making `splitHsApps` match on
`HsUntypedSpliceTop`, which contains the `ThModFinalizers` that must be run as
part of invoking the TH splice. See the new `Note [Looking through Template
Haskell splices in splitHsApps]` in `GHC.Tc.Gen.Head`.
Along the way, I needed to make the type of `splitHsApps.set` slightly more
general to accommodate the fact that the location attached to a quasiquote is
a `SrcAnn NoEpAnns` rather than a `SrcSpanAnnA`.
Fixes #21077.
- - - - -
e77a0b41 by Ben Gamari at 2023-08-04T12:26:15-04:00
Bump deepseq submodule to 1.5.
And bump bounds
(cherry picked from commit 1228d3a4a08d30eaf0138a52d1be25b38339ef0b)
- - - - -
cebb5819 by Ben Gamari at 2023-08-04T12:26:15-04:00
configure: Bump minimal boot GHC version to 9.4
(cherry picked from commit d3ffdaf9137705894d15ccc3feff569d64163e8e)
- - - - -
83766dbf by Ben Gamari at 2023-08-04T12:26:15-04:00
template-haskell: Bump version to 2.21.0.0
Bumps exceptions submodule.
(cherry picked from commit bf57fc9aea1196f97f5adb72c8b56434ca4b87cb)
- - - - -
1211112a by Ben Gamari at 2023-08-04T12:26:15-04:00
base: Bump version to 4.19
Updates all boot library submodules.
(cherry picked from commit 433d99a3c24a55b14ec09099395e9b9641430143)
- - - - -
3ab5efd9 by Ben Gamari at 2023-08-04T12:26:15-04:00
testsuite: Normalise versions more aggressively
In backpack hashes can contain `+` characters.
(cherry picked from commit 024861af51aee807d800e01e122897166a65ea93)
- - - - -
d52be957 by Ben Gamari at 2023-08-04T12:26:15-04:00
testsuite: Declare bkpcabal08 as fragile
Due to spurious output changes described in #23648.
(cherry picked from commit c046a2382420f2be2c4a657c56f8d95f914ea47b)
- - - - -
e75a58d1 by Ben Gamari at 2023-08-04T12:26:15-04:00
gitlab-ci: Only mark linker_unload_native as broken in static jobs
This test passes on dynamically-linked Alpine.
(cherry picked from commit f356a7e8ec8ec3d6b2b30fd175598b9b80065d87)
- - - - -
8b176514 by Ben Gamari at 2023-08-04T12:26:15-04:00
testsuite: Update base-exports
- - - - -
4b647936 by Ben Gamari at 2023-08-04T12:26:15-04:00
testsuite/interface-stability: normalise versions
This eliminates spurious changes from version bumps.
- - - - -
0eb54c05 by Ben Gamari at 2023-08-04T12:26:51-04:00
linker/PEi386: Don't sign-extend symbol section number
Previously we incorrectly interpreted PE section numbers as signed
values. However, this isn't the case; rather, it's an unsigned 16-bit number
with a few special bit-patterns (0xffff and 0xfffe). This resulted in #22941
as the linker would conclude that the sections were invalid.
Fixing this required quite a bit of refactoring.
Closes #22941.
- - - - -
fd7ce39c by Ben Gamari at 2023-08-04T12:27:28-04:00
testsuite: Mark MulMayOflo_full as broken rather than skipping
To ensure that we don't accidentally fix it.
See #23742.
- - - - -
824092f2 by Ben Gamari at 2023-08-04T12:27:28-04:00
nativeGen/AArch64: Fix sign extension in MulMayOflo
Previously the 32-bit implementations of MulMayOflo would use the
a non-sensical sign-extension mode. Rewrite these to reflect what gcc 11
produces. Also similarly rework the 16- and 8-bit cases.
This now passes the MulMayOflo tests in ghc/test-primops> in all four
widths, including the precision tests.
Fixes #23721.
- - - - -
1b15dbc4 by Jan Hrček at 2023-08-04T12:28:08-04:00
Fix haddock markup in code example for coerce
- - - - -
46fd8ced by Vladislav Zavialov at 2023-08-04T12:28:44-04:00
Fix (~) and (@) infix operators in TH splices (#23748)
8168b42a "Whitespace-sensitive bang patterns" allows GHC to accept
the following infix operators:
a ~ b = ()
a @ b = ()
But not if TH is used to generate those declarations:
$([d| a ~ b = ()
a @ b = ()
|])
-- Test.hs:5:2: error: [GHC-55017]
-- Illegal variable name: ‘~’
-- When splicing a TH declaration: (~_0) a_1 b_2 = GHC.Tuple.Prim.()
This is easily fixed by modifying `reservedOps` in GHC.Utils.Lexeme
- - - - -
a1899d8f by Aaron Allen at 2023-08-04T12:29:24-04:00
[#23663] Show Flag Suggestions in GHCi
Makes suggestions when using `:set` in GHCi with a misspelled flag. This
mirrors how invalid flags are handled when passed to GHC directly. Logic
for producing flag suggestions was moved to GHC.Driver.Sesssion so it
can be shared.
resolves #23663
- - - - -
03f2debd by Rodrigo Mesquita at 2023-08-04T12:30:00-04:00
Improve ghc-toolchain validation configure warning
Fixes the layout of the ghc-toolchain validation warning produced by
configure.
- - - - -
de25487d by Alan Zimmerman at 2023-08-04T12:30:36-04:00
EPA make getLocA a synonym for getHasLoc
This is basically a no-op change, but allows us to make future changes
that can rely on the HasLoc instances
And I presume this means we can use more precise functions based on
class resolution, so the Windows CI build reports
Metric Decrease:
T12234
T13035
- - - - -
3ac423b9 by Ben Gamari at 2023-08-04T12:31:13-04:00
ghc-platform: Add upper bound on base
Hackage upload requires this.
- - - - -
8ba20b21 by Matthew Craven at 2023-08-04T17:22:59-04:00
Adjust and clarify handling of primop effects
Fixes #17900; fixes #20195.
The existing "can_fail" and "has_side_effects" primop attributes
that previously governed this were used in inconsistent and
confusingly-documented ways, especially with regard to raising
exceptions. This patch replaces them with a single "effect"
attribute, which has four possible values: NoEffect, CanFail,
ThrowsException, and ReadWriteEffect. These are described in
Note [Classifying primop effects].
A substantial amount of related documentation has been re-drafted
for clarity and accuracy.
In the process of making this attribute format change for literally
every primop, several existing mis-classifications were detected and
corrected. One of these mis-classifications was tagToEnum#, which
is now considered CanFail; this particular fix is known to cause a
regression in performance for derived Enum instances. (See #23782.)
Fixing this is left as future work.
New primop attributes "cheap" and "work_free" were also added,
and used in the corresponding parts of GHC.Core.Utils.
In view of their actual meaning and uses, `primOpOkForSideEffects`
and `exprOkForSideEffects` have been renamed to `primOpOkToDiscard`
and `exprOkToDiscard`, respectively.
Metric Increase:
T21839c
- - - - -
41bf2c09 by sheaf at 2023-08-04T17:23:42-04:00
Update inert_solved_dicts for ImplicitParams
When adding an implicit parameter dictionary to the inert set, we must
make sure that it replaces any previous implicit parameter dictionaries
that overlap, in order to get the appropriate shadowing behaviour, as in
let ?x = 1 in let ?x = 2 in ?x
We were already doing this for inert_cans, but we weren't doing the same
thing for inert_solved_dicts, which lead to the bug reported in #23761.
The fix is thus to make sure that, when handling an implicit parameter
dictionary in updInertDicts, we update **both** inert_cans and
inert_solved_dicts to ensure a new implicit parameter dictionary
correctly shadows old ones.
Fixes #23761
- - - - -
43578d60 by Matthew Craven at 2023-08-05T01:05:36-04:00
Bump bytestring submodule to 0.11.5.1
- - - - -
91353622 by Ben Gamari at 2023-08-05T01:06:13-04:00
Initial commit of Note [Thunks, blackholes, and indirections]
This Note attempts to summarize the treatment of thunks, thunk update,
and indirections.
This fell out of work on #23185.
- - - - -
8d686854 by sheaf at 2023-08-05T01:06:54-04:00
Remove zonk in tcVTA
This removes the zonk in GHC.Tc.Gen.App.tc_inst_forall_arg and its
accompanying Note [Visible type application zonk]. Indeed, this zonk
is no longer necessary, as we no longer maintain the invariant that
types are well-kinded without zonking; only that typeKind does not
crash; see Note [The Purely Kinded Type Invariant (PKTI)].
This commit removes this zonking step (as well as a secondary zonk),
and replaces the aforementioned Note with the explanatory
Note [Type application substitution], which justifies why the
substitution performed in tc_inst_forall_arg remains valid without
this zonking step.
Fixes #23661
- - - - -
19dea673 by Ben Gamari at 2023-08-05T01:07:30-04:00
Bump nofib submodule
Ensuring that nofib can be build using the same range of bootstrap
compilers as GHC itself.
- - - - -
aa07402e by Luite Stegeman at 2023-08-05T23:15:55+09:00
JS: Improve compatibility with recent emsdk
The JavaScript code in libraries/base/jsbits/base.js had some
hardcoded offsets for fields in structs, because we expected
the layout of the data structures to remain unchanged. Emsdk
3.1.42 changed the layout of the stat struct, breaking this
assumption, and causing code in .hsc files accessing the
stat struct to fail.
This patch improves compatibility with recent emsdk by
removing the assumption that data layouts stay unchanged:
1. offsets of fields in structs used by JavaScript code are
now computed by the configure script, so both the .js and
.hsc files will automatically use the new layout if anything
changes.
2. the distrib/configure script checks that the emsdk version
on a user's system is the same version that a bindist was
booted with, to avoid data layout inconsistencies
See #23641
- - - - -
b938950d by Luite Stegeman at 2023-08-07T06:27:51-04:00
JS: Fix missing local variable declarations
This fixes some missing local variable declarations that were
found by running the testsuite in strict mode.
Fixes #23775
- - - - -
6c0e2247 by sheaf at 2023-08-07T13:31:21-04:00
Update Haddock submodule to fix #23368
This submodule update adds the following three commits:
bbf1c8ae - Check for puns
0550694e - Remove fake exports for (~), List, and Tuple<n>
5877bceb - Fix pretty-printing of Solo and MkSolo
These commits fix the issues with Haddock HTML rendering reported in
ticket #23368.
Fixes #23368
- - - - -
5b5be3ea by Matthew Pickering at 2023-08-07T13:32:00-04:00
Revert "Bump bytestring submodule to 0.11.5.1"
This reverts commit 43578d60bfc478e7277dcd892463cec305400025.
Fixes #23789
- - - - -
01961be3 by Ben Gamari at 2023-08-08T02:47:14-04:00
configure: Derive library version from ghc-prim.cabal.in
Since ghc-prim.cabal is now generated by Hadrian, we cannot depend upon
it.
Closes #23726.
- - - - -
3b373838 by Ryan Scott at 2023-08-08T02:47:49-04:00
tcExpr: Push expected types for untyped TH splices inwards
In !10911, I deleted a `tcExpr` case for `HsUntypedSplice` in favor of a much
simpler case that simply delegates to `tcApp`. Although this passed the test
suite at the time, this was actually an error, as the previous `tcExpr` case
was critically pushing the expected type inwards. This actually matters for
programs like the one in #23796, which GHC would not accept with type inference
alone—we need full-blown type _checking_ to accept these.
I have added back the previous `tcExpr` case for `HsUntypedSplice` and now
explain why we have two different `HsUntypedSplice` cases (one in `tcExpr` and
another in `splitHsApps`) in `Note [Looking through Template Haskell splices in
splitHsApps]` in `GHC.Tc.Gen.Head`.
Fixes #23796.
- - - - -
0ef1d8ae by sheaf at 2023-08-08T21:26:51-04:00
Compute all emitted diagnostic codes
This commit introduces in GHC.Types.Error.Codes the function
constructorCodes :: forall diag. (...) => Map DiagnosticCode String
which computes a collection of all the diagnostic codes that correspond
to a particular type. In particular, we can compute the collection of
all diagnostic codes emitted by GHC using the invocation
constructorCodes @GhcMessage
We then make use of this functionality in the new "codes" test which
checks consistency and coverage of GHC diagnostic codes.
It performs three checks:
- check 1: all non-outdated GhcDiagnosticCode equations
are statically used.
- check 2: all outdated GhcDiagnosticCode equations
are statically unused.
- check 3: all statically used diagnostic codes are covered by
the testsuite (modulo accepted exceptions).
- - - - -
4bc7b1e5 by Fraser Tweedale at 2023-08-08T21:27:32-04:00
numberToRangedRational: fix edge cases for exp ≈ (maxBound :: Int)
Currently a negative exponent less than `minBound :: Int` results in
Infinity, which is very surprising and obviously wrong.
```
λ> read "1e-9223372036854775808" :: Double
0.0
λ> read "1e-9223372036854775809" :: Double
Infinity
```
There is a further edge case where the exponent can overflow when
increased by the number of tens places in the integer part, or
underflow when decreased by the number of leading zeros in the
fractional part if the integer part is zero:
```
λ> read "10e9223372036854775807" :: Double
0.0
λ> read "0.01e-9223372036854775808" :: Double
Infinity
```
To resolve both of these issues, perform all arithmetic and
comparisons involving the exponent in type `Integer`. This approach
also eliminates the need to explicitly check the exponent against
`maxBound :: Int` and `minBound :: Int`, because the allowed range
of the exponent (i.e. the result of `floatRange` for the target
floating point type) is certainly within those bounds.
This change implements CLC proposal 192:
https://github.com/haskell/core-libraries-committee/issues/192
- - - - -
6eab07b2 by Alan Zimmerman at 2023-08-08T21:28:10-04:00
EPA: Remove Location from WarningTxt source
This is not needed.
- - - - -
1a98d673 by Sebastian Graf at 2023-08-09T16:24:29-04:00
Cleanup a TODO introduced in 1f94e0f7
The change must have slipped through review of !4412
- - - - -
2274abc8 by Sebastian Graf at 2023-08-09T16:24:29-04:00
More explicit strictness in GHC.Real
- - - - -
ce8aa54c by Sebastian Graf at 2023-08-09T16:24:30-04:00
exprIsTrivial: Factor out shared implementation
The duplication between `exprIsTrivial` and `getIdFromTrivialExpr_maybe` has
been bugging me for a long time.
This patch introduces an inlinable worker function `trivial_expr_fold` acting
as the single, shared decision procedure of triviality. It "returns" a
Church-encoded `Maybe (Maybe Id)`, so when it is inlined, it fuses to similar
code as before.
(Better code, even, in the case of `getIdFromTrivialExpr` which presently
allocates a `Just` constructor that cancels away after this patch.)
- - - - -
d004a36d by Sebastian Graf at 2023-08-09T16:24:30-04:00
Simplify: Simplification of arguments in a single function
The Simplifier had a function `simplArg` that wasn't called in `rebuildCall`,
which seems to be the main way to simplify args. Hence I consolidated the code
path to call `simplArg`, too, renaming to `simplLazyArg`.
- - - - -
8c73505e by Sebastian Graf at 2023-08-09T16:24:30-04:00
Core.Ppr: Omit case binder for empty case alternatives
A minor improvement to pretty-printing
- - - - -
d8d993f1 by Sebastian Graf at 2023-08-09T16:24:30-04:00
Disable tests RepPolyWrappedVar2 and RepPolyUnsafeCoerce1 in JS backend
... because those coerce between incompatible/unknown PrimReps.
- - - - -
f06e87e4 by Sebastian Graf at 2023-08-09T16:24:30-04:00
Inlining literals into boring contexts is OK
- - - - -
4a6b7c87 by Sebastian Graf at 2023-08-09T16:24:30-04:00
Clarify floating of unsafeEqualityProofs (#23754)
- - - - -
b0f4752e by Sebastian Graf at 2023-08-09T16:24:30-04:00
Kill SetLevel.notWorthFloating.is_triv (#23270)
We have had it since b84ba676034, when it operated on annotated expressions.
Nowadays it operates on vanilla `CoreExpr` though, so we should just call
`exprIsTrivial`; thus handling empty cases and string literals correctly.
- - - - -
7e0c8b3b by Sebastian Graf at 2023-08-09T16:24:30-04:00
ANFise string literal arguments (#23270)
This instates the invariant that a trivial CoreExpr translates to an atomic
StgExpr. Nice.
Annoyingly, in -O0 we sometimes generate
```
foo = case "blah"# of sat { __DEFAULT -> unpackCString# sat }
```
which makes it a bit harder to spot that we can emit a standard
`stg_unpack_cstring` thunk.
Fixes #23270.
- - - - -
357f2738 by Sebastian Graf at 2023-08-09T16:24:30-04:00
Deactivate -fcatch-nonexhaustive-cases in ghc-bignum (#23345)
- - - - -
59202c80 by Sebastian Graf at 2023-08-09T16:24:30-04:00
CorePrep: Eliminate EmptyCase and unsafeEqualityProof in CoreToStg instead
We eliminate EmptyCase by way of `coreToStg (Case e _ _ []) = coreToStg e` now.
The main reason is that it plays far better in conjunction with eta expansion
(as we aim to do for arguments in CorePrep, #23083), because we can discard
any arguments, `(case e of {}) eta == case e of {}`, whereas in `(e |> co) eta`
it's impossible to discard the argument.
We do also give the same treatment to unsafeCoerce proofs and treat them as
trivial iff their RHS is trivial.
It is also both much simpler to describe than the previous mechanism of emitting
an unsafe coercion and simpler to implement, removing quite a bit of commentary
and `CorePrepProv`.
In the ghc/alloc perf test `LargeRecord`, we introduce an additional Simplifier
iteration due to #17910. E.g., FloatOut produces a binding
```
lvl_s6uK [Occ=Once1] :: GHC.Types.Int
[LclId]
lvl_s6uK = GHC.Types.I# 2#
lvl_s6uL [Occ=Once1] :: GHC.Types.Any
[LclId]
lvl_s6uL
= case Unsafe.Coerce.unsafeEqualityProof ... of
{ Unsafe.Coerce.UnsafeRefl v2_i6tr -> lvl_s6uK `cast` (... v2_i6tr ...)
}
```
That occurs once and hence is pre-inlined unconditionally in the next Simplifier
pass. It's non-trivial to find a way around that, but not really harmful
otherwise. Hence we accept a 1.2% increase on some architectures.
Metric Increase:
LargeRecord
- - - - -
00d31188 by Sebastian Graf at 2023-08-09T16:24:30-04:00
CorePrep: Eta expand arguments (#23083)
Previously, we'd only eta expand let bindings and lambdas,
now we'll also eta expand arguments such as in T23083:
```hs
g f h = f (h `seq` (h $))
```
Unless `-fpedantic-bottoms` is set, we'll now transform to
```hs
g f h = f (\eta -> h eta)
```
in CorePrep.
See the new `Note [Eta expansion of arguments in CorePrep]` for the details.
We only do this optimisation with -O2 because we saw 2-3% ghc/alloc regressions
in T4801 and T5321FD.
Fixes #23083.
- - - - -
bf885d7a by Matthew Craven at 2023-08-09T16:25:07-04:00
Bump bytestring submodule to 0.11.5, again
Fixes #23789.
The bytestring commit used here is unreleased;
a release can be made when necessary.
- - - - -
7acbf0fd by Sven Tennie at 2023-08-10T19:17:11-04:00
Serialize CmmRetInfo in .rodata
The handling of case was missing.
- - - - -
0c3136f2 by Sven Tennie at 2023-08-10T19:17:11-04:00
Reference StgRetFun payload by its struct field address
This is easier to grasp than relative pointer offsets.
- - - - -
f68ff313 by Sven Tennie at 2023-08-10T19:17:11-04:00
Better variable name: u -> frame
The 'u' was likely introduced by copy'n'paste.
- - - - -
0131bb7f by Sven Tennie at 2023-08-10T19:17:11-04:00
Make checkSTACK() public
Such that it can also be used in tests.
- - - - -
7b6e1e53 by Sven Tennie at 2023-08-10T19:17:11-04:00
Publish stack related fields in DerivedConstants.h
These will be used in ghc-heap to decode these parts of the stack.
- - - - -
907ed054 by Sven Tennie at 2023-08-10T19:17:11-04:00
ghc-heap: Decode StgStack and its stack frames
Previously, ghc-heap could only decode heap closures.
The approach is explained in detail in note
[Decoding the stack].
- - - - -
6beb6ac2 by Sven Tennie at 2023-08-10T19:17:11-04:00
Remove RetFunType from RetFun stack frame representation
It's a technical detail. The single usage is replaced by a predicate.
- - - - -
006bb4f3 by Sven Tennie at 2023-08-10T19:17:11-04:00
Better parameter name
The call-site uses the term "offset", too.
- - - - -
d4c2c1af by Sven Tennie at 2023-08-10T19:17:11-04:00
Make closure boxing pure
There seems to be no need to do something complicated. However, the
strictness of the closure pointer matters, otherwise a thunk gets
decoded.
- - - - -
8d8426c9 by Sven Tennie at 2023-08-10T19:17:11-04:00
Document entertainGC in test
It wasn't obvious why it's there and what its role is.
Also, increase the "entertainment level" a bit.
I checked in STG and Cmm dumps that this really generates closures (and
is not e.g. constant folded away.)
- - - - -
cc52c358 by Finley McIlwaine at 2023-08-10T19:17:47-04:00
Add -dipe-stats flag
This is useful for seeing which info tables have information.
- - - - -
261c4acb by Finley McIlwaine at 2023-08-10T19:17:47-04:00
Add -finfo-table-map-with-fallback -finfo-table-map-with-stack
The -fno-info-table-map-with-stack flag omits STACK info tables from the info
table map, and the -fno-info-table-map-with-fallback flag omits info tables
with defaulted source locations from the map. In a test on the Agda codebase
the build results were about 7% smaller when both of those types of tables
were omitted.
Adds a test that verifies that passing each combination of these flags
results in the correct output for -dipe-stats, which is disabled for the js
backend since profiling is not implemented.
This commit also refactors a lot of the logic around extracting info tables
from the Cmm results and building the info table map.
This commit also fixes some issues in the users guide rst source to fix
warnings that were noticed while debugging the documentation for these flags.
Fixes #23702
- - - - -
d7047e0d by Jaro Reinders at 2023-08-14T04:41:42-04:00
Add changelog entry for specialised Enum Int64/Word64 instances
- - - - -
52f5e8fb by cydparser at 2023-08-14T04:42:20-04:00
Fix -ddump-to-file and -ddump-timings interaction (#20316)
- - - - -
1274c5d6 by cydparser at 2023-08-14T04:42:20-04:00
Update release notes (#20316)
- - - - -
8e699b23 by Matthew Pickering at 2023-08-14T10:44:47-04:00
base: Add changelog entry for CLC #188
This proposal modified the implementations of copyBytes, moveBytes and
fillBytes (as detailed in the proposal)
https://github.com/haskell/core-libraries-committee/issues/188
- - - - -
026f040a by Matthew Pickering at 2023-08-14T10:45:23-04:00
packaging: Build manpage in separate directory to other documentation
We were installing two copies of the manpage:
* One useless one in the `share/doc` folder, because we copy the doc/
folder into share/
* The one we deliberately installed into `share/man` etc
The solution is to build the manpage into the `manpage` directory when
building the bindist, and then just install it separately.
Fixes #23707
- - - - -
524c60c8 by Bartłomiej Cieślar at 2023-08-14T13:46:33-04:00
Report deprecated fields bound by record wildcards when used
This commit ensures that we emit the appropriate warnings when
a deprecated record field bound by a record wildcard is used.
For example:
module A where
data Foo = Foo {x :: Int, y :: Bool, z :: Char}
{-# DEPRECATED x "Don't use x" #-}
{-# WARNING y "Don't use y" #-}
module B where
import A
foo (Foo {..}) = x
This will cause us to emit a "Don't use x" warning, with location the
location of the record wildcard. Note that we don't warn about `y`,
because it is unused in the RHS of `foo`.
Fixes #23382
- - - - -
d6130065 by Matthew Pickering at 2023-08-14T13:47:11-04:00
Add zstd suffix to jobs which rely on zstd
This was causing some confusion as the job was named simply
"x86_64-linux-deb10-validate", which implies a standard configuration
rather than any dependency on libzstd.
- - - - -
e24e44fc by Matthew Pickering at 2023-08-14T13:47:11-04:00
ci: Always run project-version job
This is needed for the downstream test-primops pipeline to workout what
the version of a bindist produced by a pipeline is.
- - - - -
f17b9d62 by Matthew Pickering at 2023-08-14T13:47:11-04:00
gen_ci: Rework how jobs-metadata.json is generated
* We now represent a job group a triple of Maybes, which makes it easier
to work out when jobs are enabled/disabled on certain pipelines.
```
data JobGroup a = StandardTriple { v :: Maybe (NamedJob a)
, n :: Maybe (NamedJob a)
, r :: Maybe (NamedJob a) }
```
* `jobs-metadata.json` generation is reworked using the following
algorithm.
- For each pipeline type, find all the platforms we are doing builds
for.
- Select one build per platform
- Zip together the results
This way we can choose different pipelines for validate/nightly/release
which makes the metadata also useful for validate pipelines. This
feature is used by the test-primops downstream CI in order to select the
right bindist for testing validate pipelines.
This makes it easier to inspect which jobs are going to be enabled on a
particular pipeline.
- - - - -
f9a5563d by Matthew Pickering at 2023-08-14T13:47:11-04:00
gen_ci: Rules rework
In particular we now distinguish between whether we are dealing with a
Nightly/Release pipeline (which labels don't matter for) and a validate
pipeline where labels do matter.
The overall goal here is to allow a disjunction of labels for validate
pipelines, for example,
> Run a job if we have the full-ci label or test-primops label
Therefore the "ValidateOnly" rules are treated as a set of disjunctions
rather than conjunctions like before.
What this means in particular is that if we want to ONLY run a job if a
label is set, for example, "FreeBSD" label then we have to override the
whole label set.
Fixes #23772
- - - - -
d54b0c1d by Matthew Pickering at 2023-08-14T13:47:11-04:00
ci: set -e for lint-ci-config scripts
- - - - -
994a9b35 by Matthew Pickering at 2023-08-14T13:47:11-04:00
ci: Fix job metadata generation
- - - - -
e194ed2b by Ben Gamari at 2023-08-15T00:58:09-04:00
users-guide: Note that GHC2021 doesn't include ExplicitNamespaces
As noted in #23801.
- - - - -
d814bda9 by Ben Gamari at 2023-08-15T05:43:53-04:00
users-guide: Support both distutils and packaging
As noted in #23818, some old distributions (e.g. Debian 9) only include
`distutils` while newer distributions only include `packaging`.
Fixes #23818.
- - - - -
1726db3f by Ben Gamari at 2023-08-15T05:43:53-04:00
users-guide: Ensure extlinks is compatible with Sphinx <4
The semantics of the `extlinks` attribute annoyingly changed in Sphinx
4. Reflect this in our configuration. See #22690.
Fixes #23807.
- - - - -
173338cf by Matthew Pickering at 2023-08-15T22:00:24-04:00
ci: Run full-ci on master and release branches
Fixes #23737
- - - - -
bdab6898 by Andrew Lelechenko at 2023-08-15T22:01:03-04:00
Add @since pragmas for Data.Ord.clamp and GHC.Float.clamp
- - - - -
662d351b by Matthew Pickering at 2023-08-16T09:35:04-04:00
ghc-toolchain: Match CPP args with configure script
At the moment we need ghc-toolchain to precisely match the output as
provided by the normal configure script. The normal configure script
(FP_HSCPP_CMD_WITH_ARGS) branches on whether we are using clang or gcc
so we match that logic exactly in ghc-toolchain.
The old implementation (which checks if certain flags are supported) is
better but for now we have to match to catch any potential errors in the
configuration.
Ticket: #23720
- - - - -
09c6759e by Matthew Pickering at 2023-08-16T09:35:04-04:00
configure: Fix `-Wl,--no-as-needed` check
The check was failing because the args supplied by $$1 were quoted which
failed because then the C compiler thought they were an input file.
Fixes #23720
- - - - -
2129678b by Matthew Pickering at 2023-08-16T09:35:04-04:00
configure: Add flag which turns ghc-toolchain check into error
We want to catch these errors in CI, but first we need to a flag which
turns this check into an error.
- - - - -
6e2aa8e0 by Matthew Pickering at 2023-08-16T09:35:04-04:00
ci: Enable --enable-strict-ghc-toolchain-check for all CI jobs
This will cause any CI job to fail if we have a mismatch between what
ghc-toolchain reports and what ./configure natively reports. Fixing
these kinds of issues is highest priority for 9.10 release.
- - - - -
12d39e24 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00
Pass user-specified options to ghc-toolchain
The current user interface to configuring target toolchains is `./configure`.
In !9263 we added a new tool to configure target toolchains called
`ghc-toolchain`, but the blessed way of creating these toolchains is
still through configure.
However, we were not passing the user-specified options given with the
`./configure` invocation to the ghc-toolchain tool.
This commit remedies that by storing the user options and environment
variables in USER_* variables, which then get passed to GHC-toolchain.
The exception to the rule is the windows bundled toolchain, which
overrides the USER_* variables with whatever flags the windows bundled
toolchain requires to work.
We consider the bundled toolchain to be effectively the user specifying
options, since the actual user delegated that configuration work.
Closes #23678
- - - - -
f7b3c3a0 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00
ghc-toolchain: Parse javascript and ghcjs as a Arch and OS
- - - - -
8a0ae4ee by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00
ghc-toolchain: Fix ranlib option
- - - - -
31e9ec96 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00
Check Link Works with -Werror
- - - - -
bc1998b3 by Matthew Pickering at 2023-08-16T09:35:04-04:00
Only check for no_compact_unwind support on darwin
While writing ghc-toolchain we noticed that the
FP_PROG_LD_NO_COMPACT_UNWIND check is subtly wrong. Specifically, we
pass -Wl,-no_compact_unwind to cc. However, ld.gold interprets this as
-n o_compact_unwind, which is a valid argument.
Fixes #23676
- - - - -
0283f36e by Matthew Pickering at 2023-08-16T09:35:04-04:00
Add some javascript special cases to ghc-toolchain
On javascript there isn't a choice of toolchain but some of the
configure checks were not accurately providing the correct answer.
1. The linker was reported as gnu LD because the --version output
mentioned gnu LD.
2. The --target flag makes no sense on javascript but it was just
ignored by the linker, so we add a special case to stop ghc-toolchain
thinking that emcc supports --target when used as a linker.
- - - - -
a48ec5f8 by Matthew Pickering at 2023-08-16T09:35:04-04:00
check for emcc in gnu_LD check
- - - - -
50df2e69 by Matthew Pickering at 2023-08-16T09:35:04-04:00
Add ldOverrideWhitelist to only default to ldOverride on windows/linux
On some platforms - ie darwin, javascript etc we really do not want to
allow the user to use any linker other than the default one as this
leads to all kinds of bugs. Therefore it is a bit more prudant to add a
whitelist which specifies on which platforms it might be possible to use
a different linker.
- - - - -
a669a39c by Matthew Pickering at 2023-08-16T09:35:04-04:00
Fix plaform glob in FPTOOLS_SET_C_LD_FLAGS
A normal triple may look like
x86_64-unknown-linux
but when cross-compiling you get $target set to a quad such as..
aarch64-unknown-linux-gnu
Which should also match this check.
- - - - -
c52b6769 by Matthew Pickering at 2023-08-16T09:35:04-04:00
ghc-toolchain: Pass ld-override onto ghc-toolchain
- - - - -
039b484f by Matthew Pickering at 2023-08-16T09:35:04-04:00
ld override: Make whitelist override user given option
- - - - -
d2b63cbc by Matthew Pickering at 2023-08-16T09:35:05-04:00
ghc-toolchain: Add format mode to normalise differences before diffing.
The "format" mode takes an "--input" and "--ouput" target file and
formats it.
This is intended to be useful on windows where the
configure/ghc-toolchain target files can't be diffed very easily because
the path separators are different.
- - - - -
f2b39e4a by Matthew Pickering at 2023-08-16T09:35:05-04:00
ghc-toolchain: Bump ci-images commit to get new ghc-wasm-meta
We needed to remove -Wno-unused-command-line-argument from the arguments
passed in order for the configure check to report correctly.
See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10976#note_516335
- - - - -
92103830 by Matthew Pickering at 2023-08-16T09:35:05-04:00
configure: MergeObjsCmd - distinguish between empty string and unset variable
If `MergeObjsCmd` is explicitly set to the empty string then we should
assume that MergeObjs is just not supported.
This is especially important for windows where we set MergeObjsCmd to ""
in m4/fp_setup_windows_toolchain.m4.
- - - - -
3500bb2c by Matthew Pickering at 2023-08-16T09:35:05-04:00
configure: Add proper check to see if object merging works
- - - - -
08c9a014 by Matthew Pickering at 2023-08-16T09:35:05-04:00
ghc-toolchain: If MergeObjsCmd is not set, replace setting with Nothing
If the user explicitly chooses to not set a MergeObjsCmd then it is
correct to use Nothing for tgtMergeObjs field in the Target file.
- - - - -
c9071d94 by Matthew Pickering at 2023-08-16T09:35:05-04:00
HsCppArgs: Augment the HsCppOptions
This is important when we pass -I when setting up the windows toolchain.
- - - - -
294a6d80 by Matthew Pickering at 2023-08-16T09:35:05-04:00
Set USER_CPP_ARGS when setting up windows toolchain
- - - - -
bde4b5d4 by Rodrigo Mesquita at 2023-08-16T09:35:05-04:00
Improve handling of Cc as a fallback
- - - - -
f4c1c3a3 by Rodrigo Mesquita at 2023-08-16T09:35:05-04:00
ghc-toolchain: Configure Cpp and HsCpp correctly when user specifies flags
In ghc-toolchain, we were only /not/ configuring required flags when the
user specified any flags at all for the of the HsCpp and Cpp tools.
Otherwise, the linker takes into consideration the user specified flags
to determine whether to search for a better linker implementation, but
already configured the remaining GHC and platform-specific flags
regardless of the user options.
Other Tools consider the user options as a baseline for further
configuration (see `findProgram`), so #23689 is not applicable.
Closes #23689
- - - - -
bfe4ffac by Matthew Pickering at 2023-08-16T09:35:05-04:00
CPP_ARGS: Put new options after user specified options
This matches up with the behaviour of ghc-toolchain, so that the output
of both matches.
- - - - -
a6828173 by Gergő Érdi at 2023-08-16T09:35:41-04:00
If a defaulting plugin made progress, re-zonk wanteds before built-in defaulting
Fixes #23821.
- - - - -
e2b38115 by Sylvain Henry at 2023-08-17T07:54:06-04:00
JS: implement openat(AT_FDCWD...) (#23697)
Use `openSync` to implement `openat(AT_FDCWD...)`.
- - - - -
a975c663 by sheaf at 2023-08-17T07:54:47-04:00
Use unsatisfiable for missing methods w/ defaults
When a class instance has an Unsatisfiable constraint in its context
and the user has not explicitly provided an implementation of a method,
we now always provide a RHS of the form `unsatisfiable @msg`, even
if the method has a default definition available. This ensures that,
when deferring type errors, users get the appropriate error message
instead of a possible runtime loop, if class default methods were
defined recursively.
Fixes #23816
- - - - -
45ca51e5 by Ben Gamari at 2023-08-17T15:16:41-04:00
ghc-internal: Initial commit of the skeleton
- - - - -
88bbf8c5 by Ben Gamari at 2023-08-17T15:16:41-04:00
ghc-experimental: Initial commit
- - - - -
664468c0 by Ben Gamari at 2023-08-17T15:17:17-04:00
testsuite/cloneStackLib: Fix incorrect format specifiers
- - - - -
eaa835bb by Ben Gamari at 2023-08-17T15:17:17-04:00
rts/ipe: Fix const-correctness of IpeBufferListNode
Both info tables and the string table should be `const`
- - - - -
78f6f6fd by Ben Gamari at 2023-08-17T15:17:17-04:00
nonmoving: Drop dead debugging utilities
These are largely superceded by support in the ghc-utils GDB extension.
- - - - -
3f6e8f42 by Ben Gamari at 2023-08-17T15:17:17-04:00
nonmoving: Refactor management of mark thread
Here we refactor that treatment of the worker thread used by the
nonmoving GC for concurrent marking, avoiding creating a new thread with
every major GC cycle. As well, the new scheme is considerably easier to
reason about, consolidating all state in one place, accessed via a small
set of accessors with clear semantics.
- - - - -
88c32b7d by Ben Gamari at 2023-08-17T15:17:17-04:00
testsuite: Skip T23221 in nonmoving GC ways
This test is very dependent upon GC behavior.
- - - - -
381cfaed by Ben Gamari at 2023-08-17T15:17:17-04:00
ghc-heap: Don't expose stack dirty and marking fields
These are GC metadata and are not relevant to the end-user. Moreover,
they are unstable which makes ghc-heap harder to test than necessary.
- - - - -
16828ca5 by Luite Stegeman at 2023-08-21T18:42:53-04:00
bump process submodule to include macOS fix and JS support
- - - - -
b4d5f6ed by Matthew Pickering at 2023-08-21T18:43:29-04:00
ci: Add support for triggering test-primops pipelines
This commit adds 4 ways to trigger testing with test-primops.
1. Applying the ~test-primops label to a validate pipeline.
2. A manually triggered job on a validate pipeline
3. A nightly pipeline job
4. A release pipeline job
Fixes #23695
- - - - -
32c50daa by Matthew Pickering at 2023-08-21T18:43:29-04:00
Add test-primops label support
The test-primops CI job requires some additional builds in the
validation pipeline, so we make sure to enable these jobs when
test-primops label is set.
- - - - -
73ca8340 by Matthew Pickering at 2023-08-21T18:43:29-04:00
Revert "Aarch ncg: Optimize immediate use for address calculations"
This reverts commit 8f3b3b78a8cce3bd463ed175ee933c2aabffc631.
See #23793
- - - - -
5546ad9e by Matthew Pickering at 2023-08-21T18:43:29-04:00
Revert "AArch NCG: Pure refactor"
This reverts commit 00fb6e6b06598752414a0b9a92840fb6ca61338d.
See #23793
- - - - -
02dfcdc2 by Matthew Pickering at 2023-08-21T18:43:29-04:00
Revert "Aarch64 NCG: Use encoded immediates for literals."
This reverts commit 40425c5021a9d8eb5e1c1046e2d5fa0a2918f96c.
See #23793
-------------------------
Metric Increase:
T4801
T5321FD
T5321Fun
-------------------------
- - - - -
7be4a272 by Matthew Pickering at 2023-08-22T08:55:20+01:00
ci: Remove manually triggered test-ci job
This doesn't work on slimmed down pipelines as the needed jobs don't
exist.
If you want to run test-primops then apply the label.
- - - - -
76a4d11b by Jaro Reinders at 2023-08-22T08:08:13-04:00
Remove Ptr example from roles docs
- - - - -
069729d3 by Bryan Richter at 2023-08-22T08:08:49-04:00
Guard against duplicate pipelines in forks
- - - - -
f861423b by Rune K. Svendsen at 2023-08-22T08:09:35-04:00
dump-decls: fix "Ambiguous module name"-error
Fixes errors of the following kind, which happen when dump-decls is run on a package that contains a module name that clashes with that of another package.
```
dump-decls: <no location info>: error:
Ambiguous module name `System.Console.ANSI.Types':
it was found in multiple packages:
ansi-terminal-0.11.4 ansi-terminal-types-0.11.5
```
- - - - -
edd8bc43 by Krzysztof Gogolewski at 2023-08-22T12:31:20-04:00
Fix MultiWayIf linearity checking (#23814)
Co-authored-by: Thomas BAGREL <thomas.bagrel at tweag.io>
- - - - -
4ba088d1 by konsumlamm at 2023-08-22T12:32:02-04:00
Update `Control.Concurrent.*` documentation
- - - - -
015886ec by ARATA Mizuki at 2023-08-22T15:13:13-04:00
Support 128-bit SIMD on AArch64 via LLVM backend
- - - - -
52a6d868 by Krzysztof Gogolewski at 2023-08-22T15:13:51-04:00
Testsuite cleanup
- Remove misleading help text in perf_notes, ways are not metrics
- Remove no_print_summary - this was used for Phabricator
- In linters tests, run 'git ls-files' just once.
Previously, it was called on each has_ls_files()
- Add ghc-prim.cabal to gitignore, noticed in #23726
- Remove ghc-prim.cabal, it was accidentally committed in 524c60c8cd
- - - - -
ab40aa52 by Alan Zimmerman at 2023-08-22T15:14:28-04:00
EPA: Use Introduce [DeclTag] in AnnSortKey
The AnnSortKey is used to keep track of the order of declarations for
printing when the container has split them apart.
This applies to HsValBinds and ClassDecl, ClsInstDecl.
When making modifications to the list of declarations, the new order
must be captured for when it must be printed. For each list of
declarations (binds and sigs for a HsValBind) we can just store the
list in order.
To recreate the list when printing, we must merge them, and this is
what the AnnSortKey records. It used to be indexed by SrcSpan, we now
simply index by a marker as to which list to take the next item from.
- - - - -
e7db36c1 by sheaf at 2023-08-23T08:41:28-04:00
Don't attempt pattern synonym error recovery
This commit gets rid of the pattern synonym error recovery mechanism
(recoverPSB). The rationale is that the fake pattern synonym binding
that the recovery mechanism introduced could lead to undesirable
knock-on errors, and it isn't really feasible to conjure up a
satisfactory binding as pattern synonyms can be used both in expressions
and patterns.
See Note [Pattern synonym error recovery] in GHC.Tc.TyCl.PatSyn.
It isn't such a big deal to eagerly fail compilation on a pattern synonym
that doesn't typecheck anyway.
Fixes #23467
- - - - -
6ccd9d65 by Ben Gamari at 2023-08-23T08:42:05-04:00
base: Don't use Data.ByteString.Internals.memcpy
This function is now deprecated from `bytestring`. Use
`Foreign.Marshal.Utils.copyBytes` instead.
Fixes #23880.
- - - - -
0bfa0031 by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Uniformly pass buildOptions to all builders in runBuilder
In Builder.hs, runBuilderWith mostly ignores the buildOptions in BuildInfo.
This leads to hard to diagnose bugs as any build options you pass with
runBuilderWithCmdOptions are ignored for many builders.
Solution: Uniformly pass buildOptions to the invocation of cmd.
Fixes #23845
- - - - -
9cac8f11 by Matthew Pickering at 2023-08-23T13:43:48-04:00
Abstract windows toolchain setup
This commit splits up the windows toolchain setup logic into two
functions.
* FP_INSTALL_WINDOWS_TOOLCHAIN - deals with downloading the toolchain if
it isn't already downloaded
* FP_SETUP_WINDOWS_TOOLCHAIN - sets the environment variables to point
to the correct place
FP_SETUP_WINDOWS_TOOLCHAIN is abstracted from the location of the mingw
toolchain and also the eventual location where we will install the
toolchain in the installed bindist.
This is the first step towards #23608
- - - - -
6c043187 by Matthew Pickering at 2023-08-23T13:43:48-04:00
Generate build.mk for bindists
The config.mk.in script was relying on some variables which were
supposed to be set by build.mk but therefore never were when used to
install a bindist.
Specifically
* BUILD_PROF_LIBS to determine whether we had profiled libraries or not
* DYNAMIC_GHC_PROGRAMS to determine whether we had shared libraries or
not
Not only were these never set but also not really accurate because you
could have shared libaries but still statically linked ghc executable.
In addition variables like GhcLibWays were just never used, so those
have been deleted from the script.
Now instead we generate a build.mk file which just directly specifies
which RtsWays we have supplied in the bindist and whether we have
DYNAMIC_GHC_PROGRAMS.
- - - - -
fe23629b by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Add reloc-binary-dist-* targets
This adds a command line option to build a "relocatable" bindist.
The bindist is created by first creating a normal bindist and then
installing it using the `RelocatableBuild=YES` option. This creates a
bindist without any wrapper scripts pointing to the libdir.
The motivation for this feature is that we want to ship relocatable
bindists on windows and this method is more uniform than the ad-hoc
method which lead to bugs such as #23608 and #23476
The relocatable bindist can be built with the "reloc-binary-dist" target
and supports the same suffixes as the normal "binary-dist" command to
specify the compression style.
- - - - -
41cbaf44 by Matthew Pickering at 2023-08-23T13:43:48-04:00
packaging: Fix installation scripts on windows/RelocatableBuild case
This includes quite a lot of small fixes which fix the installation
makefile to work on windows properly. This also required fixing the
RelocatableBuild variable which seemed to have been broken for a long
while.
Sam helped me a lot writing this patch by providing a windows machine to
test the changes. Without him it would have taken ages to tweak
everything.
Co-authored-by: sheaf <sam.derbyshire at gmail.com>
- - - - -
03474456 by Matthew Pickering at 2023-08-23T13:43:48-04:00
ci: Build relocatable bindist on windows
We now build the relocatable bindist target on windows, which means we
test and distribute the new method of creating a relocatable bindist.
- - - - -
d0b48113 by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Add error when trying to build binary-dist target on windows
The binary dist produced by `binary-dist` target doesn't work on windows
because of the wrapper script the makefile installs. In order to not
surprise any packagers we just give an error if someone tries to build
the old binary-dist target rather than the reloc-binary-dist target.
- - - - -
7cbf9361 by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Remove query' logic to use tooldir
- - - - -
03fad42e by Matthew Pickering at 2023-08-23T13:43:48-04:00
configure: Set WindresCmd directly and removed unused variables
For some reason there was an indirection via the Windres variable before
setting WindresCmd. That indirection led to #23855.
I then also noticed that these other variables were just not used
anywhere when trying to work out what the correct condition was for this
bit of the configure script.
- - - - -
c82770f5 by sheaf at 2023-08-23T13:43:48-04:00
Apply shellcheck suggestion to SUBST_TOOLDIR
- - - - -
896e35e5 by sheaf at 2023-08-23T13:44:34-04:00
Compute hints from TcSolverReportMsg
This commit changes how hints are handled in conjunction with
constraint solver report messages.
Instead of storing `[GhcHint]` in the TcRnSolverReport error constructor,
we compute the hints depending on the underlying TcSolverReportMsg.
This disentangles the logic and makes it easier to add new hints for
certain errors.
- - - - -
a05cdaf0 by Alexander Esgen at 2023-08-23T13:45:16-04:00
users-guide: remove note about fatal Haddock parse failures
- - - - -
4908d798 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Introduce Data.Enum
- - - - -
f59707c7 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Num.Integer
- - - - -
b1054053 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Num
- - - - -
6baa481d by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Num.Natural
- - - - -
2ac15233 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Float
- - - - -
f3c489de by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Real
- - - - -
94f59eaa by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Eliminate module reexport in GHC.Exception
The metric increase here isn't strictly due to this commit but it's a
rather small, incidental change.
Metric Increase:
T8095
T13386
Metric Decrease:
T8095
T13386
T18304
- - - - -
be1fc7df by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add disclaimers in internal modules
To warn users that these modules are internal and their interfaces may
change with little warning.
As proposed in Core Libraries Committee #146 [CLC146].
[CLC146]: https://github.com/haskell/core-libraries-committee/issues/146
- - - - -
0326f3f4 by sheaf at 2023-08-23T17:37:29-04:00
Bump Cabal submodule
We need to bump the Cabal submodule to include commit ec75950
which fixes an issue with a dodgy import Rep(..) which relied
on GHC bug #23570
- - - - -
0504cd08 by Facundo Domínguez at 2023-08-23T17:38:11-04:00
Fix typos in the documentation of Data.OldList.permutations
- - - - -
1420b8cb by Antoine Leblanc at 2023-08-24T16:18:17-04:00
Be more eager in TyCon boot validity checking
This commit performs boot-file consistency checking for TyCons into
checkValidTyCl. This ensures that we eagerly catch any mismatches,
which prevents the compiler from seeing these inconsistencies and
panicking as a result.
See Note [TyCon boot consistency checking] in GHC.Tc.TyCl.
Fixes #16127
- - - - -
d99c816f by Finley McIlwaine at 2023-08-24T16:18:55-04:00
Refactor estimation of stack info table provenance
This commit greatly refactors the way we compute estimated provenance for stack
info tables. Previously, this process was done using an entirely separate traversal
of the whole Cmm code stream to build the map from info tables to source locations.
The separate traversal is now fused with the Cmm code generation pipeline in
GHC.Driver.Main.
This results in very significant code generation speed ups when -finfo-table-map is
enabled. In testing, this patch reduces code generation times by almost 30% with
-finfo-table-map and -O0, and 60% with -finfo-table-map and -O1 or -O2 .
Fixes #23103
- - - - -
d3e0124c by Finley McIlwaine at 2023-08-24T16:18:55-04:00
Add a test checking overhead of -finfo-table-map
We want to make sure we don't end up with poor codegen performance resulting from
-finfo-table-map again as in #23103. This test adds a performance test tracking
total allocations while compiling ExactPrint with -finfo-table-map.
- - - - -
fcfc1777 by Ben Gamari at 2023-08-25T10:58:16-04:00
llvmGen: Add export list to GHC.Llvm.MetaData
- - - - -
5880fff6 by Ben Gamari at 2023-08-25T10:58:16-04:00
llvmGen: Allow LlvmLits in MetaExprs
This omission appears to be an oversight.
- - - - -
86ce92a2 by Ben Gamari at 2023-08-25T10:58:16-04:00
compiler: Move platform feature predicates to GHC.Driver.DynFlags
These are useful in `GHC.Driver.Config.*`.
- - - - -
a6a38742 by Ben Gamari at 2023-08-25T10:58:16-04:00
llvmGen: Introduce infrastructure for module flag metadata
- - - - -
e9af2cf3 by Ben Gamari at 2023-08-25T10:58:16-04:00
llvmGen: Don't pass stack alignment via command line
As of https://reviews.llvm.org/D103048 LLVM no longer supports the
`-stack-alignment=...` flag. Instead this information is passed via a
module flag metadata node.
This requires dropping support for LLVM 11 and 12.
Fixes #23870
- - - - -
a936f244 by Alan Zimmerman at 2023-08-25T10:58:56-04:00
EPA: Keep track of "in" token for WarningTxt category
A warning can now be written with a category, e.g.
{-# WARNInG in "x-c" e "d" #-}
Keep track of the location of the 'in' keyword and string, as well as
the original SourceText of the label, in case it uses character escapes.
- - - - -
3df8a653 by Matthew Pickering at 2023-08-25T17:42:18-04:00
Remove redundant import in InfoTableProv
The copyBytes function is provided by the import of Foreign.
Fixes #23889
- - - - -
d6f807ec by Ben Gamari at 2023-08-25T17:42:54-04:00
gitlab/issue-template: Mention report-a-bug
- - - - -
50b9f75d by Artin Ghasivand at 2023-08-26T20:02:50+03:30
Added StandaloneKindSignature examples to replace CUSKs ones
- - - - -
2f6309a4 by Vladislav Zavialov at 2023-08-27T03:47:37-04:00
Remove outdated CPP in compiler/* and template-haskell/*
The boot compiler was bumped to 9.4 in cebb5819b43.
There is no point supporting older GHC versions with CPP.
- - - - -
5248fdf7 by Zubin Duggal at 2023-08-28T15:01:09+05:30
testsuite: Add regression test for #23861
Simon says this was fixed by
commit 8d68685468d0b6e922332a3ee8c7541efbe46137
Author: sheaf <sam.derbyshire at gmail.com>
Date: Fri Aug 4 15:28:45 2023 +0200
Remove zonk in tcVTA
- - - - -
b6903f4d by Zubin Duggal at 2023-08-28T12:33:58-04:00
testsuite: Add regression test for #23864
Simon says this was fixed by
commit 59202c800f2c97c16906120ab2561f6e1556e4af
Author: Sebastian Graf <sebastian.graf at kit.edu>
Date: Fri Mar 31 17:35:22 2023 +0200
CorePrep: Eliminate EmptyCase and unsafeEqualityProof in CoreToStg instead
We eliminate EmptyCase by way of `coreToStg (Case e _ _ []) = coreToStg e` now.
The main reason is that it plays far better in conjunction with eta expansion
(as we aim to do for arguments in CorePrep, #23083), because we can discard
any arguments, `(case e of {}) eta == case e of {}`, whereas in `(e |> co) eta`
it's impossible to discard the argument.
- - - - -
9eecdf33 by sheaf at 2023-08-28T18:54:06+00:00
Remove ScopedTypeVariables => TypeAbstractions
This commit implements [amendment 604](https://github.com/ghc-proposals/ghc-proposals/pull/604/)
to [GHC proposal 448](https://github.com/ghc-proposals/ghc-proposals/pull/448)
by removing the implication of language extensions
ScopedTypeVariables => TypeAbstractions
To limit breakage, we now allow type arguments in constructor patterns
when both ScopedTypeVariables and TypeApplications are enabled, but
we emit a warning notifying the user that this is deprecated behaviour
that will go away starting in GHC 9.12.
Fixes #23776
- - - - -
fadd5b4d by sheaf at 2023-08-28T18:54:06+00:00
.stderr: ScopedTypeVariables =/> TypeAbstractions
This commit accepts testsuite changes for the changes in the previous
commit, which mean that TypeAbstractions is no longer implied by
ScopedTypeVariables.
- - - - -
4f5fb500 by Greg Steuck at 2023-08-29T07:55:13-04:00
Repair `codes` test on OpenBSD by explicitly requesting extended RE
- - - - -
6bbde581 by Vasily Sterekhov at 2023-08-29T12:06:58-04:00
Add test for #23540
`T23540.hs` makes use of `explainEv` from `HieQueries.hs`, so
`explainEv` has been moved to `TestUtils.hs`.
- - - - -
257bb3bd by Vasily Sterekhov at 2023-08-29T12:06:58-04:00
Add test for #23120
- - - - -
4f192947 by Vasily Sterekhov at 2023-08-29T12:06:58-04:00
Make some evidence uses reachable by toHie
Resolves #23540, #23120
This adds spans to certain expressions in the typechecker and renamer,
and lets 'toHie' make use of those spans. Therefore the relevant
evidence uses for the following syntax will now show up under the
expected nodes in 'HieAst's:
- Overloaded literals ('IsString', 'Num', 'Fractional')
- Natural patterns and N+k patterns ('Eq', 'Ord', and instances from the
overloaded literals being matched on)
- Arithmetic sequences ('Enum')
- Monadic bind statements ('Monad')
- Monadic body statements ('Monad', 'Alternative')
- ApplicativeDo ('Applicative', 'Functor')
- Overloaded lists ('IsList')
Also see Note [Source locations for implicit function calls]
In the process of handling overloaded lists I added an extra 'SrcSpan'
field to 'VAExpansion' - this allows us to more accurately reconstruct
the locations from the renamer in 'rebuildHsApps'. This also happens to
fix #23120.
See the additions to Note [Looking through HsExpanded]
- - - - -
fe9fcf9d by Sylvain Henry at 2023-08-29T12:07:50-04:00
ghc-heap: rename C file (fix #23898)
- - - - -
b60d6576 by Krzysztof Gogolewski at 2023-08-29T12:08:29-04:00
Misc cleanup
- Builtin.PrimOps: ReturnsAlg was used only for unboxed tuples.
Rename to ReturnsTuple.
- Builtin.Utils: use SDoc for a panic message.
The comment about <<details unavailable>> was obsoleted by e8d356773b56.
- TagCheck: fix wrong logic. It was zipping a list 'args' with its
version 'args_cmm' after filtering.
- Core.Type: remove an outdated 1999 comment about unlifted polymorphic types
- hadrian: remove leftover debugging print
- - - - -
3054fd6d by Krzysztof Gogolewski at 2023-08-29T12:09:08-04:00
Add a regression test for #23903
The bug has been fixed by commit bad2f8b8aa8424.
- - - - -
21584b12 by Ben Gamari at 2023-08-29T19:52:02-04:00
README: Refer to ghc-hq repository for contributor and governance information
- - - - -
e542d590 by sheaf at 2023-08-29T19:52:40-04:00
Export setInertSet from GHC.Tc.Solver.Monad
We used to export getTcSInerts and setTcSInerts from GHC.Tc.Solver.Monad.
These got renamed to getInertSet/setInertSet in e1590ddc. That commit also removed
the export of setInertSet, but that function is useful for the GHC API.
- - - - -
694ec5b1 by sheaf at 2023-08-30T10:18:32-04:00
Don't bundle children for non-parent Avails
We used to bundle all children of the parent Avail with things that
aren't the parent, e.g. with
class C a where
type T a
meth :: ..
we would bundle the whole Avail (C, T, meth) with all of C, T and meth,
instead of only with C.
Avoiding this fixes #23570
- - - - -
d926380d by Krzysztof Gogolewski at 2023-08-30T10:19:08-04:00
Fix typos
- - - - -
d07080d2 by Josh Meredith at 2023-08-30T19:42:32-04:00
JS: Implement missing C functions `rename`, `realpath`, and `getcwd` (#23806)
- - - - -
e2940272 by David Binder at 2023-08-30T19:43:08-04:00
Bump submodules of hpc and hpc-bin to version 0.7.0.0
hpc 0.7.0.0 dropped SafeHaskell safety guarantees in order to simplify
compatibility with newer versions of the directory package which
dropped all SafeHaskell guarantees.
- - - - -
5d56d05c by David Binder at 2023-08-30T19:43:08-04:00
Bump hpc bound in ghc.cabal.in
- - - - -
99fff496 by Dominik Schrempf at 2023-08-31T00:04:46-04:00
ghc classes documentation: rm redundant comment
- - - - -
fe021bab by Dominik Schrempf at 2023-08-31T00:04:46-04:00
prelude documentation: various nits
- - - - -
48c84547 by Dominik Schrempf at 2023-08-31T00:04:46-04:00
integer documentation: minor corrections
- - - - -
20cd12f4 by Dominik Schrempf at 2023-08-31T00:04:46-04:00
real documentation: nits
- - - - -
dd39bdc0 by sheaf at 2023-08-31T00:05:27-04:00
Add a test for #21765
This issue (of reporting a constraint as being redundant even though
removing it causes typechecking to fail) was fixed in aed1974e.
This commit simply adds a regression test.
Fixes #21765
- - - - -
f1ec3628 by Andrew Lelechenko at 2023-08-31T23:53:30-04:00
Export foldl' from Prelude and bump submodules
See https://github.com/haskell/core-libraries-committee/issues/167 for discussion
Metric Decrease:
T8095
T13386
Metric Increase:
T13386
T8095
T8095 ghc/alloc decreased on x86_64, but increased on aarch64.
T13386 ghc/alloc decreased on x86_64-windows, but increased on other platforms.
Neither has anything to do with `foldl'`, so I conclude that both are flaky.
- - - - -
3181b97d by Gergő Érdi at 2023-08-31T23:54:06-04:00
Allow cross-tyvar defaulting proposals from plugins
Fixes #23832.
- - - - -
e4af506e by Sebastian Graf at 2023-09-01T14:29:12-04:00
Clarify Note [GlobalId/LocalId] after CorePrep (#23797)
Fixes #23797.
- - - - -
ac29787c by Sylvain Henry at 2023-09-01T14:30:02-04:00
Fix warning with UNPACK on sum type (#23921)
- - - - -
9765ac7b by Zubin Duggal at 2023-09-05T00:37:45-04:00
hadrian: track python dependencies in doc rules
- - - - -
1578215f by sheaf at 2023-09-05T00:38:26-04:00
Bump Haddock to fix #23616
This commit updates the Haddock submodule to include
the fix to #23616.
Fixes #23616
- - - - -
5a2fe35a by David Binder at 2023-09-05T00:39:07-04:00
Fix example in GHC user guide in SafeHaskell section
The example given in the SafeHaskell section uses an implementation of
Monad which no longer works. This MR removes the non-canonical return
instance and adds the necessary instances of Functor and Applicative.
- - - - -
291d81ae by Matthew Pickering at 2023-09-05T14:03:10-04:00
driver: Check transitive closure of haskell package dependencies when deciding whether to relink
We were previously just checking whether direct package dependencies had
been modified. This caused issues when compiling without optimisations
as we wouldn't relink the direct dependency if one of its dependenices
changed.
Fixes #23724
- - - - -
35da0775 by Krzysztof Gogolewski at 2023-09-05T14:03:47-04:00
Re-export GHC.Utils.Panic.Plain from GHC.Utils.Panic
Fixes #23930
- - - - -
3930d793 by Jaro Reinders at 2023-09-06T18:42:55-04:00
Make STG rewriter produce updatable closures
- - - - -
0104221a by Krzysztof Gogolewski at 2023-09-06T18:43:32-04:00
configure: update message to use hadrian (#22616)
- - - - -
b34f8586 by Alan Zimmerman at 2023-09-07T10:58:38-04:00
EPA: Incorrect locations for UserTyVar with '@'
In T13343.hs, the location for the @ is not within the span of the
surrounding UserTyVar.
type Bad @v = (forall (v1 :: RuntimeRep) (a1 :: TYPE v). a1) :: TYPE v
Widen it so it is captured.
Closes #23887
- - - - -
8046f020 by Finley McIlwaine at 2023-09-07T10:59:15-04:00
Bump haddock submodule to fix #23920
Removes the fake export of `FUN` from Prelude. Fixes #23920.
Bumps haddock submodule.
- - - - -
e0aa8c6e by Krzysztof Gogolewski at 2023-09-07T11:00:03-04:00
Fix wrong role in mkSelCo_maybe
In the Lint failure in #23938, we start with a coercion Refl :: T a ~R T a,
and call mkSelCo (SelTyCon 1 nominal) Refl.
The function incorrectly returned Refl :: a ~R a. The returned role
should be nominal, according to the SelCo rule:
co : (T s1..sn) ~r0 (T t1..tn)
r = tyConRole tc r0 i
----------------------------------
SelCo (SelTyCon i r) : si ~r ti
In this test case, r is nominal while r0 is representational.
- - - - -
1d92f2df by Gergő Érdi at 2023-09-08T04:04:30-04:00
If we have multiple defaulting plugins, then we should zonk in between them
after any defaulting has taken place, to avoid a defaulting plugin seeing
a metavariable that has already been filled.
Fixes #23821.
- - - - -
eaee4d29 by Gergő Érdi at 2023-09-08T04:04:30-04:00
Improvements to the documentation of defaulting plugins
Based on @simonpj's draft and comments in !11117
- - - - -
ede3df27 by Alan Zimmerman at 2023-09-08T04:05:06-04:00
EPA: Incorrect span for LWarnDec GhcPs
The code (from T23465.hs)
{-# WARNInG in "x-c" e "d" #-}
e = e
gives an incorrect span for the LWarnDecl GhcPs
Closes #23892
It also fixes the Test23465/Test23464 mixup
- - - - -
a0ccef7a by Krzysztof Gogolewski at 2023-09-08T04:05:42-04:00
Valid hole fits: don't suggest unsafeCoerce (#17940)
- - - - -
88b942c4 by Oleg Grenrus at 2023-09-08T19:58:42-04:00
Add warning for badly staged types.
Resolves #23829.
The stage violation results in out-of-bound names in splices.
Technically this is an error, but someone might rely on this!?
Internal changes:
- we now track stages for TyVars.
- thLevel (RunSplice _) = 0, instead of panic, as reifyInstances does
in fact rename its argument type, and it can contain variables.
- - - - -
9861f787 by Ben Gamari at 2023-09-08T19:59:19-04:00
rts: Fix invalid symbol type
I suspect this code is dead since we haven't observed this failing
despite the obviously incorrect macro name.
- - - - -
03ed6a9a by Ben Gamari at 2023-09-08T19:59:19-04:00
testsuite: Add simple test exercising C11 atomics in GHCi
See #22012.
- - - - -
1aa5733a by Ben Gamari at 2023-09-08T19:59:19-04:00
rts/RtsSymbols: Add AArch64 outline atomic operations
Fixes #22012 by adding the symbols described in
https://github.com/llvm/llvm-project/blob/main/llvm/docs/Atomics.rst#libcalls-atomic.
Ultimately this would be better addressed by #22011, but this is a first
step in the right direction and fixes the immediate symptom.
Note that we dropped the `__arch64_cas16` operations as these provided
by all platforms's compilers. Also, we don't link directly against the
libgcc/compiler-rt definitions but rather provide our own wrappers to
work around broken toolchains (e.g. https://bugs.gentoo.org/868018).
Generated via https://gitlab.haskell.org/ghc/ghc/-/snippets/5733.
- - - - -
8f7d3041 by Matthew Pickering at 2023-09-08T19:59:55-04:00
ci: Build debian12 and fedora38 bindists
This adds builds for the latest releases for fedora and debian
We build these bindists in nightly and release pipelines.
- - - - -
a1f0d55c by Felix Leitz at 2023-09-08T20:00:37-04:00
Fix documentation around extension implication for MultiParamTypeClasses/ConstrainedClassMethods.
- - - - -
98166389 by Teo Camarasu at 2023-09-12T04:30:54-04:00
docs: move -xn flag beside --nonmoving-gc
It makes sense to have these beside each other as they are aliases.
- - - - -
f367835c by Teo Camarasu at 2023-09-12T04:30:55-04:00
nonmoving: introduce a family of dense allocators
Supplement the existing power 2 sized nonmoving allocators with a family
of dense allocators up to a configurable threshold.
This should reduce waste from rounding up block sizes while keeping the
amount of allocator sizes manageable.
This patch:
- Adds a new configuration option `--nonmoving-dense-allocator-count`
to control the amount of these new dense allocators.
- Adds some constants to `NonmovingAllocator` in order to keep
marking fast with the new allocators.
Resolves #23340
- - - - -
2b07bf2e by Teo Camarasu at 2023-09-12T04:30:55-04:00
Add changelog entry for #23340
- - - - -
f96fe681 by sheaf at 2023-09-12T04:31:44-04:00
Use printGhciException in run{Stmt, Decls}
When evaluating statements in GHCi, we need to use printGhciException
instead of the printException function that GHC provides in order to
get the appropriate error messages that are customised for ghci use.
- - - - -
d09b932b by psilospore at 2023-09-12T04:31:44-04:00
T23686: Suggest how to enable Language Extension when in ghci
Fixes #23686
- - - - -
da30f0be by Matthew Craven at 2023-09-12T04:32:24-04:00
Unarise: Split Rubbish literals in function args
Fixes #23914. Also adds a check to STG lint that
these args are properly unary or nullary after unarisation
- - - - -
261b6747 by Matthew Pickering at 2023-09-12T04:33:04-04:00
darwin: Bump MAXOSX_DEPLOYMENT_TARGET to 10.13
This bumps the minumum supported version to 10.13 (High Sierra) which is
6 years old at this point.
Fixes #22938
- - - - -
f418f919 by Mario Blažević at 2023-09-12T04:33:45-04:00
Fix TH pretty-printing of nested GADTs, issue #23937
This commit fixes `Language.Haskell.TH.Ppr.pprint` so that it correctly
pretty-prints GADTs declarations contained within data family instances.
Fixes #23937
- - - - -
d7a64753 by John Ericson at 2023-09-12T04:34:20-04:00
Put hadrian non-bootstrap plans through `jq`
This makes it possible to review changes with conventional diffing
tools.
This is picking up where ad8cfed4195b1bbfc15b841f010e75e71f63157d left
off.
- - - - -
ff0a709a by Sylvain Henry at 2023-09-12T08:46:28-04:00
JS: fix some tests
- Tests using Setup programs need to pass --with-hc-pkg
- Several other fixes
See https://gitlab.haskell.org/ghc/ghc/-/wikis/javascript-backend/bug_triage
for the current status
- - - - -
fc86f0e7 by Krzysztof Gogolewski at 2023-09-12T08:47:04-04:00
Fix in-scope set assertion failure (#23918)
Patch by Simon
- - - - -
21a906c2 by Matthew Pickering at 2023-09-12T17:21:04+02:00
Add -Winconsistent-flags warning
The warning fires when inconsistent command line flags are passed.
For example:
* -dynamic-too and -dynamic
* -dynamic-too on windows
* -O and --interactive
* etc
This is on by default and allows users to control whether the warning is
displayed and whether it should be an error or not.
Fixes #22572
- - - - -
dfc4f426 by Krzysztof Gogolewski at 2023-09-12T20:31:35-04:00
Avoid serializing BCOs with the internal interpreter
Refs #23919
- - - - -
9217950b by Finley McIlwaine at 2023-09-13T08:06:03-04:00
Fix numa auto configure
- - - - -
98e7c1cf by Simon Peyton Jones at 2023-09-13T08:06:40-04:00
Add -fno-cse to T15426 and T18964
This -fno-cse change is to avoid these performance tests depending on
flukey CSE stuff. Each contains several independent tests, and we don't
want them to interact.
See #23925.
By killing CSE we expect a 400% increase in T15426, and 100% in T18964.
Metric Increase:
T15426
T18964
- - - - -
236a134e by Simon Peyton Jones at 2023-09-13T08:06:40-04:00
Tiny refactor
canEtaReduceToArity was only called internally, and always with
two arguments equal to zero. This patch just specialises the
function, and renames it to cantEtaReduceFun.
No change in behaviour.
- - - - -
56b403c9 by Ben Gamari at 2023-09-13T19:21:36-04:00
spec-constr: Lift argument limit for SPEC-marked functions
When the user adds a SPEC argument to a function, they are informing us
that they expect the function to be specialised. However, previously
this instruction could be preempted by the specialised-argument limit
(sc_max_args). Fix this.
This fixes #14003.
- - - - -
6840012e by Simon Peyton Jones at 2023-09-13T19:22:13-04:00
Fix eta reduction
Issue #23922 showed that GHC was bogusly eta-reducing a join point.
We should never eta-reduce (\x -> j x) to j, if j is a join point.
It is extremly difficult to trigger this bug. It took me 45 mins of
trying to make a small tests case, here immortalised as T23922a.
- - - - -
e5c00092 by Andreas Klebinger at 2023-09-14T08:57:43-04:00
Profiling: Properly escape characters when using `-pj`.
There are some ways in which unusual characters like quotes or others
can make it into cost centre names. So properly escape these.
Fixes #23924
- - - - -
ec490578 by Ellie Hermaszewska at 2023-09-14T08:58:24-04:00
Use clearer example variable names for bool eliminator
- - - - -
5126a2fe by Sylvain Henry at 2023-09-15T11:18:02-04:00
Add missing int64/word64-to-double/float rules (#23907)
CLC proposal: https://github.com/haskell/core-libraries-committee/issues/203
- - - - -
566ef411 by Mario Blažević at 2023-09-15T11:18:43-04:00
Fix and test TH pretty-printing of type operator role declarations
This commit fixes and tests `Language.Haskell.TH.Ppr.pprint` so that it
correctly pretty-prints `type role` declarations for operator names.
Fixes #23954
- - - - -
8e05c54a by Simon Peyton Jones at 2023-09-16T01:42:33-04:00
Use correct FunTyFlag in adjustJoinPointType
As the Lint error in #23952 showed, the function adjustJoinPointType
was failing to adjust the FunTyFlag when adjusting the type.
I don't think this caused the seg-fault reported in the ticket,
but it is definitely. This patch fixes it.
It is tricky to come up a small test case; Krzysztof came up with
this one, but it only triggers a failure in GHC 9.6.
- - - - -
778c84b6 by Pierre Le Marre at 2023-09-16T01:43:15-04:00
Update to Unicode 15.1.0
See: https://www.unicode.org/versions/Unicode15.1.0/
- - - - -
f9d79a6c by Alan Zimmerman at 2023-09-18T00:00:14-04:00
EPA: track unicode version for unrestrictedFunTyCon
Closes #23885
Updates haddock submodule
- - - - -
9374f116 by Andrew Lelechenko at 2023-09-18T00:00:54-04:00
Bump parsec submodule to allow text-2.1 and bytestring-0.12
- - - - -
7ca0240e by Ben Gamari at 2023-09-18T15:16:48-04:00
base: Advertise linear time of readFloat
As noted in #23538, `readFloat` has runtime that scales nonlinearly in
the size of its input. Consequently, its use on untrusted input can
be exploited as a denial-of-service vector. Point this out and suggest
use of `read` instead.
See #23538.
- - - - -
f3f58f13 by Simon Peyton Jones at 2023-09-18T15:17:24-04:00
Remove dead code GHC.CoreToStg.Prep.canFloat
This function never fires, so we can delete it: #23965.
- - - - -
ccab5b15 by Ben Gamari at 2023-09-18T15:18:02-04:00
base/changelog: Move fix for #23907 to 9.8.1 section
Since the fix was backported to 9.8.1
- - - - -
51b57d65 by Matthew Pickering at 2023-09-19T08:44:31-04:00
Add aarch64 alpine bindist
This is dynamically linked and makes creating statically linked
executables more straightforward.
Fixes #23482
- - - - -
02c87213 by Matthew Pickering at 2023-09-19T08:44:31-04:00
Add aarch64-deb11 bindist
This adds a debian 11 release job for aarch64.
Fixes #22005
- - - - -
8b61dfd6 by Alexis King at 2023-09-19T08:45:13-04:00
Don’t store the async exception masking state in CATCH frames
- - - - -
86d2971e by doyougnu at 2023-09-19T19:08:19-04:00
compiler,ghci: error codes link to HF error index
closes: #23259
- adds -fprint-error-index-links={auto|always|never} flag
- - - - -
5f826c18 by sheaf at 2023-09-19T19:09:03-04:00
Pass quantified tyvars in tcDefaultAssocDecl
This commit passes the correct set of quantified type variables written
by the user in associated type default declarations for validity
checking. This ensures that validity checking of associated type defaults
mirrors that of standalone type family instances.
Fixes #23768 (see testcase T23734 in subsequent commit)
- - - - -
aba18424 by sheaf at 2023-09-19T19:09:03-04:00
Avoid panic in mkGADTVars
This commit avoids panicking in mkGADTVars when we encounter
a type variable as in #23784 that is bound by a user-written
forall but not actually used.
Fixes #23784
- - - - -
a525a92a by sheaf at 2023-09-19T19:09:03-04:00
Adjust reporting of unused tyvars in data FamInsts
This commit adjusts the validity checking of data family
instances to improve the reporting of unused type variables.
See Note [Out of scope tvs in data family instances] in GHC.Tc.Validity.
The problem was that, in a situation such as
data family D :: Type
data instance forall (d :: Type). D = MkD
the RHS passed to 'checkFamPatBinders' would be the TyCon app
R:D d
which mentions the type variable 'd' quantified in the user-written
forall. Thus, when computing the set of unused type variables in
the RHS of the data family instance, we would find that 'd' is used,
and report a strange error message that would say that 'd' is not
bound on the LHS.
To fix this, we special-case the data-family instance case,
manually extracting all the type variables that appear in the
arguments of all the data constructores of the data family instance.
Fixes #23778
- - - - -
28dd52ee by sheaf at 2023-09-19T19:09:03-04:00
Unused tyvars in FamInst: only report user tyvars
This commit changes how we perform some validity checking for
coercion axioms to mirror how we handle default declarations for
associated type families. This allows us to keep track of whether
type variables in type and data family instances were user-written
or not, in order to only report the user-written ones in
"unused type variable" error messages.
Consider for example:
{-# LANGUAGE PolyKinds #-}
type family F
type instance forall a. F = ()
In this case, we get two quantified type variables,
(k :: Type) and (a :: k); the second being user-written, but the first
is introduced by the typechecker. We should only report 'a' as being
unused, as the user has no idea what 'k' is.
Fixes #23734
- - - - -
1eed645c by sheaf at 2023-09-19T19:09:03-04:00
Validity: refactor treatment of data families
This commit refactors the reporting of unused type variables in type
and data family instances to be more principled. This avoids ad-hoc
logic in the treatment of data family instances.
- - - - -
35bc506b by John Ericson at 2023-09-19T19:09:40-04:00
Remove `ghc-cabal`
It is dead code since the Make build system was removed.
I tried to go over every match of `git grep -i ghc-cabal` to find other
stray bits. Some of those might be workarounds that can be further
removed.
- - - - -
665ca116 by John Paul Adrian Glaubitz at 2023-09-19T19:10:39-04:00
Re-add unregisterised build support for sparc and sparc64
Closes #23959
- - - - -
142f8740 by Matthew Pickering at 2023-09-19T19:11:16-04:00
Bump ci-images to use updated version of Alex
Fixes #23977
- - - - -
fa977034 by John Ericson at 2023-09-21T12:55:25-04:00
Use Cabal 3.10 for Hadrian
We need the newer version for `CABAL_FLAG_*` env vars for #17191.
- - - - -
a5d22cab by John Ericson at 2023-09-21T12:55:25-04:00
hadrian: `need` any `configure` script we will call
When the script is changed, we should reconfigure.
- - - - -
db882b57 by John Ericson at 2023-09-21T12:55:25-04:00
hadrian: Make it easier to debug Cabal configure
Right now, output is squashed. This make per-package configure scripts
extremely hard to maintain, because we get vague "library is missing"
errors when the actually probably is usually completely unrelated except
for also involving the C/C++ toolchain.
(I can always pass `-VVV` to Hadrian locally, but these errors are
subtle and I often cannot reproduce them locally!)
`--disable-option-checking` was added back in
75c6e0684dda585c37b4ac254cd7a13537a59a91 but seems to be a bit overkill;
if other flags are passed that are not recognized behind the two from
Cabal mentioned in the former comment, we *do* want to know about it.
- - - - -
7ed65f5a by John Ericson at 2023-09-21T12:55:25-04:00
hadrian: Increase verbosity of certain cabal commands
This is a hack to get around the cabal function we're calling
*decreasing* the verbosity it passes to another function, which is the
stuff we often actually care about. Sigh.
Keeping this a separate commit so if this makes things too verbose it is
easy to revert.
- - - - -
a4fde569 by John Ericson at 2023-09-21T12:55:25-04:00
rts: Move most external symbols logic to the configure script
This is much more terse because we are programmatically handling the
leading underscore.
`findPtr` however is still handled in the Cabal file because we need a
newer Cabal to pass flags to the configure script automatically.
Co-Authored-By: Ben Gamari <ben at well-typed.com>
- - - - -
56cc85fb by Andrew Lelechenko at 2023-09-21T12:56:21-04:00
Bump Cabal submodule to allow text-2.1 and bytestring-0.12
- - - - -
0cd6148c by Matthew Pickering at 2023-09-21T12:56:21-04:00
hadrian: Generate Distribution/Fields/Lexer.x before creating a source-dist
- - - - -
b10ba6a3 by Andrew Lelechenko at 2023-09-21T12:56:21-04:00
Bump hadrian's index-state to upgrade alex at least to 3.2.7.3
- - - - -
11ecc37b by Luite Stegeman at 2023-09-21T12:57:03-04:00
JS: correct file size and times
Programs produced by the JavaScript backend were returning
incorrect file sizes and modification times, causing cabal
related tests to fail.
This fixes the problem and adds an additional test that verifies
basic file information operations.
fixes #23980
- - - - -
b35fd2cd by Ben Gamari at 2023-09-21T12:57:39-04:00
gitlab-ci: Drop libiserv from upload_ghc_libs
libiserv has been merged into the ghci package.
- - - - -
37ad04e8 by Ben Gamari at 2023-09-21T12:58:15-04:00
testsuite: Fix Windows line endings
- - - - -
5795b365 by Ben Gamari at 2023-09-21T12:58:15-04:00
testsuite: Use makefile_test
- - - - -
15118740 by Ben Gamari at 2023-09-21T12:58:55-04:00
system-cxx-std-lib: Add license and description
- - - - -
0208f1d5 by Ben Gamari at 2023-09-21T12:59:33-04:00
gitlab/issue-templates: Rename bug.md -> default.md
So that it is visible by default.
- - - - -
23cc3f21 by Andrew Lelechenko at 2023-09-21T20:18:11+01:00
Bump submodule text to 2.1
- - - - -
b8e4fe23 by Andrew Lelechenko at 2023-09-22T20:05:05-04:00
Bump submodule unix to 2.8.2.1
- - - - -
54b2016e by John Ericson at 2023-09-23T11:40:41-04:00
Move lib{numa,dw} defines to RTS configure
Clean up the m4 to handle the auto case always and be more consistent.
Also simplify the CPP --- we should always have both headers if we are
using libnuma.
"side effects" (AC_DEFINE, and AC_SUBST) are removed from the macros to
better separate searching from actions taken based on search results.
This might seem overkill now, but will make shuffling logic between
configure scripts easier later.
The macro comments are converted from `dnl` to `#` following the
recomendation in
https://www.gnu.org/software/autoconf/manual/autoconf-2.71/html_node/Macro-Definitions.html
- - - - -
d51b601b by John Ericson at 2023-09-23T11:40:50-04:00
Shuffle libzstd configuring between scripts
Like the prior commit for libdw and libnuma, `AC_DEFINE` to RTS
configure, `AC_SUBST` goes to the top-level configure script, and the
documentation of the m4 macro is improved.
- - - - -
d1425af0 by John Ericson at 2023-09-23T11:41:03-04:00
Move `FP_ARM_OUTLINE_ATOMICS` to RTS configure
It is just `AC_DEFINE` it belongs there instead.
- - - - -
18de37e4 by John Ericson at 2023-09-23T11:41:03-04:00
Move mmap in the runtime linker check to the RTS configure
`AC_DEFINE` should go there instead.
- - - - -
74132c2b by Andrew Lelechenko at 2023-09-25T21:56:54-04:00
Elaborate comment on GHC_NO_UNICODE
- - - - -
de142aa2 by Ben Gamari at 2023-09-26T15:25:03-04:00
gitlab-ci: Mark T22012 as broken on CentOS 7
Due to #23979.
- - - - -
6a896ce8 by Teo Camarasu at 2023-09-26T15:25:39-04:00
hadrian: better error for failing to find file's dependencies
Resolves #24004
- - - - -
d697a6c2 by Stefan Holdermans at 2023-09-26T20:58:37+00:00
Refactor uses of `partitionEithers . map`
This patch changes occurences of the idiom
`partitionEithers (map f xs)` by the simpler form
`partitionWith f xs` where `partitionWith` is the utility function
defined in `GHC.Utils.Misc`.
Resolves: #23953
- - - - -
8a2968b7 by Stefan Holdermans at 2023-09-26T20:58:37+00:00
Refactor uses of `partitionEithers <$> mapM f xs`
This patch changes occurences of the idiom
`partitionEithers <$> mapM f xs` by the simpler form
`partitionWithM f xs` where `partitionWithM` is a utility function
newly added to `GHC.Utils.Misc`.
- - - - -
6a27eb97 by Stefan Holdermans at 2023-09-26T20:58:37+00:00
Mark `GHC.Utils.Misc.partitionWithM` as inlineable
This patch adds an `INLINEABLE` pragma for `partitionWithM` to ensure
that the right-hand side of the definition of this function remains
available for specialisation at call sites.
- - - - -
f1e5245a by David Binder at 2023-09-27T01:19:00-04:00
Add RTS option to supress tix file
- - - - -
1f43124f by David Binder at 2023-09-27T01:19:00-04:00
Add expected output to testsuite in test interface-stability/base-exports
- - - - -
b9d2c354 by David Binder at 2023-09-27T01:19:00-04:00
Expose HpcFlags and getHpcFlags from GHC.RTS.Flags
- - - - -
345675c6 by David Binder at 2023-09-27T01:19:00-04:00
Fix expected output of interface-stability test
- - - - -
146e1c39 by David Binder at 2023-09-27T01:19:00-04:00
Implement getHpcFlags
- - - - -
61ba8e20 by David Binder at 2023-09-27T01:19:00-04:00
Add section in user guide
- - - - -
ea05f890 by David Binder at 2023-09-27T01:19:01-04:00
Rename --emit-tix-file to --write-tix-file
- - - - -
cabce2ce by David Binder at 2023-09-27T01:19:01-04:00
Update the golden files for interface stability
- - - - -
1dbdb9d0 by Krzysztof Gogolewski at 2023-09-27T01:19:37-04:00
Refactor: introduce stgArgRep
The function 'stgArgType' returns the type in STG. But this violates
the abstraction: in STG we're supposed to operate on PrimReps.
This introduces
stgArgRep ty = typePrimRep (stgArgType ty)
stgArgRep1 ty = typePrimRep1 (stgArgType ty)
stgArgRep_maybe ty = typePrimRep_maybe (stgArgType ty)
stgArgType is still directly used for unboxed tuples (should be fixable), FFI
and in ticky.
- - - - -
b02f8042 by Mario Blažević at 2023-09-27T17:33:28-04:00
Fix TH pretty-printer's parenthesization
This PR Fixes `Language.Haskell.TH.Ppr.pprint` so it correctly emits parentheses where needed.
Fixes #23962, #23968, #23971, and #23986
- - - - -
79104334 by Krzysztof Gogolewski at 2023-09-27T17:34:04-04:00
Add a testcase for #17564
The code in the ticket relied on the behaviour of Derived constraints.
Derived constraints were removed in GHC 9.4 and now the code works
as expected.
- - - - -
d7a80143 by sheaf at 2023-09-28T03:25:53-04:00
lint-codes: add new modes of operation
This commit adds two new modes of operation to the lint-codes
utility:
list - list all statically used diagnostic codes
outdated - list all outdated diagnostic codes
The previous behaviour is now:
test - test consistency and coverage of diagnostic codes
- - - - -
477d223c by sheaf at 2023-09-28T03:25:53-04:00
lint codes: avoid using git-grep
We manually traverse through the filesystem to find the diagnostic codes
embedded in .stdout and .stderr files, to avoid any issues with old
versions of grep.
Fixes #23843
- - - - -
a38ae69a by sheaf at 2023-09-28T03:25:53-04:00
lint-codes: add Hadrian targets
This commit adds new Hadrian targets:
codes, codes:used - list all used diagnostic codes
codes:outdated - list outdated diagnostic codes
This allows users to easily query GHC for used and outdated
diagnostic codes, e.g.
hadrian/build -j --flavour=<..> codes
will list all used diagnostic codes in the command line by running
the lint-codes utility in the "list codes" mode of operation.
The diagnostic code consistency and coverage test is still run as usual,
through the testsuite:
hadrian/build test --only="codes"
- - - - -
9cdd629b by Ben Gamari at 2023-09-28T03:26:29-04:00
hadrian: Install LICENSE files in bindists
Fixes #23548.
- - - - -
b8ebf876 by Matthew Craven at 2023-09-28T03:27:05-04:00
Fix visibility when eta-reducing a type lambda
Fixes #24014.
- - - - -
d3874407 by Torsten Schmits at 2023-09-30T16:08:10-04:00
Fix several mistakes around free variables in iface breakpoints
Fixes #23612 , #23607, #23998 and #23666.
MR: !11026
The fingerprinting logic in `Iface.Recomp` failed lookups when processing decls containing breakpoints for two reasons:
* IfaceBreakpoint created binders for free variables instead of expressions
* When collecting free names for the dependency analysis for fingerprinting, breakpoint FVs were skipped
- - - - -
ef5342cd by Simon Peyton Jones at 2023-09-30T16:08:48-04:00
Refactor to combine HsLam and HsLamCase
This MR is pure refactoring (#23916):
* Combine `HsLam` and `HsLamCase`
* Combine `HsCmdLam` and `HsCmdLamCase`
This just arranges to treat uniformly
\x -> e
\case pi -> ei
\cases pis -> ie
In the exising code base the first is treated differently
to the latter two.
No change in behaviour.
More specifics:
* Combine `HsLam` and `HsLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsExpr`) into one data construtor covering
* Lambda
* `\case`
* `\cases`
* The new `HsLam` has an argument of type `HsLamVariant` to distinguish the three cases.
* Similarly, combine `HsCmdLam` and `HsCmdLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsCmd` ) into one.
* Similarly, combine `mkHsLamPV` and `mkHsLamCasePV` (methods of class `DisambECP`) into one. (Thank you Alan Zimmerman.)
* Similarly, combine `LambdaExpr` and `LamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsMatchContext`) into one: `LamAlt` with a `HsLamVariant` argument.
* Similarly, combine `KappaExpr` and `ArrowLamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsArrowMatchContext`) into one: `ArrowLamAlt` with a `HsLamVariant` argument.
* Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one.
* Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one.
* In the same `PsError` data type, combine `PsErrLambdaCmdInFunAppCmd` and `PsErrLambdaCaseCmdInFunAppCmd` into one.
* In the same `PsError` data tpye, combine `PsErrLambdaInFunAppExpr` and `PsErrLambdaCaseInFunAppExpr` into one.
p* Smilarly combine `ExpectedFunTyLam` and `ExpectedFunTyLamCase` (constructors of `GHC.Tc.Types.Origin.ExpectedFunTyOrigin`) into one.
Phew!
- - - - -
b048bea0 by Andreas Klebinger at 2023-09-30T16:09:24-04:00
Arm: Make ppr methods easier to use by not requiring NCGConfig
- - - - -
2adc0508 by Andreas Klebinger at 2023-09-30T16:09:24-04:00
AArch64: Fix broken conditional jumps for offsets >= 1MB
Rewrite conditional jump instructions with offsets >= 1MB to use unconditional jumps
to avoid overflowing the immediate.
Fixes #23746
- - - - -
1424f790 by Alan Zimmerman at 2023-09-30T16:10:00-04:00
EPA: Replace Monoid with NoAnn
We currently use the Monoid class as a constraint on Exact Print
Annotation functions, so we can use mempty. But this leads to
requiring Semigroup instances too, which do not always make sense.
Instead, introduce a class NoAnn, with a function noAnn analogous to
mempty.
Closes #20372
Updates haddock submodule
- - - - -
c1a3ecde by Ben Gamari at 2023-09-30T16:10:36-04:00
users-guide: Refactor handling of :base-ref: et al.
- - - - -
bc204783 by Richard Eisenberg at 2023-10-02T14:50:52+02:00
Simplify and correct nasty case in coercion opt
This fixes #21062.
No test case, because triggering this code seems challenging.
- - - - -
9c9ca67e by Andrew Lelechenko at 2023-10-04T05:42:28-04:00
Bump bytestring submodule to 0.12.0.2
- - - - -
4e46dc2b by Andrew Lelechenko at 2023-10-04T05:42:28-04:00
Inline bucket_match
- - - - -
f6b2751f by Ben Gamari at 2023-10-04T05:43:05-04:00
configure: Fix #21712 again
This is a bit of a shot in the dark to fix #24033, which appears to be
another instance of #21712. For some reason the ld-override logic
*still* appears to be active on Darwin targets (or at least one).
Consequently, on misconfigured systems we may choose a non-`ld64`
linker.
It's a bit unclear exactly what happened in #24033 but ultimately the
check added for #21712 was not quite right, checking for the
`ghc_host_os` (the value of which depends upon the bootstrap compiler)
instead of the target platform. Fix this.
Fixes #24033.
- - - - -
2f0a101d by Krzysztof Gogolewski at 2023-10-04T05:43:42-04:00
Add a regression test for #24029
- - - - -
8cee3fd7 by sheaf at 2023-10-04T05:44:22-04:00
Fix non-symbolic children lookup of fixity decl
The fix for #23664 did not correctly account for non-symbolic names
when looking up children of a given parent. This one-line fix changes
that.
Fixes #24037
- - - - -
a4785b33 by Cheng Shao at 2023-10-04T05:44:59-04:00
rts: fix incorrect ticket reference
- - - - -
e037f459 by Ben Gamari at 2023-10-04T05:45:35-04:00
users-guide: Fix discussion of -Wpartial-fields
* fix a few typos
* add a new example showing when the warning fires
* clarify the existing example
* point out -Wincomplete-record-selects
Fixes #24049.
- - - - -
8ff3134e by Matthew Pickering at 2023-10-05T05:34:58-04:00
Revert "Pass preprocessor options to C compiler when building foreign C files (#16737)"
This reverts commit 1c18d3b41f897f34a93669edaebe6069f319f9e2.
`-optP` should pass options to the preprocessor, that might be a very
different program to the C compiler, so passing the options to the C
compiler is likely to result in `-optP` being useless.
Fixes #17185 and #21291
- - - - -
8f6010b9 by Ben Gamari at 2023-10-05T05:35:36-04:00
rts/nonmoving: Fix on LLP64 platforms
Previously `NONMOVING_SEGMENT_MASK` and friends were defined with the `UL`
size suffix. However, this is wrong on LLP64 platforms like Windows,
where `long` is 32-bits.
Fixes #23003.
Fixes #24042.
- - - - -
f20d02f8 by Andreas Klebinger at 2023-10-05T05:36:14-04:00
Fix isAArch64Bitmask for 32bit immediates.
Fixes #23802
- - - - -
63afb701 by Bryan Richter at 2023-10-05T05:36:49-04:00
Work around perf note fetch failure
Addresses #24055.
- - - - -
242102f4 by Krzysztof Gogolewski at 2023-10-05T05:37:26-04:00
Add a test for #21348
- - - - -
7d390bce by Rewbert at 2023-10-05T05:38:08-04:00
Fixes #24046
- - - - -
69abb171 by Finley McIlwaine at 2023-10-06T14:06:28-07:00
Ensure unconstrained instance dictionaries get IPE info
In the `StgRhsCon` case of `GHC.Stg.Debug.collectStgRhs`, we were not coming up
with an initial source span based on the span of the binder, which was causing
instance dictionaries without dynamic superclass constraints to not have source
locations in their IPE info. Now they do.
Resolves #24005
- - - - -
390443b7 by Andreas Klebinger at 2023-10-07T10:00:20-04:00
rts: Split up rts/include/stg/MachRegs.h by arch
- - - - -
3685942f by Bryan Richter at 2023-10-07T10:00:56-04:00
Actually set hackage index state
Or at least, use a version of the cabal command that *claims* to set the
index state.
Time will tell.
- - - - -
46a0e5be by Bryan Richter at 2023-10-07T10:00:56-04:00
Update hackage index state
- - - - -
d4b037de by Bryan Richter at 2023-10-07T10:00:56-04:00
Ensure hadrian uses CI's hackage index state
- - - - -
e206be64 by Andrew Lelechenko at 2023-10-08T15:06:14-04:00
Do not use O_NONBLOCK on regular files or block devices
CLC proposal https://github.com/haskell/core-libraries-committee/issues/166
- - - - -
a06197c4 by David Binder at 2023-10-08T15:06:55-04:00
Update hpc-bin submodule to 0.69
- - - - -
ed6785b6 by David Binder at 2023-10-08T15:06:55-04:00
Update Hadrian with correct path to happy file for hpc-bin
- - - - -
94066d58 by Alan Zimmerman at 2023-10-09T21:35:53-04:00
EPA: Introduce HasAnnotation class
The class is defined as
class HasAnnotation e where
noAnnSrcSpan :: SrcSpan -> e
This generalises noAnnSrcSpan, and allows
noLocA :: (HasAnnotation e) => a -> GenLocated e a
noLocA = L (noAnnSrcSpan noSrcSpan)
- - - - -
8792a1bc by Ben Gamari at 2023-10-09T21:36:29-04:00
Bump unix submodule to v2.8.3.0
- - - - -
e96c51cb by Andreas Klebinger at 2023-10-10T16:44:27+01:00
Add a flag -fkeep-auto-rules to optionally keep auto-generated rules around.
The motivation for the flag is given in #21917.
- - - - -
3ed58cef by Matthew Pickering at 2023-10-10T19:01:22-04:00
hadrian: Add ghcToolchain to tool args list
This allows you to load ghc-toolchain and ghc-toolchain-bin into HLS.
- - - - -
476c02d4 by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Normalise triple via config.sub
We were not normalising the target triple anymore like we did with the
old make build system.
Fixes #23856
- - - - -
303dd237 by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Add missing vendor normalisation
This is copied from m4/ghc_convert_vendor.m4
Towards #23868
- - - - -
838026c9 by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Add loongarch64 to parseArch
Towards #23868
- - - - -
1a5bc0b5 by Matthew Pickering at 2023-10-10T19:01:22-04:00
Add same LD hack to ghc-toolchain
In the ./configure script, if you pass the `LD` variable then this has
the effect of stopping use searching for a linker and hence passing
`-fuse-ld=...`.
We want to emulate this logic in ghc-toolchain, if a use explicilty
specifies `LD` variable then don't add `-fuse-ld=..` with the goal of
making ./configure and ghc-toolchain agree on which flags to use when
using the C compiler as a linker.
This is quite unsavoury as we don't bake the choice of LD into the
configuration anywhere but what's important for now is making
ghc-toolchain and ./configure agree as much as possible.
See #23857 for more discussion
- - - - -
42d50b5a by Ben Gamari at 2023-10-10T19:01:22-04:00
ghc-toolchain: Check for C99 support with -std=c99
Previously we failed to try enabling C99 support with `-std=c99`, as
`autoconf` attempts. This broke on older compilers (e.g. CentOS 7) which
don't enable C99 by default.
Fixes #23879.
- - - - -
da2961af by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Add endianess check using __BYTE_ORDER__ macro
In very old toolchains the BYTE_ORDER macro is not set but thankfully
the __BYTE_ORDER__ macro can be used instead.
- - - - -
d8da73cd by Matthew Pickering at 2023-10-10T19:01:22-04:00
configure: AC_PATH_TARGET_TOOL for LD
We want to make sure that LD is set to an absolute path in order to be
consistent with the `LD=$(command -v ld)` call. The AC_PATH_TARGET_TOOL
macro uses the absolute path rather than AC_CHECK_TARGET_TOOL which
might use a relative path.
- - - - -
171f93cc by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Check whether we need -std=gnu99 for CPP as well
In ./configure the C99 flag is passed to the C compiler when used as a C
preprocessor. So we also check the same thing in ghc-toolchain.
- - - - -
89a0918d by Matthew Pickering at 2023-10-10T19:01:22-04:00
Check for --target linker flag separately to C compiler
There are situations where the C compiler doesn't accept `--target` but
when used as a linker it does (but doesn't do anything most likely)
In particular with old gcc toolchains, the C compiler doesn't support
--target but when used as a linker it does.
- - - - -
37218329 by Matthew Pickering at 2023-10-10T19:01:22-04:00
Use Cc to compile test file in nopie check
We were attempting to use the C compiler, as a linker, to compile a file
in the nopie check, but that won't work in general as the flags we pass
to the linker might not be compatible with the ones we pass when using
the C compiler.
- - - - -
9b2dfd21 by Matthew Pickering at 2023-10-10T19:01:22-04:00
configure: Error when ghc-toolchain fails to compile
This is a small QOL change as if you are working on ghc-toolchain and it
fails to compile then configure will continue and can give you outdated
results.
- - - - -
1f0de49a by Matthew Pickering at 2023-10-10T19:01:22-04:00
configure: Check whether -no-pie works when the C compiler is used as a linker
`-no-pie` is a flag we pass when using the C compiler as a linker (see
pieCCLDOpts in GHC.Driver.Session) so we should test whether the C
compiler used as a linker supports the flag, rather than just the C
compiler.
- - - - -
62cd2579 by Matthew Pickering at 2023-10-10T19:01:22-04:00
ghc-toolchain: Remove javascript special case for --target detection
emcc when used as a linker seems to ignore the --target flag, and for
consistency with configure which now tests for --target, we remove this
special case.
- - - - -
0720fde7 by Ben Gamari at 2023-10-10T19:01:22-04:00
toolchain: Don't pass --target to emscripten toolchain
As noted in `Note [Don't pass --target to emscripten toolchain]`,
emscripten's `emcc` is rather inconsistent with respect to its treatment
of the `--target` flag. Avoid this by special-casing this toolchain
in the `configure` script and `ghc-toolchain`.
Fixes on aspect of #23744.
- - - - -
6354e1da by Matthew Pickering at 2023-10-10T19:01:22-04:00
hadrian: Don't pass `--gcc-options` as a --configure-arg to cabal configure
Stop passing -gcc-options which mixed together linker flags and
non-linker flags. There's no guarantee the C compiler will accept both
of these in each mode.
- - - - -
c00a4bd6 by Ben Gamari at 2023-10-10T19:01:22-04:00
configure: Probe stage0 link flags
For consistency with later stages and CC.
- - - - -
1f11e7c4 by Sebastian Graf at 2023-10-10T19:01:58-04:00
Stricter Binary.get in GHC.Types.Unit (#23964)
I noticed some thunking while looking at Core.
This change has very modest, but throughout positive ghc/alloc effect:
```
hard_hole_fits(normal) ghc/alloc 283,057,664 281,620,872 -0.5%
geo. mean -0.1%
minimum -0.5%
maximum +0.0%
```
Fixes #23964.
- - - - -
a4f1a181 by Bryan Richter at 2023-10-10T19:02:37-04:00
rel_eng/upload.sh cleanups
- - - - -
80705335 by doyougnu at 2023-10-10T19:03:18-04:00
ci: add javascript label rule
This adds a rule which triggers the javascript job when the "javascript"
label is assigned to an MR.
- - - - -
a2c0fff6 by Matthew Craven at 2023-10-10T19:03:54-04:00
Make 'wWarningFlagsDeps' include every WarningFlag
Fixes #24071.
- - - - -
d055f099 by Jan Hrček at 2023-10-10T19:04:33-04:00
Fix pretty printing of overlap pragmas in TH splices (fixes #24074)
- - - - -
0746b868 by Andreas Klebinger at 2023-10-10T19:05:09-04:00
Aarch64 NCG: Use encoded immediates for literals.
Try to generate
instr x2, <imm>
instead of
mov x1, lit
instr x2, x1
When possible. This get's rid if quite a few redundant
mov instructions.
I believe this causes a metric decrease for LargeRecords as
we reduce register pressure.
-------------------------
Metric Decrease:
LargeRecord
-------------------------
- - - - -
739f4e6f by Andreas Klebinger at 2023-10-10T19:05:09-04:00
AArch NCG: Refactor getRegister'
Remove some special cases which can be handled just as well by the
generic case.
This increases code re-use while also fixing #23749. Since some of the
special case wasn't upholding Note [Signed arithmetic on AArch64].
- - - - -
1b213d33 by Andreas Klebinger at 2023-10-10T19:05:09-04:00
Aarch ncg: Optimize immediate use for address calculations
When the offset doesn't fit into the immediate we now just reuse the
general getRegister' code path which is well optimized to compute the
offset into a register instead of a special case for CmmRegOff.
This means we generate a lot less code under certain conditions which is
why performance metrics for these improve.
-------------------------
Metric Decrease:
T4801
T5321FD
T5321Fun
-------------------------
- - - - -
b7df0732 by John Ericson at 2023-10-11T16:02:11-04:00
RTS configure: Move over mem management checks
These are for heap allocation, a strictly RTS concern.
All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.
The RTS configure one has a new
```
AC_CHECK_SIZEOF([void *])
```
that the top-level configure version didn't have, so that
`ac_cv_sizeof_void_p` is defined. Once more code is moved over in latter
commits, that can go away.
Progress towards #17191
- - - - -
41130a65 by John Ericson at 2023-10-11T16:02:11-04:00
RTS configure: Move over `__thread` check
This used by (@bgamari thinks) the `GCThread` abstraction in the RTS.
All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.
Progress towards #17191
- - - - -
cc5ec2bd by John Ericson at 2023-10-11T16:02:11-04:00
RTS configure: Move over misc function checks
These are for general use in the RTS.
All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.
Progress towards #17191
- - - - -
809e7c2d by John Ericson at 2023-10-11T16:02:11-04:00
RTS configure: Move over `eventfd` check
This check is for the RTS part of the event manager and has a
corresponding part in `base`.
All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.
Progress towards #17191
- - - - -
58f3babf by John Ericson at 2023-10-11T16:02:48-04:00
Split `FP_CHECK_PTHREADS` and move part to RTS configure
`NEED_PTHREAD_LIB` is unused since
3609340743c1b25fdfd0e18b1670dac54c8d8623 (part of the make build
system), and so is no longer defined.
Progress towards #17191
- - - - -
e99cf237 by Moritz Angermann at 2023-10-11T16:03:24-04:00
nativeGen: section flags for .text$foo only
Commit 3ece9856d157c85511d59f9f862ab351bbd9b38b, was supposed to fix
#22834 in !9810.
It does however add "xr" indiscriminatly to .text sections
even if splitSections is disabled. This leads to the assembler saying:
ghc_1.s:7849:0: error:
Warning: Ignoring changed section attributes for .text
|
7849 | .section .text,"xr"
| ^
- - - - -
f383a242 by Sylvain Henry at 2023-10-11T16:04:04-04:00
Modularity: pass TempDir instead of DynFlags (#17957)
- - - - -
34fc28b0 by John Ericson at 2023-10-12T06:48:28-04:00
Test that functions from `mingwex` are available
Ryan wrote these two minimizations, but they never got added to the test
suite.
See #23309, #23378
Co-Authored-By: Ben Gamari <bgamari.foss at gmail.com>
Co-Authored-By: Ryan Scott <ryan.gl.scott at gmail.com>
- - - - -
bdb54a0e by John Ericson at 2023-10-12T06:48:28-04:00
Do not check for the `mingwex` library in `/configure`
See the recent discussion in !10360 --- Cabal will itself check for the
library for the packages that need it, and while the autoconf check
additionally does some other things like define a `HAS_LIBMINGWEX` C
Preprocessor macro, those other things are also unused and unneeded.
Progress towards #17191, which aims to get rid of `/configure` entirely.
- - - - -
43e814e1 by Ben Gamari at 2023-10-12T06:49:40-04:00
base: Introduce move modules into src
The only non-move changes here are whitespace changes to pass the
`whitespace` test and a few testsuite adaptations.
- - - - -
df81536f by Moritz Angermann at 2023-10-12T06:50:16-04:00
[PEi386 linker] Bounds check and null-deref guard
We should resonably be able to expect that we won't exceed the number of
sections if we assume to be dealing with legal object files. We can however
not guarantee that we get some negative values, and while we try to
special case most, we should exclude negative indexing into the sections
array.
We also need to ensure that we do not try to derefences targetSection,
if it is NULL, due to the switch statement.
- - - - -
c74c4f00 by John Ericson at 2023-10-12T10:31:13-04:00
Move apple compat check to RTS configure
- - - - -
c80778ea by John Ericson at 2023-10-12T10:31:13-04:00
Move clock/timer fun checks to RTS configure
Actual library check (which will set the Cabal flag) is left in the
top-level configure for now.
Progress towards #17191
- - - - -
7f9f2686 by John Ericson at 2023-10-12T10:31:13-04:00
Move visibility and "musttail" annotation checks to the RTS configure
All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.
Progress towards #17191
- - - - -
ffb3efe6 by John Ericson at 2023-10-12T10:31:13-04:00
Move leading underscore checks to RTS configure
`CabalLeadingUnderscore` is done via Hadrian already, so we can stop
`AC_SUBST`ing it completely.
- - - - -
25fa4b02 by John Ericson at 2023-10-12T10:31:13-04:00
Move alloca, fork, const, and big endian checks to RTS configure
All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.
- - - - -
5170f42a by John Ericson at 2023-10-12T10:31:13-04:00
Move libdl check to RTS configure
- - - - -
ea7a1447 by John Ericson at 2023-10-12T10:31:13-04:00
Adjust `FP_FIND_LIBFFI`
Just set vars, and `AC_SUBST` in top-level configure.
Don't define `HAVE_SYSTEM_LIBFFI` because nothing is using it. It hasn't
be in used since 3609340743c1b25fdfd0e18b1670dac54c8d8623 (part of the
make build system).
- - - - -
f399812c by John Ericson at 2023-10-12T10:31:13-04:00
Split BFD support to RTS configure
The flag is still in the top-level configure, but the other checks
(which define various macros --- important) are in the RTS configure.
- - - - -
f64f44e9 by John Ericson at 2023-10-12T10:31:13-04:00
Split libm check between top level and RTS
- - - - -
dafc4709 by Moritz Angermann at 2023-10-12T10:31:49-04:00
CgUtils.fixStgRegStmt respect register width
This change ensure that the reg + offset computation is always of the
same size. Before this we could end up with a 64bit register, and then
add a 32bit offset (on 32bit platforms). This not only would fail type
sanity checking, but also incorrectly truncate 64bit values into 32bit
values silently on 32bit architectures.
- - - - -
9e6ef7ba by Matthew Pickering at 2023-10-12T20:35:00-04:00
hadrian: Decrease verbosity of cabal commands
In Normal, most tools do not produce output to stdout unless there are
error conditions.
Reverts 7ed65f5a1bc8e040e318ccff395f53a9bbfd8217
- - - - -
08fc27af by John Ericson at 2023-10-12T20:35:36-04:00
Do not substitute `@...@` for stage-specific values in cabal files
`rts` and `ghc-prim` now no longer have a `*.cabal.in` to set Cabal flag
defaults; instead manual choices are passed to configure in the usual
way.
The old way was fundamentally broken, because it meant we were baking
these Cabal files for a specific stage. Now we only do stage-agnostic
@...@ substitution in cabal files (the GHC version), and so all
stage-specific configuration is properly confined to `_build` and the
right stage dir.
Also `include-ghc-prim` is a flag that no longer exists for `ghc-prim`
(it was removed in 835d8ddbbfb11796ea8a03d1806b7cee38ba17a6) so I got
rid of it.
Co-Authored-By: Matthew Pickering <matthewtpickering at gmail.com>
- - - - -
a0ac8785 by Sebastian Graf at 2023-10-14T19:17:12-04:00
Fix restarts in .ghcid
Using the whole of `hadrian/` restarted in a loop for me.
- - - - -
fea9ecdb by Sebastian Graf at 2023-10-14T19:17:12-04:00
CorePrep: Refactor FloatingBind (#23442)
A drastically improved architecture for local floating in CorePrep
that decouples the decision of whether a float is going to be let- or case-bound
from how far it can float (out of strict contexts, out of lazy contexts, to
top-level).
There are a couple of new Notes describing the effort:
* `Note [Floating in CorePrep]` for the overview
* `Note [BindInfo and FloatInfo]` for the new classification of floats
* `Note [Floats and FloatDecision]` for how FloatInfo is used to inform
floating decisions
This is necessary ground work for proper treatment of Strict fields and
unlifted values at top-level.
Fixes #23442.
NoFib results (omitted = 0.0%):
```
--------------------------------------------------------------------------------
Program Allocs Instrs
--------------------------------------------------------------------------------
pretty 0.0% -1.6%
scc 0.0% -1.7%
--------------------------------------------------------------------------------
Min 0.0% -1.7%
Max 0.0% -0.0%
Geometric Mean -0.0% -0.0%
```
- - - - -
32523713 by Matthew Pickering at 2023-10-14T19:17:49-04:00
hadrian: Move ghcBinDeps into ghcLibDeps
This completes a5227080b57cb51ac34d4c9de1accdf6360b818b, the
`ghc-usage.txt` and `ghci-usage.txt` file are also used by the `ghc`
library so need to make sure they are present in the libdir even if we
are not going to build `ghc-bin`.
This also fixes things for cross compilers because the stage2
cross-compiler requires the ghc-usage.txt file, but we are using
the stage2 lib folder but not building stage3:exe:ghc-bin so
ghc-usage.txt was not being generated.
- - - - -
ec3c4488 by sheaf at 2023-10-14T19:18:29-04:00
Combine GREs when combining in mkImportOccEnv
In `GHC.Rename.Names.mkImportOccEnv`, we sometimes discard one import
item in favour of another, as explained in Note [Dealing with imports]
in `GHC.Rename.Names`. However, this can cause us to lose track of
important parent information.
Consider for example #24084:
module M1 where { class C a where { type T a } }
module M2 ( module M1 ) where { import M1 }
module M3 where { import M2 ( C, T ); instance C () where T () = () }
When processing the import list of `M3`, we start off (for reasons that
are not relevant right now) with two `Avail`s attached to `T`, namely
`C(C, T)` and `T(T)`. We combine them in the `combine` function of
`mkImportOccEnv`; as described in Note [Dealing with imports] we discard
`C(C, T)` in favour of `T(T)`. However, in doing so, we **must not**
discard the information want that `C` is the parent of `T`. Indeed,
losing track of this information can cause errors when importing,
as we could get an error of the form
‘T’ is not a (visible) associated type of class ‘C’
We fix this by combining the two GREs for `T` using `plusGRE`.
Fixes #24084
- - - - -
257c2807 by Ilias Tsitsimpis at 2023-10-14T19:19:07-04:00
hadrian: Pass -DNOSMP to C compiler when needed
Hadrian passes the -DNOSMP flag to GHC when the target doesn't support
SMP, but doesn't pass it to CC as well, leading to the following
compilation error on mips64el:
| Run Cc (FindCDependencies CDep) Stage1: rts/sm/NonMovingScav.c => _build/stage1/rts/build/c/sm/NonMovingScav.o.d
Command line: /usr/bin/mips64el-linux-gnuabi64-gcc -E -MM -MG -MF _build/stage1/rts/build/c/hooks/FlagDefaults.thr_debug_p_o.d -MT _build/stage1/rts/build/c/hooks/FlagDefaults.o -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -x c rts/hooks/FlagDefaults.c -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Wpointer-arith -Wmissing-noreturn -Wnested-externs -Wredundant-decls -Wundef -fno-strict-aliasing -DTHREADED_RTS -DDEBUG -fomit-frame-pointer -O2 -g -Irts -I_build/stage1/rts/build -DDEBUG -fno-omit-frame-pointer -g3 -O0
===> Command failed with error code: 1
In file included from rts/include/Stg.h:348,
from rts/include/Rts.h:38,
from rts/hooks/FlagDefaults.c:8:
rts/include/stg/SMP.h:416:2: error: #error memory barriers unimplemented on this architecture
416 | #error memory barriers unimplemented on this architecture
| ^~~~~
rts/include/stg/SMP.h:440:2: error: #error memory barriers unimplemented on this architecture
440 | #error memory barriers unimplemented on this architecture
| ^~~~~
rts/include/stg/SMP.h:464:2: error: #error memory barriers unimplemented on this architecture
464 | #error memory barriers unimplemented on this architecture
| ^~~~~
The old make system correctly passed this flag to both GHC and CC [1].
Fix this error by passing -DNOSMP to CC as well.
[1] https://gitlab.haskell.org/ghc/ghc/-/blob/00920f176b0235d5bb52a8e054d89a664f8938fe/rts/ghc.mk#L407
Closes #24082
- - - - -
13d3c613 by John Ericson at 2023-10-14T19:19:42-04:00
Users Guide: Drop dead code for Haddock refs to `parallel`
I noticed while working on !11451 that `@LIBRARY_parallel_UNIT_ID@` was
not substituted. It is dead code -- there is no `parallel-ref` usages
and it doesn't look like there ever was (going back to
3e5d0f188d6c8633e55e9ba6c8941c07e459fa4b), so let's delete it.
- - - - -
cf481cf0 by Matthew Pickering at 2023-10-17T15:38:37+01:00
packaging: Enable late-ccs for perf (and hence release) flavours
This enables late cost centres when building profiled libraries and
subsequently greatly improves the resolution of cost centre stacks when
profiling.
Fixes #21732
- - - - -
4a301a1d by Matthew Pickering at 2023-10-17T15:38:58+01:00
late cost centre: Don't insert cost centre for exprIsWorkFree
- - - - -
19 changed files:
- .ghcid
- .gitignore
- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/generate-ci/generate-job-metadata
- .gitlab/generate-ci/generate-jobs
- .gitlab/issue_templates/bug.md → .gitlab/issue_templates/default.md
- .gitlab/jobs.yaml
- .gitlab/merge_request_templates/Default.md
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- .gitlab/rel_eng/upload.sh
- .gitlab/rel_eng/upload_ghc_libs.py
- .gitlab/test-metrics.sh
- README.md
- compiler/CodeGen.Platform.h
- compiler/GHC.hs
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Names/TH.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/df1e3d3731b45a0cc024b6fd4e815e774ebad4d0...4a301a1de2bf5bb65d330133028a32e8c5390b91
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/df1e3d3731b45a0cc024b6fd4e815e774ebad4d0...4a301a1de2bf5bb65d330133028a32e8c5390b91
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/20231017/7271a9df/attachment-0001.html>
More information about the ghc-commits
mailing list