Ben Gamari deleted branch wip/backports-9.14 at Glasgow Haskell Compiler / GHC
--
You're receiving this email because of your account on gitlab.haskell.org.
1
0

[Git][ghc/ghc][wip/T26267] 53 commits: compiler: Export a version of `newNameCache` that is not prone to footguns.
by Ben Gamari (@bgamari) 18 Aug '25
by Ben Gamari (@bgamari) 18 Aug '25
18 Aug '25
Ben Gamari pushed to branch wip/T26267 at Glasgow Haskell Compiler / GHC
Commits:
bcdec657 by Zubin Duggal at 2025-08-05T10:37:29+05:30
compiler: Export a version of `newNameCache` that is not prone to footguns.
`newNameCache` must be initialized with both a non-"reserved" unique tag, as well
as a list of known key names. Failing to do so results in hard to debug unique conflicts.
It is difficult for API users to tell which unique tags are safe to use. So instead of leaving
this up to the user to decide, we now export a version of `newNameCache` which uses a guaranteed
non-reserved unique tag. In fact, this is now the way the unique tag is initialized for all invocations
of the compiler.
The original version of `newNameCache` is now exported as `newNameCache'` for advanced users.
We also deprecate `initNameCache` as it is also prone to footguns and is completely subsumed in
functionality by `newNameCache` and `newNameCache'`.
Fixes #26135 and #26055
- - - - -
57d3b4a8 by Andrew Lelechenko at 2025-08-05T18:36:31-04:00
hadrian: bump Stackage snapshot to LTS 24.2 / GHC 9.10.2
In line with #25693 we should use GHC 9.10 as a boot compiler,
while Hadrian stack.yaml was stuck on GHC 9.6.
- - - - -
c2a78cea by Peng Fan at 2025-08-05T18:37:27-04:00
NCG/LA64: implement atomic write with finer-grained DBAR hints
Signed-off-by: Peng Fan <fanpeng(a)loongson.cn>
- - - - -
95231c8e by Teo Camarasu at 2025-08-06T08:35:58-04:00
CODEOWNERS: add CLC as codeowner of base
We also remove hvr, since I think he is no longer active
- - - - -
77df0ded by Andrew Lelechenko at 2025-08-06T08:36:39-04:00
Bump submodule text to 2.1.3
- - - - -
8af260d0 by Nikolaos Chatzikonstantinou at 2025-08-06T08:37:23-04:00
docs: fix internal import in getopt examples
This external-facing doc example shouldn't mention GHC internals when
using 'fromMaybe'.
- - - - -
69cc16ca by Marc Scholten at 2025-08-06T15:51:28-04:00
README: Add note on ghc.nix
- - - - -
93a2f450 by Daniel Díaz at 2025-08-06T15:52:14-04:00
Link to the "Strict Bindings" docs from the linear types docs
Strict Bidings are relevant for the kinds of multiplicity annotations
linear lets support.
- - - - -
246b7853 by Matthew Pickering at 2025-08-07T06:58:30-04:00
level imports: Check the level of exported identifiers
The level imports specification states that exported identifiers have to
be at level 0. This patch adds the requird level checks that all
explicitly mentioned identifiers occur at level 0.
For implicit export specifications (T(..) and module B), only level 0
identifiers are selected for re-export.
ghc-proposal: https://github.com/ghc-proposals/ghc-proposals/pull/705
Fixes #26090
- - - - -
358bc4fc by fendor at 2025-08-07T06:59:12-04:00
Bump GHC on darwin CI to 9.10.1
- - - - -
1903ae35 by Matthew Pickering at 2025-08-07T12:21:10+01:00
ipe: Place strings and metadata into specific .ipe section
By placing the .ipe metadata into a specific section it can be stripped
from the final binary if desired.
```
objcopy --remove-section .ipe <binary>
upx <binary>
```
Towards #21766
- - - - -
c80dd91c by Matthew Pickering at 2025-08-07T12:22:42+01:00
ipe: Place magic word at the start of entries in the .ipe section
The magic word "IPE\nIPE\n" is placed at the start of .ipe sections,
then if the section is stripped, we can check whether the section starts
with the magic word or not to determine whether there is metadata
present or not.
Towards #21766
- - - - -
cab42666 by Matthew Pickering at 2025-08-07T12:22:42+01:00
ipe: Use stable IDs for IPE entries
IPEs have historically been indexed and reported by their address.
This makes it impossible to compare profiles between runs, since the
addresses may change (due to ASLR) and also makes it tricky to separate
out the IPE map from the binary.
This small patch adds a stable identifier for each IPE entry.
The stable identifier is a single 64 bit word. The high-bits are a
per-module identifier and the low bits identify which entry in each
module.
1. When a node is added into the IPE buffer it is assigned a unique
identifier from an incrementing global counter.
2. Each entry already has an index by it's position in the
`IpeBufferListNode`.
The two are combined together by the `IPE_ENTRY_KEY` macro.
Info table profiling uses the stable identifier rather than the address
of the info table.
The benefits of this change are:
* Profiles from different runs can be easily compared
* The metadata can be extracted from the binary (via the eventlog for
example) and then stripped from the executable.
Fixes #21766
- - - - -
2860a9a5 by Simon Peyton Jones at 2025-08-07T20:29:18-04:00
In TcSShortCut, typechecker plugins should get empty Givens
Solving in TcShortCut mode means /ignoring the Givens/. So we
should not pass them to typechecker plugins!
Fixes #26258.
This is a fixup to the earlier MR:
commit 1bd12371feacc52394a0e660ef9349f9e8ee1c06
Author: Simon Peyton Jones <simon.peytonjones(a)gmail.com>
Date: Mon Jul 21 10:04:49 2025 +0100
Improve treatment of SPECIALISE pragmas -- again!
- - - - -
2157db2d by sterni at 2025-08-08T15:32:39-04:00
hadrian: enable terminfo if --with-curses-* flags are given
The GHC make build system used to support WITH_TERMINFO in ghc.mk which
allowed controlling whether to build GHC with terminfo or not. hadrian
has replaced this with a system where this is effectively controlled by
the cross-compiling setting (the default WITH_TERMINFO value was bassed
on CrossCompiling, iirc).
This behavior is undesireable in some cases and there is not really a
good way to work around it. Especially for downstream packagers,
modifying this via UserSettings is not really feasible since such a
source file has to be kept in sync with Settings/Default.hs manually
since it can't import Settings.Default or any predefined Flavour
definitions.
To avoid having to add a new setting to cfg/system.config and/or a new
configure flag (though I'm happy to implement both if required), I've
chosen to take --with-curses-* being set explicitly as an indication
that the user wants to have terminfo enabled. This would work for
Nixpkgs which sets these flags [1] as well as haskell.nix [2] (which
goes to some extreme measures [3] [4] to force terminfo in all scenarios).
In general, I'm an advocate for making the GHC build be the same for
native and cross insofar it is possible since it makes packaging GHC and
Haskell related things while still supporting cross much less
compilicated. A more minimal GHC with reduced dependencies should
probably be a specific flavor, not the default.
Partially addresses #26288 by forcing terminfo to be built if the user
explicitly passes configure flags related to it. However, it isn't built
by default when cross-compiling yet nor is there an explicit way to
control the package being built.
[1]: https://github.com/NixOS/nixpkgs/blob/3a7266fcefcb9ce353df49ba3f292d0644376…
[2]: https://github.com/input-output-hk/haskell.nix/blob/6eaafcdf04bab7be745d1aa…
[3]: https://github.com/input-output-hk/haskell.nix/blob/6eaafcdf04bab7be745d1aa…
[4]: https://github.com/input-output-hk/haskell.nix/blob/6eaafcdf04bab7be745d1aa…
- - - - -
b3c31488 by David Feuer at 2025-08-08T15:33:21-04:00
Add default QuasiQuoters
Add `defaultQuasiQuoter` and `namedDefaultQuasiQuoter` to make it easier
to write `QuasiQuoters` that give helpful error messages when they're
used in inappropriate contexts.
Closes #24434.
- - - - -
03555ed8 by Sylvain Henry at 2025-08-10T22:20:57-04:00
Handle non-fractional CmmFloats in Cmm's CBE (#26229)
Since f8d9d016305be355f518c141f6c6d4826f2de9a2, toRational for Float and
Double converts float's infinity and NaN into Rational's infinity and
NaN (respectively 1%0 and 0%0).
Cmm CommonBlockEliminator hashing function needs to take these values
into account as they can appear as literals now. See added testcase.
- - - - -
6c956af3 by J. Ryan Stinnett at 2025-08-10T22:21:42-04:00
Fix extensions list in `DoAndIfThenElse` docs
- - - - -
6dc420b1 by J. Ryan Stinnett at 2025-08-10T22:21:42-04:00
Document status of `RelaxedPolyRec` extension
This adds a brief extension page explaining the status of the
`RelaxedPolyRec` extension. The behaviour of this mode is already
explained elsewhere, so this page is mainly for completeness so that
various lists of extensions have somewhere to point to for this flag.
Fixes #18630
- - - - -
18036d52 by Simon Peyton Jones at 2025-08-11T11:31:20-04:00
Take more care in zonkEqTypes on AppTy/AppTy
This patch fixes #26256.
See Note [zonkEqTypes and the PKTI] in GHC.Tc.Solver.Equality
- - - - -
c8d76a29 by Zubin Duggal at 2025-08-11T11:32:02-04:00
ci: upgrade bootstrap compiler on windows to 9.10.1
- - - - -
34fc50c1 by Ben Gamari at 2025-08-11T13:36:25-04:00
Kill IOPort#
This type is unnecessary, having been superceded by `MVar` and a rework
of WinIO's blocking logic.
See #20947.
See https://github.com/haskell/core-libraries-committee/issues/213.
- - - - -
56b32c5a by sheaf at 2025-08-12T10:00:19-04:00
Improve deep subsumption
This commit improves the DeepSubsumption sub-typing implementation
in GHC.Tc.Utils.Unify.tc_sub_type_deep by being less eager to fall back
to unification.
For example, we now are properly able to prove the subtyping relationship
((∀ a. a->a) -> Int) -> Bool <= β[tau] Bool
for an unfilled metavariable β. In this case (with an AppTy on the right),
we used to fall back to unification. No longer: now, given that the LHS
is a FunTy and that the RHS is a deep rho type (does not need any instantiation),
we try to make the RHS into a FunTy, viz.
β := (->) γ
We can then continue using covariance & contravariance of the function
arrow, which allows us to prove the subtyping relationship, instead of
trying to unify which would cause us to error out with:
Couldn't match expected type ‘β’ with actual type ‘(->) ((∀ a. a -> a) -> Int)
See Note [FunTy vs non-FunTy case in tc_sub_type_deep] in GHC.Tc.Utils.Unify.
The other main improvement in this patch concerns type inference.
The main subsumption logic happens (before & after this patch) in
GHC.Tc.Gen.App.checkResultTy. However, before this patch, all of the
DeepSubsumption logic only kicked in in 'check' mode, not in 'infer' mode.
This patch adds deep instantiation in the 'infer' mode of checkResultTy
when we are doing deep subsumption, which allows us to accept programs
such as:
f :: Int -> (forall a. a->a)
g :: Int -> Bool -> Bool
test1 b =
case b of
True -> f
False -> g
test2 b =
case b of
True -> g
False -> f
See Note [Deeply instantiate in checkResultTy when inferring].
Finally, we add representation-polymorphism checks to ensure that the
lambda abstractions we introduce when doing subsumption obey the
representation polymorphism invariants of Note [Representation polymorphism invariants]
in GHC.Core. See Note [FunTy vs FunTy case in tc_sub_type_deep].
This is accompanied by a courtesy change to `(<.>) :: HsWrapper -> HsWrapper -> HsWrapper`,
adding the equation:
WpCast c1 <.> WpCast c2 = WpCast (c1 `mkTransCo` c2)
This is useful because mkWpFun does not introduce an eta-expansion when
both of the argument & result wrappers are casts; so this change allows
us to avoid introducing lambda abstractions when casts suffice.
Fixes #26225
- - - - -
d175aff8 by Sylvain Henry at 2025-08-12T10:01:31-04:00
Add regression test for #18619
- - - - -
a3983a26 by Sylvain Henry at 2025-08-12T10:02:20-04:00
RTS: remove some TSAN annotations (#20464)
Use RELAXED_LOAD_ALWAYS macro instead.
- - - - -
0434af81 by Ben Gamari at 2025-08-12T10:03:02-04:00
Bump time submodule to 1.15
Also required bumps of Cabal, directory, and hpc.
- - - - -
62899117 by Florian Ragwitz at 2025-08-13T21:01:34-04:00
Extend record-selector usage ticking to all binds using a record field
This extends the previous handling of ticking for RecordWildCards and
NamedFieldPuns to all var bindings that involve record selectors.
Note that certain patterns such as `Foo{foo = 42}` will currently not tick the
`foo` selector, as ticking is triggered by `HsVar`s.
Closes #26191.
- - - - -
b37b3af7 by Florian Ragwitz at 2025-08-13T21:01:34-04:00
Add release notes for 9.16.1 and move description of latest HPC changes there.
- - - - -
a5e4b7d9 by Ben Gamari at 2025-08-13T21:02:18-04:00
rts: Clarify rationale for undefined atomic wrappers
Since c06e3f46d24ef69f3a3d794f5f604cb8c2a40cbc the RTS has declared
various atomic operation wrappers defined by ghc-internal as undefined.
While the rationale for this isn't clear from the commit message, I
believe that this is necessary due to the unregisterised backend.
Specifically, the code generator will reference these symbols when
compiling RTS Cmm sources.
- - - - -
50842f83 by Andreas Klebinger at 2025-08-13T21:03:01-04:00
Make unexpected LLVM versions a warning rather than an error.
Typically a newer LLVM version *will* work so erroring out if
a user uses a newer LLVM version is too aggressive.
Fixes #25915
- - - - -
c91e2650 by fendor at 2025-08-13T21:03:43-04:00
Store `StackTrace` and `StackSnapshot` in `Backtraces`
Instead of decoding the stack traces when collecting the `Backtraces`,
defer this decoding until actually showing the `Backtraces`.
This allows users to customise how `Backtraces` are displayed by
using a custom implementation of `displayExceptionWithInfo`, overwriting
the default implementation for `Backtraces` (`displayBacktraces`).
- - - - -
dee28cdd by fendor at 2025-08-13T21:03:43-04:00
Allow users to customise the collection of exception annotations
Add a global `CollectExceptionAnnotationMechanism` which determines how
`ExceptionAnnotation`s are collected upon throwing an `Exception`.
This API is exposed via `ghc-experimental`.
By overriding how we collect `Backtraces`, we can control how the
`Backtraces` are displayed to the user by newtyping `Backtraces` and
giving a different instance for `ExceptionAnnotation`.
A concrete use-case for this feature is allowing us to experiment with
alternative stack decoders, without having to modify `base`, which take
additional information from the stack frames.
This commit does not modify how `Backtraces` are currently
collected or displayed.
- - - - -
66024722 by fendor at 2025-08-13T21:03:43-04:00
Expose Backtraces internals from ghc-experimental
Additionally, expose the same API `base:Control.Exception.Backtrace`
to make it easier to use as a drop-in replacement.
- - - - -
a766286f by Reed Mullanix at 2025-08-13T21:04:36-04:00
ghc-internal: Fix naturalAndNot for NB/NS case
When the first argument to `naturalAndNot` is larger than a `Word` and the second is `Word`-sized, `naturalAndNot` will truncate the
result:
```
>>> naturalAndNot ((2 ^ 65) .|. (2 ^ 3)) (2 ^ 3)
0
```
In contrast, `naturalAndNot` does not truncate when both arguments are larger than a `Word`, so this appears to be a bug.
Luckily, the fix is pretty easy: we just need to call `bigNatAndNotWord#` instead of truncating.
Fixes #26230
- - - - -
3506fa7d by Simon Hengel at 2025-08-13T21:05:18-04:00
Report -pgms as a deprecated flag
(instead of reporting an unspecific warning)
Before:
on the commandline: warning:
Object splitting was removed in GHC 8.8
After:
on the commandline: warning: [GHC-53692] [-Wdeprecated-flags]
-pgms is deprecated: Object splitting was removed in GHC 8.8
- - - - -
51c701fe by Zubin Duggal at 2025-08-13T21:06:00-04:00
testsuite: Be more permissive when filtering out GNU_PROPERTY_TYPE linker warnings
The warning text is slightly different with ld.bfd.
Fixes #26249
- - - - -
dfe6f464 by Simon Hengel at 2025-08-13T21:06:43-04:00
Refactoring: Don't misuse `MCDiagnostic` for lint messages
`MCDiagnostic` is meant to be used for compiler diagnostics.
Any code that creates `MCDiagnostic` directly, without going through
`GHC.Driver.Errors.printMessage`, side steps `-fdiagnostics-as-json`
(see e.g. !14475, !14492 !14548).
To avoid this in the future I want to control more narrowly who creates
`MCDiagnostic` (see #24113).
Some parts of the compiler use `MCDiagnostic` purely for formatting
purposes, without creating any real compiler diagnostics. This change
introduces a helper function, `formatDiagnostic`, that can be used in
such cases instead of constructing `MCDiagnostic`.
- - - - -
a8b2fbae by Teo Camarasu at 2025-08-13T21:07:24-04:00
rts: ensure MessageBlackHole.link is always a valid closure
We turn a MessageBlackHole into an StgInd in wakeBlockingQueue().
Therefore it's important that the link field, which becomes the
indirection field, always points to a valid closure.
It's unclear whether it's currently possible for the previous behaviour
to lead to a crash, but it's good to be consistent about this invariant nonetheless.
Co-authored-by: Andreas Klebinger <klebinger.andreas(a)gmx.at>
- - - - -
4021181e by Teo Camarasu at 2025-08-13T21:07:24-04:00
rts: spin if we see a WHITEHOLE in messageBlackHole
When a BLACKHOLE gets cancelled in raiseAsync, we indirect to a THUNK.
GC can then shortcut this, replacing our BLACKHOLE with a fresh THUNK.
This THUNK is not guaranteed to have a valid indirectee field.
If at the same time, a message intended for the previous BLACKHOLE is
processed and concurrently we BLACKHOLE the THUNK, thus temporarily
turning it into a WHITEHOLE, we can get a segfault, since we look at the
undefined indirectee field of the THUNK
The fix is simple: spin if we see a WHITEHOLE, and it will soon be
replaced with a valid BLACKHOLE.
Resolves #26205
- - - - -
1107af89 by Oleg Grenrus at 2025-08-13T21:08:06-04:00
Allow defining HasField instances for naughty fields
Resolves #26295
... as HasField solver doesn't solve for fields with "naughty"
selectors, we could as well allow defining HasField instances for these
fields.
- - - - -
020e7587 by Sylvain Henry at 2025-08-13T21:09:00-04:00
Fix Data.List unqualified import warning
- - - - -
fd811ded by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Make injecting implicit bindings into its own pass
Previously we were injecting "impliicit bindings" (data constructor
worker and wrappers etc)
- both at the end of CoreTidy,
- and at the start of CorePrep
This is unpleasant and confusing. This patch puts it it its own pass,
addImplicitBinds, which runs between the two.
The function `GHC.CoreToStg.AddImplicitBinds.addImplicitBinds` now takes /all/
TyCons, not just the ones for algebraic data types. That change ripples
through to
- corePrepPgm
- doCodeGen
- byteCodeGen
All take [TyCon] which includes all TyCons
- - - - -
9bd7fcc5 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Implement unary classes
The big change is described exhaustively in
Note [Unary class magic] in GHC.Core.TyCon
Other changes
* We never unbox class dictionaries in worker/wrapper. This has been true for some
time now, but the logic is now centralised in functions in
GHC.Core.Opt.WorkWrap.Utils, namely `canUnboxTyCon`, and `canUnboxArg`
See Note [Do not unbox class dictionaries] in GHC.Core.Opt.WorkWrap.Utils.
* Refactored the `notWorthFloating` logic in GHc.Core.Opt.SetLevels.
I can't remember if I actually changed any behaviour here, but if so it's
only in a corner cases.
* Fixed a bug in `GHC.Core.TyCon.isEnumerationTyCon`, which was wrongly returning
True for (##).
* Remove redundant Role argument to `liftCoSubstWithEx`. It was always
Representational.
* I refactored evidence generation in the constraint solver:
* Made GHC.Tc.Types.Evidence contain better abstactions for evidence
generation.
* I deleted the file `GHC.Tc.Types.EvTerm` and merged its (small) contents
elsewhere. It wasn't paying its way.
* Made evidence for implicit parameters go via a proper abstraction.
* Fix inlineBoringOk; see (IB6) in Note [inlineBoringOk]
This fixes a slowdown in `countdownEffectfulDynLocal`
in the `effectful` library.
Smaller things
* Rename `isDataTyCon` to `isBoxedDataTyCon`.
* GHC.Core.Corecion.liftCoSubstWithEx was only called with Representational role,
so I baked that into the function and removed the argument.
* Get rid of `GHC.Core.TyCon.tyConSingleAlgDataCon_maybe` in favour of calling
`not isNewTyCon` at the call sites; more explicit.
* Refatored `GHC.Core.TyCon.isInjectiveTyCon`; but I don't think I changed its
behaviour
* Moved `decomposeIPPred` to GHC.Core.Predicate
Compile time performance changes:
geo. mean +0.1%
minimum -6.8%
maximum +14.4%
The +14% one is in T21839c, where it seems that a bit more inlining
is taking place. That seems acceptable; and the average change is small
Metric Decrease:
LargeRecord
T12227
T12707
T16577
T21839r
T5642
Metric Increase:
T15164
T21839c
T3294
T5321FD
T5321Fun
WWRec
- - - - -
b4075d71 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Slight improvement to pre/postInlineUnconditionally
Avoids an extra simplifier iteration
- - - - -
9e443596 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Fix a long-standing assertion error in normSplitTyConApp_maybe
- - - - -
91310ad0 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Add comment to coercion optimiser
- - - - -
5b841d82 by Teo Camarasu at 2025-08-14T17:57:56-04:00
template-haskell: move some identifiers from ghc-internal to template-haskell
These identifiers are not used internally by the compiler. Therefore we
have no reason for them to be in ghc-internal.
By moving them to template-haskell, we benefit from it being easier to
change them and we avoid having to build them in stage0.
Resolves #26048
- - - - -
33e2c7e5 by Teo Camarasu at 2025-08-14T17:57:56-04:00
template-haskell: transfer $infix note to public module
This Haddock note should be in the public facing module
- - - - -
2a411fc4 by Sylvain Henry at 2025-08-14T17:59:09-04:00
JS: export HEAP8 symbol (#26290)
Newer Emscripten requires this.
- - - - -
248f78ca by Ben Gamari at 2025-08-14T17:59:51-04:00
users-guide: Drop the THREAD_RUNNABLE event
As of f361281c89fbce42865d8b8b27b0957205366186 it is no longer emitted.
- - - - -
706d33e3 by Recursion Ninja at 2025-08-15T04:12:12-04:00
Resolving issues #20645 and #26109
Correctly sign extending and casting smaller bit width types for LLVM operations:
- bitReverse8#
- bitReverse16#
- bitReverse32#
- byteSwap16#
- byteSwap32#
- pdep8#
- pdep16#
- pext8#
- pext16#
- - - - -
1cdc6f46 by Cheng Shao at 2025-08-15T04:12:56-04:00
hadrian: enforce have_llvm=False for wasm32/js
This patch fixes hadrian to always pass have_llvm=False to the
testsuite driver for wasm32/js targets. These targets don't really
support the LLVM backend, and the optllvm test way doesn't work. We
used to special-case wasm32/js to avoid auto-adding optllvm way in
testsuite/config/ghc, but this is still problematic if someone writes
a new LLVM-related test and uses something like when(have_llvm(),
extra_ways(["optllvm"])). So better just enforce have_llvm=False for
these targets here.
- - - - -
ca03226d by Ben Gamari at 2025-08-18T13:43:20+00:00
configure: Allow use of LLVM 20
- - - - -
309 changed files:
- .gitlab/darwin/toolchain.nix
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- CODEOWNERS
- README.md
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/PrimOps/Ids.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Types/Prim.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/InfoTable.hs
- compiler/GHC/Cmm.hs
- compiler/GHC/Cmm/CommonBlockElim.hs
- compiler/GHC/CmmToAsm/LA64/CodeGen.hs
- compiler/GHC/CmmToAsm/PPC/Ppr.hs
- compiler/GHC/CmmToAsm/Ppr.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/CmmToLlvm/Data.hs
- compiler/GHC/Core/Class.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Unfold.hs
- compiler/GHC/Core/Unfold/Make.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToStg.hs
- + compiler/GHC/CoreToStg/AddImplicitBinds.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Driver/Errors/Ppr.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Foreign/Call.hs
- compiler/GHC/HsToCore/Ticks.hs
- compiler/GHC/Iface/Decl.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Runtime/Debugger/Breakpoints.hs
- compiler/GHC/Stg/Lint.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm.hs
- compiler/GHC/StgToCmm/InfoTableProv.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToJS/Prim.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Instance/Family.hs
- compiler/GHC/Tc/Solver/Default.hs
- compiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/Solver/Equality.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Solver/Solve.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Build.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- − compiler/GHC/Tc/Types/EvTerm.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/Concrete.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/Tc/Utils/Unify.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Types/Demand.hs
- compiler/GHC/Types/Error.hs
- compiler/GHC/Types/Id.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Types/Name/Cache.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Types/RepType.hs
- compiler/GHC/Types/TyThing.hs
- compiler/GHC/Utils/Error.hs
- compiler/ghc.cabal.in
- configure.ac
- − docs/users_guide/9.14.1-notes.rst
- + docs/users_guide/9.16.1-notes.rst
- docs/users_guide/conf.py
- docs/users_guide/debug-info.rst
- docs/users_guide/eventlog-formats.rst
- docs/users_guide/expected-undocumented-flags.txt
- docs/users_guide/exts/doandifthenelse.rst
- docs/users_guide/exts/linear_types.rst
- + docs/users_guide/exts/relaxed_poly_rec.rst
- docs/users_guide/exts/strict.rst
- docs/users_guide/exts/types.rst
- docs/users_guide/release-notes.rst
- ghc/ghc-bin.cabal.in
- hadrian/src/Settings/Builders/RunTest.hs
- hadrian/src/Settings/Default.hs
- hadrian/src/Settings/Packages.hs
- hadrian/stack.yaml
- hadrian/stack.yaml.lock
- libraries/Cabal
- libraries/base/base.cabal.in
- libraries/base/changelog.md
- libraries/base/src/GHC/Exts.hs
- − libraries/base/src/GHC/IOPort.hs
- libraries/base/src/System/Console/GetOpt.hs
- libraries/directory
- libraries/ghc-bignum/changelog.md
- + libraries/ghc-experimental/src/GHC/Exception/Backtrace/Experimental.hs
- libraries/ghc-heap/GHC/Exts/Heap/Closures.hs
- libraries/ghc-internal/cbits/pdep.c
- libraries/ghc-internal/cbits/pext.c
- libraries/ghc-internal/ghc-internal.cabal.in
- libraries/ghc-internal/src/GHC/Internal/Bignum/Natural.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Windows.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/Thread.hs
- libraries/ghc-internal/src/GHC/Internal/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Exts.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Buffer.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Windows/Handle.hsc
- − libraries/ghc-internal/src/GHC/Internal/IOPort.hs
- libraries/ghc-internal/src/GHC/Internal/Prim/PtrEq.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Quote.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs
- + libraries/ghc-internal/tests/Makefile
- + libraries/ghc-internal/tests/all.T
- + libraries/ghc-internal/tests/backtraces/Makefile
- + libraries/ghc-internal/tests/backtraces/T14532a.hs
- + libraries/ghc-internal/tests/backtraces/T14532a.stdout
- + libraries/ghc-internal/tests/backtraces/T14532b.hs
- + libraries/ghc-internal/tests/backtraces/T14532b.stdout
- + libraries/ghc-internal/tests/backtraces/all.T
- libraries/ghc-prim/changelog.md
- libraries/hpc
- libraries/template-haskell/Language/Haskell/TH/Lib.hs
- libraries/template-haskell/Language/Haskell/TH/Quote.hs
- libraries/template-haskell/Language/Haskell/TH/Syntax.hs
- libraries/template-haskell/changelog.md
- libraries/template-haskell/tests/all.T
- libraries/text
- libraries/time
- libraries/unix
- rts/IPE.c
- rts/Messages.c
- rts/Prelude.h
- rts/PrimOps.cmm
- rts/ProfHeap.c
- rts/RtsSymbols.c
- rts/StgMiscClosures.cmm
- rts/Updates.h
- rts/eventlog/EventLog.c
- rts/external-symbols.list.in
- rts/include/rts/IPE.h
- rts/include/stg/MiscClosures.h
- rts/include/stg/SMP.h
- rts/js/mem.js
- rts/posix/ticker/Pthread.c
- rts/posix/ticker/TimerFd.c
- rts/rts.cabal
- rts/win32/AsyncWinIO.c
- rts/win32/libHSghc-internal.def
- testsuite/config/ghc
- testsuite/driver/testlib.py
- testsuite/tests/arrows/should_compile/T21301.stderr
- testsuite/tests/core-to-stg/T24124.stderr
- testsuite/tests/corelint/LintEtaExpand.stderr
- testsuite/tests/deSugar/should_compile/T2431.stderr
- testsuite/tests/deSugar/should_fail/DsStrictFail.stderr
- testsuite/tests/deSugar/should_run/T20024.stderr
- testsuite/tests/deSugar/should_run/dsrun005.stderr
- testsuite/tests/deSugar/should_run/dsrun007.stderr
- testsuite/tests/deSugar/should_run/dsrun008.stderr
- testsuite/tests/deriving/should_run/T9576.stderr
- testsuite/tests/dmdanal/should_compile/T16029.stdout
- testsuite/tests/dmdanal/sigs/T21119.stderr
- testsuite/tests/dmdanal/sigs/T21888.stderr
- testsuite/tests/ghci.debugger/scripts/break011.stdout
- testsuite/tests/ghci.debugger/scripts/break024.stdout
- testsuite/tests/ghci/scripts/Defer02.stderr
- testsuite/tests/ghci/scripts/T15325.stderr
- testsuite/tests/hiefile/should_run/TestUtils.hs
- testsuite/tests/hpc/recsel/recsel.hs
- testsuite/tests/hpc/recsel/recsel.stdout
- testsuite/tests/indexed-types/should_compile/T2238.hs
- testsuite/tests/indexed-types/should_fail/T5439.stderr
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/base-exports.stdout-ws-32
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
- testsuite/tests/interface-stability/ghc-prim-exports.stdout
- testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32
- testsuite/tests/interface-stability/template-haskell-exports.stdout
- + testsuite/tests/llvm/should_run/T20645.hs
- + testsuite/tests/llvm/should_run/T20645.stdout
- testsuite/tests/llvm/should_run/all.T
- testsuite/tests/numeric/should_compile/T15547.stderr
- testsuite/tests/numeric/should_compile/T23907.stderr
- + testsuite/tests/numeric/should_compile/T26229.hs
- testsuite/tests/numeric/should_compile/all.T
- + testsuite/tests/numeric/should_run/T18619.hs
- + testsuite/tests/numeric/should_run/T18619.stderr
- + testsuite/tests/numeric/should_run/T26230.hs
- + testsuite/tests/numeric/should_run/T26230.stdout
- testsuite/tests/numeric/should_run/all.T
- testsuite/tests/numeric/should_run/foundation.hs
- + testsuite/tests/overloadedrecflds/should_run/T26295.hs
- + testsuite/tests/overloadedrecflds/should_run/T26295.stdout
- testsuite/tests/overloadedrecflds/should_run/all.T
- testsuite/tests/partial-sigs/should_compile/T10403.stderr
- + testsuite/tests/partial-sigs/should_compile/T26256.hs
- + testsuite/tests/partial-sigs/should_compile/T26256.stderr
- testsuite/tests/partial-sigs/should_compile/all.T
- testsuite/tests/partial-sigs/should_fail/T10615.stderr
- testsuite/tests/patsyn/should_run/ghci.stderr
- testsuite/tests/primops/should_run/UnliftedIOPort.hs
- testsuite/tests/primops/should_run/all.T
- testsuite/tests/quasiquotation/T4491/test.T
- testsuite/tests/quotes/LiftErrMsgDefer.stderr
- + testsuite/tests/rep-poly/NoEtaRequired.hs
- testsuite/tests/rep-poly/T21906.stderr
- testsuite/tests/rep-poly/all.T
- testsuite/tests/roles/should_compile/Roles14.stderr
- testsuite/tests/roles/should_compile/Roles3.stderr
- testsuite/tests/roles/should_compile/Roles4.stderr
- testsuite/tests/rts/ipe/ipeMap.c
- testsuite/tests/rts/ipe/ipe_lib.c
- testsuite/tests/safeHaskell/safeLanguage/SafeLang15.stderr
- testsuite/tests/simplCore/should_compile/DataToTagFamilyScrut.stderr
- testsuite/tests/simplCore/should_compile/T15205.stderr
- testsuite/tests/simplCore/should_compile/T17366.stderr
- testsuite/tests/simplCore/should_compile/T17966.stderr
- testsuite/tests/simplCore/should_compile/T22309.stderr
- testsuite/tests/simplCore/should_compile/T22375DataFamily.stderr
- testsuite/tests/simplCore/should_compile/T23307.stderr
- testsuite/tests/simplCore/should_compile/T23307a.stderr
- testsuite/tests/simplCore/should_compile/T25389.stderr
- testsuite/tests/simplCore/should_compile/T25713.stderr
- testsuite/tests/simplCore/should_compile/T7360.stderr
- testsuite/tests/simplStg/should_compile/T15226b.stderr
- + testsuite/tests/splice-imports/DodgyLevelExport.hs
- + testsuite/tests/splice-imports/DodgyLevelExport.stderr
- + testsuite/tests/splice-imports/DodgyLevelExportA.hs
- + testsuite/tests/splice-imports/LevelImportExports.hs
- + testsuite/tests/splice-imports/LevelImportExports.stdout
- + testsuite/tests/splice-imports/LevelImportExportsA.hs
- testsuite/tests/splice-imports/Makefile
- + testsuite/tests/splice-imports/ModuleExport.hs
- + testsuite/tests/splice-imports/ModuleExport.stderr
- + testsuite/tests/splice-imports/ModuleExportA.hs
- + testsuite/tests/splice-imports/ModuleExportB.hs
- + testsuite/tests/splice-imports/T26090.hs
- + testsuite/tests/splice-imports/T26090.stderr
- + testsuite/tests/splice-imports/T26090A.hs
- testsuite/tests/splice-imports/all.T
- testsuite/tests/tcplugins/CtIdPlugin.hs
- testsuite/tests/th/Makefile
- testsuite/tests/type-data/should_run/T22332a.stderr
- testsuite/tests/typecheck/should_compile/Makefile
- testsuite/tests/typecheck/should_compile/T12763.stderr
- testsuite/tests/typecheck/should_compile/T14774.stdout
- testsuite/tests/typecheck/should_compile/T18406b.stderr
- testsuite/tests/typecheck/should_compile/T18529.stderr
- + testsuite/tests/typecheck/should_compile/T26225.hs
- + testsuite/tests/typecheck/should_compile/T26225b.hs
- + testsuite/tests/typecheck/should_compile/T26256a.hs
- testsuite/tests/typecheck/should_compile/all.T
- − testsuite/tests/typecheck/should_fail/T12563.stderr
- testsuite/tests/typecheck/should_fail/T14618.stderr
- testsuite/tests/typecheck/should_fail/T6022.stderr
- testsuite/tests/typecheck/should_fail/T8883.stderr
- testsuite/tests/typecheck/should_fail/all.T
- testsuite/tests/typecheck/should_fail/tcfail140.stderr
- testsuite/tests/typecheck/should_run/T10284.stderr
- testsuite/tests/typecheck/should_run/T13838.stderr
- testsuite/tests/typecheck/should_run/T9497a-run.stderr
- testsuite/tests/typecheck/should_run/T9497b-run.stderr
- testsuite/tests/typecheck/should_run/T9497c-run.stderr
- testsuite/tests/unboxedsums/unpack_sums_7.stdout
- testsuite/tests/unsatisfiable/T23816.stderr
- testsuite/tests/unsatisfiable/UnsatDefer.stderr
- testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs
- testsuite/tests/wasm/should_run/control-flow/RunWasm.hs
- utils/genprimopcode/Lexer.x
- utils/genprimopcode/Main.hs
- utils/genprimopcode/Parser.y
- utils/genprimopcode/ParserM.hs
- utils/genprimopcode/Syntax.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d0e41ca0ce23aaadcd566a7319ea35…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d0e41ca0ce23aaadcd566a7319ea35…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
Matthew Pickering pushed to branch wip/gdc-files at Glasgow Haskell Compiler / GHC
Commits:
64a09647 by Matthew Pickering at 2025-08-18T14:35:00+01:00
fixes
- - - - -
12 changed files:
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Unit/Module/Status.hs
- testsuite/driver/testlib.py
- testsuite/tests/driver/T5313.hs
- testsuite/tests/ghc-api/T10052/T10052.hs
- testsuite/tests/ghc-api/T8639_api.hs
- testsuite/tests/ghc-api/apirecomp001/myghc.hs
- testsuite/tests/ghci/linking/dyn/T3372.hs
- testsuite/tests/ghci/should_run/PackedDataCon/packeddatacon.T
- testsuite/tests/ghci/should_run/UnboxedTuples/unboxedtuples.T
- testsuite/tests/ghci/should_run/UnliftedDataTypeInterp/unlifteddatatypeinterp.T
Changes:
=====================================
compiler/GHC/Driver/Main.hs
=====================================
@@ -849,15 +849,14 @@ hscRecompStatus
return $ HscRecompNeeded $ fmap mi_iface_hash mb_checked_iface
UpToDateItem checked_iface -> do
let lcl_dflags = ms_hspp_opts mod_summary
- mod_details <- initModDetails hsc_env checked_iface
if | not (backendGeneratesCode (backend lcl_dflags)) -> do
-- No need for a linkable, we're good to go
msg UpToDate
- return $ HscUpToDate (HomeModInfo checked_iface mod_details emptyHomeModInfoLinkable)
+ return $ HscUpToDate checked_iface emptyHomeModInfoLinkable
| not (backendGeneratesCodeForHsBoot (backend lcl_dflags))
, IsBoot <- isBootSummary mod_summary -> do
msg UpToDate
- return $ HscUpToDate (HomeModInfo checked_iface mod_details emptyHomeModInfoLinkable)
+ return $ HscUpToDate checked_iface emptyHomeModInfoLinkable
-- Always recompile with the JS backend when TH is enabled until
-- #23013 is fixed.
@@ -874,7 +873,7 @@ hscRecompStatus
-- 2. The bytecode object file
bc_obj_linkable <- checkByteCodeFromObject hsc_env mod_summary
-- 3. Bytecode from an interface whole core bindings.
- bc_core_linkable <- checkByteCodeFromCoreBindings hsc_env checked_iface mod_details mod_summary
+ bc_core_linkable <- checkByteCodeFromCoreBindings hsc_env checked_iface mod_summary
-- 4. The object file.
obj_linkable <- liftIO $ checkObjects lcl_dflags (homeMod_object old_linkable) mod_summary
trace_if (hsc_logger hsc_env)
@@ -885,7 +884,7 @@ hscRecompStatus
let just_o = justObjects <$> obj_linkable
- definitely_both_os = case (definitely_bc, obj_linkable) of
+ definitely_both_os = case (bc_result, obj_linkable) of
(UpToDateItem bc, UpToDateItem o) -> UpToDateItem (bytecodeAndObjects bc o)
-- If missing object code, just say we need to recompile because of object code.
(_, OutOfDateItem reason _) -> OutOfDateItem reason Nothing
@@ -898,17 +897,26 @@ hscRecompStatus
definitely_bc = bc_obj_linkable `prefer` bc_in_memory_linkable
-- If not -fwrite-byte-code, then we could use core bindings or object code if that's available.
- maybe_bc = ((bc_obj_linkable `choose` bc_core_linkable) `prefer` bc_in_memory_linkable)
- `choose` obj_linkable
+ maybe_bc = bc_in_memory_linkable `choose`
+ bc_obj_linkable `choose`
+ bc_core_linkable `choose`
+ obj_linkable
+ bc_result = if gopt Opt_WriteByteCode lcl_dflags
+ -- If the byte-code artifact needs to be produced, then we certainly need bytecode.
+ then definitely_bc
+ else maybe_bc
+
+ trace_if (hsc_logger hsc_env)
+ (vcat [text "definitely_bc", ppr definitely_bc
+ , text "maybe_bc", ppr maybe_bc
+ , text "definitely_both_os", ppr definitely_both_os
+ , text "just_o", ppr just_o])
-- pprTraceM "recomp" (ppr just_bc <+> ppr just_o)
-- 2. Decide which of the products we will need
let recomp_linkable_result = case () of
_ | backendCanReuseLoadedCode (backend lcl_dflags) ->
- if gopt Opt_WriteByteCode lcl_dflags
- -- If the byte-code artifact needs to be produced, then we certainly need bytecode.
- then justBytecode <$> definitely_bc
- else justBytecode <$> maybe_bc
+ justBytecode <$> bc_result
-- Need object files for making object files
| backendWritesFiles (backend lcl_dflags) ->
if gopt Opt_ByteCodeAndObjectCode lcl_dflags
@@ -921,7 +929,7 @@ hscRecompStatus
case recomp_linkable_result of
UpToDateItem linkable -> do
msg $ UpToDate
- return $ HscUpToDate (HomeModInfo checked_iface mod_details linkable)
+ return $ HscUpToDate checked_iface linkable
OutOfDateItem reason _ -> do
msg $ NeedsRecompile reason
return $ HscRecompNeeded $ Just $ mi_iface_hash $ checked_iface
@@ -1010,19 +1018,20 @@ checkByteCodeFromObject hsc_env mod_sum = do
-- | Attempt to load bytecode from whole core bindings in the interface if they exist.
-- This is a legacy code-path, these days it should be preferred to use the bytecode object linkable.
-checkByteCodeFromCoreBindings :: HscEnv -> ModIface -> ModDetails -> ModSummary -> IO (MaybeValidated Linkable)
-checkByteCodeFromCoreBindings hsc_env iface mod_details mod_sum = do
+checkByteCodeFromCoreBindings :: HscEnv -> ModIface -> ModSummary -> IO (MaybeValidated Linkable)
+checkByteCodeFromCoreBindings _hsc_env iface mod_sum = do
let
this_mod = ms_mod mod_sum
if_date = fromJust $ ms_iface_date mod_sum
case iface_core_bindings iface (ms_location mod_sum) of
Just fi -> do
- ~(bco, fos) <- unsafeInterleaveIO $
- compileWholeCoreBindings hsc_env (md_types mod_details) fi
- let bco' = LazyBCOs bco fos
- return $ UpToDateItem (Linkable if_date this_mod (NE.singleton bco'))
+ return $ UpToDateItem (Linkable if_date this_mod (NE.singleton (CoreBindings fi)))
_ -> return $ outOfDateItemBecause MissingBytecode Nothing
+-- 970 let fi = WholeCoreBindings extra_decls this_mod (ms_location mod_sum)
+-- 971 (mi_foreign iface)
+-- 972 return (UpToDateItem (Linkable if_date this_mod (NE.singleton (CoreBindings fi))))
+
--------------------------------------------------------------
-- Compilers
--------------------------------------------------------------
=====================================
compiler/GHC/Driver/Pipeline.hs
=====================================
@@ -244,11 +244,11 @@ compileOne' mHscMessage
status <- hscRecompStatus mHscMessage plugin_hsc_env upd_summary
mb_old_iface mb_old_linkable (mod_index, nmods)
let pipeline = hscPipeline pipe_env (setDumpPrefix pipe_env plugin_hsc_env, upd_summary, status)
- runPipeline (hsc_hooks plugin_hsc_env) pipeline
+ (iface, linkable) <- runPipeline (hsc_hooks plugin_hsc_env) pipeline
-- See Note [ModDetails and --make mode]
- -- details <- initModDetails plugin_hsc_env iface
- -- linkable' <- traverse (initWholeCoreBindings plugin_hsc_env iface details) (homeMod_bytecode linkable)
- -- return $! HomeModInfo iface details (linkable { homeMod_bytecode = linkable' })
+ details <- initModDetails plugin_hsc_env iface
+ linkable' <- traverse (initWholeCoreBindings plugin_hsc_env iface details) (homeMod_bytecode linkable)
+ return $! HomeModInfo iface details (linkable { homeMod_bytecode = linkable' })
where lcl_dflags = ms_hspp_opts summary
location = ms_location summary
@@ -757,7 +757,7 @@ preprocessPipeline pipe_env hsc_env input_fn = do
$ phaseIfFlag hsc_env flag def action
-- | The complete compilation pipeline, from start to finish
-fullPipeline :: P m => PipeEnv -> HscEnv -> FilePath -> HscSource -> m HomeModInfo
+fullPipeline :: P m => PipeEnv -> HscEnv -> FilePath -> HscSource -> m (ModIface, HomeModLinkable)
fullPipeline pipe_env hsc_env pp_fn src_flavour = do
(dflags, input_fn) <- preprocessPipeline pipe_env hsc_env pp_fn
let hsc_env' = hscSetFlags dflags hsc_env
@@ -766,16 +766,15 @@ fullPipeline pipe_env hsc_env pp_fn src_flavour = do
hscPipeline pipe_env (hsc_env_with_plugins, mod_sum, hsc_recomp_status)
-- | Everything after preprocess
-hscPipeline :: P m => PipeEnv -> ((HscEnv, ModSummary, HscRecompStatus)) -> m HomeModInfo
+hscPipeline :: P m => PipeEnv -> ((HscEnv, ModSummary, HscRecompStatus)) -> m (ModIface, HomeModLinkable)
hscPipeline pipe_env (hsc_env_with_plugins, mod_sum, hsc_recomp_status) = do
case hsc_recomp_status of
- HscUpToDate hmi -> return hmi
+ HscUpToDate iface linkable -> return (iface, linkable)
HscRecompNeeded mb_old_hash -> do
(tc_result, warnings) <- use (T_Hsc hsc_env_with_plugins mod_sum)
hscBackendAction <- use (T_HscPostTc hsc_env_with_plugins mod_sum tc_result warnings mb_old_hash )
(iface, linkable) <-hscBackendPipeline pipe_env hsc_env_with_plugins mod_sum hscBackendAction
- details <- liftIO $ initModDetails hsc_env_with_plugins iface
- return $! HomeModInfo iface details linkable
+ return $! (iface, linkable)
hscBackendPipeline :: P m => PipeEnv -> HscEnv -> ModSummary -> HscBackendAction -> m (ModIface, HomeModLinkable)
hscBackendPipeline pipe_env hsc_env mod_sum result =
@@ -924,7 +923,7 @@ pipelineStart pipe_env hsc_env input_fn mb_phase =
liftIO (showPass logger msg)
liftIO (copyWithHeader line_prag out_fn final_fn)
return Nothing
- _ -> objFromLinkable . hm_linkable <$> fullPipeline pipe_env hsc_env input_fn sf
+ _ -> objFromLinkable . snd <$> fullPipeline pipe_env hsc_env input_fn sf
c :: P m => Phase -> m (Maybe FilePath)
c phase = viaCPipeline phase pipe_env hsc_env Nothing input_fn
as :: P m => Bool -> m (Maybe FilePath)
=====================================
compiler/GHC/Unit/Module/Status.hs
=====================================
@@ -16,7 +16,7 @@ import GHC.Unit.Home.ModInfo
-- | Status of a module in incremental compilation
data HscRecompStatus
-- | Nothing to do because code already exists.
- = HscUpToDate HomeModInfo
+ = HscUpToDate ModIface HomeModLinkable
-- | Recompilation of module, or update of interface is required. Optionally
-- pass the old interface hash to avoid updating the existing interface when
-- it has not changed.
=====================================
testsuite/driver/testlib.py
=====================================
@@ -549,10 +549,12 @@ only_ghci = only_ways([WayName('ghci'), WayName('ghci-opt')])
# -----
def valid_way( way: WayName ) -> bool:
- if way in {'ghci', 'ghci-opt', 'ghci-ext'}:
+ if way in {'ghci', 'ghci-opt'}:
return config.have_RTS_linker
- if way == 'ghci-ext-prof':
- return config.have_RTS_linker and config.have_profiling
+ if way in {'ghci-ext'}:
+ return config.have_ext_interp
+ if way in {'ghci-ext-prof'}:
+ return config.have_ext_interp and config.have_profiling
return True
def extra_ways( ways: List[WayName] ):
=====================================
testsuite/tests/driver/T5313.hs
=====================================
@@ -7,7 +7,7 @@ main = do
-- begin initialize
df0 <- GHC.getSessionDynFlags
let df1 = df0{GHC.ghcMode = GHC.CompManager,
- GHC.backend = GHC.interpreterBackend,
+ GHC.backend = GHC.bytecodeBackend,
GHC.ghcLink = GHC.LinkInMemory,
GHC.verbosity = 0}
_ <- GHC.setSessionDynFlags df1
=====================================
testsuite/tests/ghc-api/T10052/T10052.hs
=====================================
@@ -24,7 +24,7 @@ runGhc' args act = do
logger <- getLogger
(dflags1, _leftover, _warns) <- parseDynamicFlags logger dflags0 flags
let dflags2 = dflags1 {
- backend = interpreterBackend
+ backend = bytecodeBackend
, ghcLink = LinkInMemory
, verbosity = 1
}
=====================================
testsuite/tests/ghc-api/T8639_api.hs
=====================================
@@ -11,7 +11,7 @@ main
= do { [libdir] <- getArgs
; runGhc (Just libdir) $ do
flags <- getSessionDynFlags
- setSessionDynFlags (flags{ backend = interpreterBackend, ghcLink = LinkInMemory})
+ setSessionDynFlags (flags{ backend = bytecodeBackend, ghcLink = LinkInMemory})
target <- guessTarget "T8639_api_a.hs" Nothing Nothing
setTargets [target]
load LoadAllTargets
=====================================
testsuite/tests/ghc-api/apirecomp001/myghc.hs
=====================================
@@ -37,7 +37,7 @@ main = do
prn "target nothing: ok"
dflags <- getSessionDynFlags
- setSessionDynFlags $ dflags { backend = interpreterBackend }
+ setSessionDynFlags $ dflags { backend = bytecodeBackend }
ok <- load LoadAllTargets
when (failed ok) $ error "Couldn't load A.hs in interpreted mode"
prn "target interpreted: ok"
=====================================
testsuite/tests/ghci/linking/dyn/T3372.hs
=====================================
@@ -44,7 +44,7 @@ newGhcServer = do (libdir:_) <- getArgs
where ghc action libdir = GHC.runGhc (Just libdir) (init >> action)
init = do df <- GHC.getSessionDynFlags
GHC.setSessionDynFlags df{GHC.ghcMode = GHC.CompManager,
- GHC.backend = GHC.interpreterBackend,
+ GHC.backend = GHC.bytecodeBackend,
GHC.ghcLink = GHC.LinkInMemory,
GHC.verbosity = 0}
=====================================
testsuite/tests/ghci/should_run/PackedDataCon/packeddatacon.T
=====================================
@@ -2,9 +2,8 @@ test('PackedDataCon',
[ extra_files(['Obj.hs', 'ByteCode.hs', 'Types.hs', 'Common.hs-incl']),
req_interp,
req_bco,
- extra_ways(['ghci']),
- when(config.have_ext_interp, extra_ways(['ghci', 'ghci-ext'])),
- when(config.have_ext_interp and config.have_profiling, extra_ways(['ghci', 'ghci-ext', 'ghci-ext-prof']))
+ extra_ways(ghci_ways),
+ only_ways(ghci_ways),
],
compile_and_run,
['']
=====================================
testsuite/tests/ghci/should_run/UnboxedTuples/unboxedtuples.T
=====================================
@@ -1,10 +1,11 @@
+print(ghci_ways)
+
test('UnboxedTuples',
[ extra_files(['Obj.hs', 'ByteCode.hs', 'Common.hs-incl']),
req_interp,
req_bco,
- extra_ways(['ghci']),
- when(config.have_ext_interp, extra_ways(['ghci', 'ghci-ext'])),
- when(config.have_ext_interp and config.have_profiling, extra_ways(['ghci', 'ghci-ext', 'ghci-ext-prof']))
+ only_ways(ghci_ways),
+ extra_ways(ghci_ways),
],
compile_and_run,
['']
=====================================
testsuite/tests/ghci/should_run/UnliftedDataTypeInterp/unlifteddatatypeinterp.T
=====================================
@@ -2,9 +2,8 @@ test('UnliftedDataTypeInterp',
[ extra_files(['Obj.hs', 'ByteCode.hs', 'Types.hs', 'Common.hs-incl']),
req_interp,
req_bco,
- extra_ways(['ghci']),
- when(config.have_ext_interp, extra_ways(['ghci', 'ghci-ext'])),
- when(config.have_ext_interp and config.have_profiling, extra_ways(['ghci', 'ghci-ext', 'ghci-ext-prof']))
+ only_ways(ghci_ways),
+ extra_ways(ghci_ways),
],
compile_and_run,
['']
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/64a0964734a4572c63aa49eb1d026cf…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/64a0964734a4572c63aa49eb1d026cf…
You're receiving this email because of your account on gitlab.haskell.org.
1
0

[Git][ghc/ghc][wip/T26217] 3 commits: ghc-internal: Split out GHC.Internal.TH.Monad from .Syntax
by Teo Camarasu (@teo) 18 Aug '25
by Teo Camarasu (@teo) 18 Aug '25
18 Aug '25
Teo Camarasu pushed to branch wip/T26217 at Glasgow Haskell Compiler / GHC
Commits:
aa284115 by Teo Camarasu at 2025-08-18T14:00:11+01:00
ghc-internal: Split out GHC.Internal.TH.Monad from .Syntax
Split the Quasi/Q, etc definition out of GHC.Internal.TH.Syntax
into its own module.
We do this for a few reasons:
- it enables future refactors to speed up compilation of these modules.
- it reduces the size of this very large module.
- it clarifies which modules in the GHC tree depend on the TH monads (Q/Quasi, etc) and
which just care about the syntax tree.
A step towards addressing: #26217
- - - - -
a5e5f1a9 by Teo Camarasu at 2025-08-18T14:00:11+01:00
ghc-internal: Move Data instance for TH.Syntax to Data.Data
This means that Data.Data no longer blocks building TH.Syntax, which
allows greater parallelism in our builds.
Previously TH.Syntax was a bottleneck when compiling ghc-internal. Now
it is less of a bottle-neck and is also slightly quicker to
compile (since it no longer contains these instances) at the cost of
making Data.Data slightly more expensive to compile.
TH.Lift which depends on TH.Syntax can also compile quicker and no
longer blocks ghc-internal finishing to compile.
Resolves #26217
- - - - -
59db903a by Teo Camarasu at 2025-08-18T14:00:11+01:00
compiler: delete unused names in Builtins.Names.TH
returnQ and bindQ are no longer used in the compiler.
There was also a very old comment that referred to them that I have modernized
- - - - -
1169 changed files:
- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Gen/Splice.hs-boot
- compiler/GHC/Tc/Types/TH.hs
- libraries/base/src/Data/Array/Byte.hs
- libraries/base/src/Data/Fixed.hs
- + libraries/ghc-boot-th/GHC/Boot/TH/Monad.hs
- libraries/ghc-boot-th/ghc-boot-th.cabal.in
- libraries/ghc-internal/ghc-internal.cabal.in
- libraries/ghc-internal/src/GHC/Internal/Data/Data.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
- + libraries/ghc-internal/src/GHC/Internal/TH/Monad.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Quote.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs
- libraries/ghci/GHCi/Message.hs
- libraries/ghci/GHCi/TH.hs
- libraries/template-haskell/Language/Haskell/TH/Quote.hs
- libraries/template-haskell/Language/Haskell/TH/Syntax.hs
- testsuite/tests/ado/T16135.stderr
- testsuite/tests/ado/T16628.stderr
- testsuite/tests/ado/ado002.stderr
- testsuite/tests/ado/ado003.stderr
- testsuite/tests/ado/ado005.stderr
- testsuite/tests/annotations/should_fail/T10826.stderr
- testsuite/tests/annotations/should_fail/annfail01.stderr
- testsuite/tests/annotations/should_fail/annfail02.stderr
- testsuite/tests/annotations/should_fail/annfail05.stderr
- testsuite/tests/annotations/should_fail/annfail07.stderr
- testsuite/tests/annotations/should_fail/annfail08.stderr
- testsuite/tests/annotations/should_fail/annfail10.stderr
- testsuite/tests/annotations/should_fail/annfail11.stderr
- testsuite/tests/arrows/gadt/ArrowDict.stderr
- testsuite/tests/arrows/gadt/ArrowExistential.stderr
- testsuite/tests/arrows/gadt/ArrowGADTKappa.stderr
- testsuite/tests/arrows/gadt/ArrowPatSyn1.stderr
- testsuite/tests/arrows/gadt/ArrowPatSyn2.stderr
- testsuite/tests/arrows/gadt/T17423.stderr
- testsuite/tests/arrows/gadt/T20469.stderr
- testsuite/tests/arrows/gadt/T20470.stderr
- testsuite/tests/arrows/gadt/T5777.stderr
- testsuite/tests/arrows/gadt/T9985.stderr
- testsuite/tests/arrows/should_fail/T20768_arrow_fail.stderr
- testsuite/tests/arrows/should_fail/T5380.stderr
- testsuite/tests/arrows/should_fail/arrowfail002.stderr
- testsuite/tests/arrows/should_fail/arrowfail004.stderr
- testsuite/tests/backpack/cabal/bkpcabal08/bkpcabal08.stdout
- testsuite/tests/backpack/should_fail/T23342.stderr
- testsuite/tests/backpack/should_fail/T23344.stderr
- testsuite/tests/backpack/should_fail/bkpfail01.stderr
- testsuite/tests/backpack/should_fail/bkpfail03.stderr
- testsuite/tests/backpack/should_fail/bkpfail04.stderr
- testsuite/tests/backpack/should_fail/bkpfail05.stderr
- testsuite/tests/backpack/should_fail/bkpfail10.stderr
- testsuite/tests/backpack/should_fail/bkpfail11.stderr
- testsuite/tests/backpack/should_fail/bkpfail16.stderr
- testsuite/tests/backpack/should_fail/bkpfail17.stderr
- testsuite/tests/backpack/should_fail/bkpfail18.stderr
- testsuite/tests/backpack/should_fail/bkpfail19.stderr
- testsuite/tests/backpack/should_fail/bkpfail20.stderr
- testsuite/tests/backpack/should_fail/bkpfail21.stderr
- testsuite/tests/backpack/should_fail/bkpfail23.stderr
- testsuite/tests/backpack/should_fail/bkpfail25.stderr
- testsuite/tests/backpack/should_fail/bkpfail26.stderr
- testsuite/tests/backpack/should_fail/bkpfail27.stderr
- testsuite/tests/backpack/should_fail/bkpfail28.stderr
- testsuite/tests/backpack/should_fail/bkpfail29.stderr
- testsuite/tests/backpack/should_fail/bkpfail30.stderr
- testsuite/tests/backpack/should_fail/bkpfail31.stderr
- testsuite/tests/backpack/should_fail/bkpfail32.stderr
- testsuite/tests/backpack/should_fail/bkpfail33.stderr
- testsuite/tests/backpack/should_fail/bkpfail34.stderr
- testsuite/tests/backpack/should_fail/bkpfail35.stderr
- testsuite/tests/backpack/should_fail/bkpfail36.stderr
- testsuite/tests/backpack/should_fail/bkpfail37.stderr
- testsuite/tests/backpack/should_fail/bkpfail38.stderr
- testsuite/tests/backpack/should_fail/bkpfail40.stderr
- testsuite/tests/backpack/should_fail/bkpfail41.stderr
- testsuite/tests/backpack/should_fail/bkpfail42.stderr
- testsuite/tests/backpack/should_fail/bkpfail43.stderr
- testsuite/tests/backpack/should_fail/bkpfail44.stderr
- testsuite/tests/backpack/should_fail/bkpfail45.stderr
- testsuite/tests/backpack/should_fail/bkpfail47.stderr
- testsuite/tests/backpack/should_fail/bkpfail48.stderr
- testsuite/tests/backpack/should_fail/bkpfail49.stderr
- testsuite/tests/backpack/should_fail/bkpfail50.stderr
- testsuite/tests/backpack/should_fail/bkpfail52.stderr
- testsuite/tests/backpack/should_fail/bkpfail53.stderr
- testsuite/tests/backpack/should_fail/bkpfail54.stderr
- testsuite/tests/backpack/should_run/T15379-DataToTag.stderr
- testsuite/tests/bytecode/T23068.stdout
- testsuite/tests/cabal/ghcpkg04.stderr
- testsuite/tests/codeGen/should_compile/T14373a.stderr
- − testsuite/tests/codeGen/should_compile/T14373b.stderr-ws-64
- − testsuite/tests/codeGen/should_compile/T14373c.stderr-ws-64
- − testsuite/tests/codeGen/should_compile/T14373d.stderr-ws-64
- testsuite/tests/deSugar/should_run/T18172.stderr
- testsuite/tests/default/DefaultImportFail01.stderr
- testsuite/tests/default/DefaultImportFail02.stderr
- testsuite/tests/default/DefaultImportFail03.stderr
- testsuite/tests/default/DefaultImportFail04.stderr
- testsuite/tests/default/DefaultImportFail05.stderr
- testsuite/tests/default/DefaultImportFail06.stderr
- testsuite/tests/default/DefaultImportFail07.stderr
- testsuite/tests/default/default-fail06.stderr
- testsuite/tests/dependent/should_fail/BadTelescope.stderr
- testsuite/tests/dependent/should_fail/BadTelescope2.stderr
- testsuite/tests/dependent/should_fail/BadTelescope3.stderr
- testsuite/tests/dependent/should_fail/BadTelescope5.stderr
- testsuite/tests/dependent/should_fail/DepFail1.stderr
- testsuite/tests/dependent/should_fail/PromotedClass.stderr
- testsuite/tests/dependent/should_fail/SelfDep.stderr
- testsuite/tests/dependent/should_fail/T11334b.stderr
- testsuite/tests/dependent/should_fail/T12081.stderr
- testsuite/tests/dependent/should_fail/T13135.stderr
- testsuite/tests/dependent/should_fail/T13601.stderr
- testsuite/tests/dependent/should_fail/T13780c.stderr
- testsuite/tests/dependent/should_fail/T13895.stderr
- testsuite/tests/dependent/should_fail/T14066.stderr
- testsuite/tests/dependent/should_fail/T14066d.stderr
- testsuite/tests/dependent/should_fail/T14066e.stderr
- testsuite/tests/dependent/should_fail/T14066f.stderr
- testsuite/tests/dependent/should_fail/T14845_compile.stderr
- testsuite/tests/dependent/should_fail/T14845_fail1.stderr
- testsuite/tests/dependent/should_fail/T14845_fail2.stderr
- testsuite/tests/dependent/should_fail/T14880-2.stderr
- testsuite/tests/dependent/should_fail/T15076.stderr
- testsuite/tests/dependent/should_fail/T15076b.stderr
- testsuite/tests/dependent/should_fail/T15215.stderr
- testsuite/tests/dependent/should_fail/T15245.stderr
- testsuite/tests/dependent/should_fail/T15264.stderr
- testsuite/tests/dependent/should_fail/T15308.stderr
- testsuite/tests/dependent/should_fail/T15343.stderr
- testsuite/tests/dependent/should_fail/T15380.stderr
- testsuite/tests/dependent/should_fail/T15825.stderr
- testsuite/tests/dependent/should_fail/T15859.stderr
- testsuite/tests/dependent/should_fail/T15859a.stderr
- testsuite/tests/dependent/should_fail/T16326_Fail1.stderr
- testsuite/tests/dependent/should_fail/T16326_Fail10.stderr
- testsuite/tests/dependent/should_fail/T16326_Fail11.stderr
- testsuite/tests/dependent/should_fail/T16326_Fail12.stderr
- testsuite/tests/dependent/should_fail/T16326_Fail2.stderr
- testsuite/tests/dependent/should_fail/T16326_Fail3.stderr
- testsuite/tests/dependent/should_fail/T16326_Fail9.stderr
- testsuite/tests/dependent/should_fail/T16344.stderr
- testsuite/tests/dependent/should_fail/T16344a.stderr
- testsuite/tests/dependent/should_fail/T16391b.stderr
- testsuite/tests/dependent/should_fail/T16418.stderr
- testsuite/tests/dependent/should_fail/T17131.stderr
- testsuite/tests/dependent/should_fail/T17541.stderr
- testsuite/tests/dependent/should_fail/T17541b.stderr
- testsuite/tests/dependent/should_fail/T17687.stderr
- testsuite/tests/dependent/should_fail/T18271.stderr
- testsuite/tests/deriving/should_compile/T14682.stderr
- testsuite/tests/deriving/should_compile/drv-empty-data.stderr
- testsuite/tests/deriving/should_fail/T10598_fail3.stderr
- testsuite/tests/deriving/should_fail/T10598_fail4.stderr
- testsuite/tests/deriving/should_fail/T10598_fail5.stderr
- testsuite/tests/deriving/should_fail/T10598_fail6.stderr
- testsuite/tests/deriving/should_fail/T11509_1.stderr
- testsuite/tests/deriving/should_fail/T12512.stderr
- testsuite/tests/deriving/should_fail/T13154c.stderr
- testsuite/tests/deriving/should_fail/T14728a.stderr
- testsuite/tests/deriving/should_fail/T14728b.stderr
- testsuite/tests/deriving/should_fail/T21087.stderr
- testsuite/tests/deriving/should_fail/T21087b.stderr
- testsuite/tests/deriving/should_fail/T21871.stderr
- testsuite/tests/deriving/should_fail/T2394.stderr
- testsuite/tests/deriving/should_fail/T3833.stderr
- testsuite/tests/deriving/should_fail/T3834.stderr
- testsuite/tests/deriving/should_fail/T4083.stderr
- testsuite/tests/deriving/should_fail/T4528.stderr
- testsuite/tests/deriving/should_fail/T5287.stderr
- testsuite/tests/deriving/should_fail/T8165_fail1.stderr
- testsuite/tests/deriving/should_fail/T8165_fail2.stderr
- testsuite/tests/deriving/should_fail/T9600-1.stderr
- testsuite/tests/deriving/should_fail/T9600.stderr
- testsuite/tests/deriving/should_fail/T9687.stderr
- testsuite/tests/deriving/should_fail/deriving-via-fail2.stderr
- testsuite/tests/deriving/should_fail/deriving-via-fail3.stderr
- testsuite/tests/deriving/should_fail/drvfail005.stderr
- testsuite/tests/deriving/should_fail/drvfail006.stderr
- testsuite/tests/deriving/should_fail/drvfail008.stderr
- testsuite/tests/deriving/should_fail/drvfail009.stderr
- testsuite/tests/deriving/should_fail/drvfail011.stderr
- testsuite/tests/deriving/should_fail/drvfail015.stderr
- testsuite/tests/diagnostic-codes/codes.stdout
- testsuite/tests/driver/T10600.stderr
- testsuite/tests/driver/T11381.stderr
- testsuite/tests/driver/T21097/T21097.stderr
- testsuite/tests/driver/T21722.stderr
- testsuite/tests/driver/T2182.stderr
- testsuite/tests/driver/T2507.stderr
- testsuite/tests/driver/T6037.stderr
- testsuite/tests/driver/T8959a.stderr
- testsuite/tests/driver/driver063.stderr
- testsuite/tests/driver/json.stderr
- testsuite/tests/driver/multipleHomeUnits/multipleHomeUnitsModuleVisibility.stderr
- testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_recomp_th.stdout
- testsuite/tests/driver/werror.stderr
- testsuite/tests/ffi/should_fail/NonreducingFfiSignature.stderr
- testsuite/tests/ffi/should_fail/T10461.stderr
- testsuite/tests/ffi/should_fail/T16702.stderr
- testsuite/tests/ffi/should_fail/T20116.stderr
- testsuite/tests/ffi/should_fail/T21305_fail.stderr
- testsuite/tests/ffi/should_fail/T3066.stderr
- testsuite/tests/ffi/should_fail/T5664.stderr
- testsuite/tests/ffi/should_fail/T7243.stderr
- testsuite/tests/ffi/should_fail/T7506.stderr
- testsuite/tests/ffi/should_fail/capi_value_function.stderr
- testsuite/tests/ffi/should_fail/ccfail002.stderr
- testsuite/tests/ffi/should_fail/ccfail003.stderr
- testsuite/tests/ffi/should_fail/ccfail004.stderr
- testsuite/tests/ffi/should_fail/ccfail005.stderr
- testsuite/tests/gadt/T12087.stderr
- testsuite/tests/gadt/T12468.stderr
- testsuite/tests/gadt/T14320.stderr
- testsuite/tests/gadt/T14719.stderr
- testsuite/tests/gadt/T16427.stderr
- testsuite/tests/gadt/T18191.stderr
- testsuite/tests/gadt/T23023.stderr
- testsuite/tests/gadt/T23298.stderr
- testsuite/tests/gadt/T3163.stderr
- testsuite/tests/gadt/T3169.stderr
- testsuite/tests/gadt/T7293.stderr
- testsuite/tests/gadt/gadt-escape1.stderr
- testsuite/tests/gadt/gadt11.stderr
- testsuite/tests/gadt/gadt13.stderr
- testsuite/tests/gadt/gadt21.stderr
- testsuite/tests/gadt/gadt7.stderr
- testsuite/tests/gadt/gadtSyntaxFail001.stderr
- testsuite/tests/gadt/gadtSyntaxFail002.stderr
- testsuite/tests/gadt/gadtSyntaxFail003.stderr
- testsuite/tests/gadt/lazypat.stderr
- testsuite/tests/gadt/rw.stderr
- testsuite/tests/generics/GenCannotDoRep0_2.stderr
- testsuite/tests/generics/GenCannotDoRep1_2.stderr
- testsuite/tests/generics/GenShouldFail0.stderr
- testsuite/tests/generics/GenShouldFail1_0.stderr
- testsuite/tests/generics/T10604/T10604_bad_variable_occurrence.stderr
- testsuite/tests/generics/T5462No1.stderr
- testsuite/tests/ghc-e/should_fail/T18441fail12.stderr
- testsuite/tests/ghc-e/should_fail/T18441fail17.stderr
- testsuite/tests/ghc-e/should_fail/T9905fail2.stderr
- testsuite/tests/ghc-e/should_fail/T9930fail.stderr
- testsuite/tests/ghc-e/should_run/T2636.stderr
- testsuite/tests/ghc-e/should_run/ghc-e005.stderr
- testsuite/tests/ghci.debugger/scripts/T14628.stderr
- testsuite/tests/ghci.debugger/scripts/break003.stderr
- testsuite/tests/ghci.debugger/scripts/break009.stdout
- testsuite/tests/ghci.debugger/scripts/break011.stdout
- testsuite/tests/ghci.debugger/scripts/break024.stdout
- testsuite/tests/ghci.debugger/scripts/dynbrk001.stderr
- testsuite/tests/ghci.debugger/scripts/print019.stderr
- testsuite/tests/ghci/T11827/T11827.stderr
- testsuite/tests/ghci/T13786/T13786.stdout
- testsuite/tests/ghci/T21390/T21390.stdout
- testsuite/tests/ghci/prog006/prog006.stderr
- testsuite/tests/ghci/prog009/ghci.prog009.stderr
- testsuite/tests/ghci/prog010/ghci.prog010.stderr
- testsuite/tests/ghci/prog011/prog011.stderr
- testsuite/tests/ghci/prog012/prog012.stderr
- testsuite/tests/ghci/prog015/prog015.stdout
- testsuite/tests/ghci/prog016/prog016.stdout
- testsuite/tests/ghci/prog019/prog019.stderr
- testsuite/tests/ghci/scripts/Defer02.stderr
- testsuite/tests/ghci/scripts/StaticPtr.stderr
- testsuite/tests/ghci/scripts/T10248.stderr
- testsuite/tests/ghci/scripts/T10501.stderr
- testsuite/tests/ghci/scripts/T10663.stdout
- testsuite/tests/ghci/scripts/T10963.stderr
- testsuite/tests/ghci/scripts/T11606.stderr
- testsuite/tests/ghci/scripts/T13202.stderr
- testsuite/tests/ghci/scripts/T13202a.stderr
- testsuite/tests/ghci/scripts/T14676.stderr
- testsuite/tests/ghci/scripts/T14969.stderr
- testsuite/tests/ghci/scripts/T15259.stderr
- testsuite/tests/ghci/scripts/T15325.stderr
- testsuite/tests/ghci/scripts/T15898.stderr
- testsuite/tests/ghci/scripts/T16376.stderr
- testsuite/tests/ghci/scripts/T16563.stdout
- testsuite/tests/ghci/scripts/T17549.stderr
- testsuite/tests/ghci/scripts/T18330.stdout
- testsuite/tests/ghci/scripts/T1914.stderr
- testsuite/tests/ghci/scripts/T19158.stderr
- testsuite/tests/ghci/scripts/T20455.stderr
- testsuite/tests/ghci/scripts/T21110.stderr
- testsuite/tests/ghci/scripts/T2182ghci.stderr
- testsuite/tests/ghci/scripts/T2182ghci2.stderr
- testsuite/tests/ghci/scripts/T22695.stderr
- testsuite/tests/ghci/scripts/T2452.stderr
- testsuite/tests/ghci/scripts/T2816.stderr
- testsuite/tests/ghci/scripts/T3263.stderr
- testsuite/tests/ghci/scripts/T5564.stderr
- testsuite/tests/ghci/scripts/T5820.stderr
- testsuite/tests/ghci/scripts/T5979.stderr
- testsuite/tests/ghci/scripts/T6007.stderr
- testsuite/tests/ghci/scripts/T6018ghcifail.stderr
- testsuite/tests/ghci/scripts/T7873.stderr
- testsuite/tests/ghci/scripts/T8353.stderr
- testsuite/tests/ghci/scripts/T8639.stderr
- testsuite/tests/ghci/scripts/T8959.stderr
- − testsuite/tests/ghci/scripts/T9878.stderr
- testsuite/tests/ghci/scripts/ghci019.stderr
- testsuite/tests/ghci/scripts/ghci025.stdout
- testsuite/tests/ghci/scripts/ghci031.stderr
- testsuite/tests/ghci/scripts/ghci034.stderr
- testsuite/tests/ghci/scripts/ghci036.stderr
- testsuite/tests/ghci/scripts/ghci038.stderr
- testsuite/tests/ghci/scripts/ghci044.stderr
- testsuite/tests/ghci/scripts/ghci046.stderr
- testsuite/tests/ghci/scripts/ghci047.stderr
- testsuite/tests/ghci/scripts/ghci050.stderr
- testsuite/tests/ghci/scripts/ghci061.stderr
- testsuite/tests/ghci/scripts/ghci063.stderr
- testsuite/tests/ghci/should_fail/GHCiErrorIndexLinks.stderr
- testsuite/tests/ghci/should_fail/T10549.stderr
- testsuite/tests/ghci/should_fail/T15055.stderr
- testsuite/tests/ghci/should_fail/T16013.stderr
- testsuite/tests/ghci/should_fail/T16287.stderr
- testsuite/tests/ghci/should_run/T15806.stderr
- testsuite/tests/ghci/should_run/T15806.stdout
- testsuite/tests/ghci/should_run/T19733.stdout
- testsuite/tests/ghci/should_run/T7253.stderr
- testsuite/tests/impredicative/icfp20-fail.stderr
- testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
- testsuite/tests/indexed-types/should_compile/T10806.stderr
- testsuite/tests/indexed-types/should_compile/T12538.stderr
- testsuite/tests/indexed-types/should_compile/T15322a.stderr
- testsuite/tests/indexed-types/should_fail/BadSock.stderr
- testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr
- testsuite/tests/indexed-types/should_fail/ClosedFam4.stderr
- testsuite/tests/indexed-types/should_fail/DerivUnsatFam.stderr
- testsuite/tests/indexed-types/should_fail/ExpandTFs.stderr
- testsuite/tests/indexed-types/should_fail/ExplicitForAllFams3.stderr
- testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
- testsuite/tests/indexed-types/should_fail/NoGood.stderr
- testsuite/tests/indexed-types/should_fail/Over.stderr
- testsuite/tests/indexed-types/should_fail/OverDirectThisMod.stderr
- testsuite/tests/indexed-types/should_fail/OverIndirectThisMod.stderr
- testsuite/tests/indexed-types/should_fail/Overlap10.stderr
- testsuite/tests/indexed-types/should_fail/Overlap11.stderr
- testsuite/tests/indexed-types/should_fail/Overlap15.stderr
- testsuite/tests/indexed-types/should_fail/Overlap4.stderr
- testsuite/tests/indexed-types/should_fail/Overlap5.stderr
- testsuite/tests/indexed-types/should_fail/Overlap6.stderr
- testsuite/tests/indexed-types/should_fail/Overlap9.stderr
- testsuite/tests/indexed-types/should_fail/SimpleFail11a.stderr
- testsuite/tests/indexed-types/should_fail/SimpleFail11b.stderr
- testsuite/tests/indexed-types/should_fail/SimpleFail11c.stderr
- testsuite/tests/indexed-types/should_fail/SimpleFail11d.stderr
- testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr
- testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr
- testsuite/tests/indexed-types/should_fail/SimpleFail2b.stderr
- testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr
- testsuite/tests/indexed-types/should_fail/SimpleFail5b.stderr
- testsuite/tests/indexed-types/should_fail/SimpleFail6.stderr
- testsuite/tests/indexed-types/should_fail/SimpleFail8.stderr
- testsuite/tests/indexed-types/should_fail/T10141.stderr
- testsuite/tests/indexed-types/should_fail/T13271.stderr
- testsuite/tests/indexed-types/should_fail/T13571.stderr
- testsuite/tests/indexed-types/should_fail/T13571a.stderr
- testsuite/tests/indexed-types/should_fail/T13674.stderr
- testsuite/tests/indexed-types/should_fail/T14033.stderr
- testsuite/tests/indexed-types/should_fail/T14175.stderr
- testsuite/tests/indexed-types/should_fail/T14179.stderr
- testsuite/tests/indexed-types/should_fail/T14246.stderr
- testsuite/tests/indexed-types/should_fail/T14904.stderr
- testsuite/tests/indexed-types/should_fail/T15172.stderr
- testsuite/tests/indexed-types/should_fail/T16110_Fail1.stderr
- testsuite/tests/indexed-types/should_fail/T19773.stderr
- testsuite/tests/indexed-types/should_fail/T20465.stderr
- testsuite/tests/indexed-types/should_fail/T20466.stderr
- testsuite/tests/indexed-types/should_fail/T20521.stderr
- testsuite/tests/indexed-types/should_fail/T21092.stderr
- testsuite/tests/indexed-types/should_fail/T2203a.stderr
- testsuite/tests/indexed-types/should_fail/T2627b.stderr
- testsuite/tests/indexed-types/should_fail/T2664.stderr
- testsuite/tests/indexed-types/should_fail/T2677.stderr
- testsuite/tests/indexed-types/should_fail/T2693.stderr
- testsuite/tests/indexed-types/should_fail/T2888.stderr
- testsuite/tests/indexed-types/should_fail/T3330a.stderr
- testsuite/tests/indexed-types/should_fail/T3330b.stderr
- testsuite/tests/indexed-types/should_fail/T4093a.stderr
- testsuite/tests/indexed-types/should_fail/T4093b.stderr
- testsuite/tests/indexed-types/should_fail/T4246.stderr
- testsuite/tests/indexed-types/should_fail/T4272.stderr
- testsuite/tests/indexed-types/should_fail/T4485.stderr
- testsuite/tests/indexed-types/should_fail/T5515.stderr
- testsuite/tests/indexed-types/should_fail/T5934.stderr
- testsuite/tests/indexed-types/should_fail/T6123.stderr
- testsuite/tests/indexed-types/should_fail/T7010.stderr
- testsuite/tests/indexed-types/should_fail/T7102a.stderr
- testsuite/tests/indexed-types/should_fail/T7194.stderr
- testsuite/tests/indexed-types/should_fail/T7354.stderr
- testsuite/tests/indexed-types/should_fail/T7729.stderr
- testsuite/tests/indexed-types/should_fail/T7729a.stderr
- testsuite/tests/indexed-types/should_fail/T7788.stderr
- testsuite/tests/indexed-types/should_fail/T7967.stderr
- testsuite/tests/indexed-types/should_fail/T8155.stderr
- testsuite/tests/indexed-types/should_fail/T8518.stderr
- testsuite/tests/indexed-types/should_fail/T9097.stderr
- testsuite/tests/indexed-types/should_fail/T9167.stderr
- testsuite/tests/indexed-types/should_fail/T9371.stderr
- testsuite/tests/indexed-types/should_fail/T9433.stderr
- testsuite/tests/indexed-types/should_fail/T9554.stderr
- testsuite/tests/indexed-types/should_fail/T9580.stderr
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/template-haskell-exports.stdout
- testsuite/tests/linear/should_fail/Linear11.stderr
- testsuite/tests/linear/should_fail/Linear13.stderr
- testsuite/tests/linear/should_fail/Linear2.stderr
- testsuite/tests/linear/should_fail/Linear5.stderr
- testsuite/tests/linear/should_fail/Linear7.stderr
- testsuite/tests/linear/should_fail/Linear9.stderr
- testsuite/tests/linear/should_fail/LinearAsPat.stderr
- testsuite/tests/linear/should_fail/LinearBottomMult.stderr
- testsuite/tests/linear/should_fail/LinearFFI.stderr
- testsuite/tests/linear/should_fail/LinearGADTNewtype.stderr
- testsuite/tests/linear/should_fail/LinearIf.stderr
- testsuite/tests/linear/should_fail/LinearKind.stderr
- testsuite/tests/linear/should_fail/LinearKind2.stderr
- testsuite/tests/linear/should_fail/LinearKind3.stderr
- testsuite/tests/linear/should_fail/LinearLazyPat.stderr
- testsuite/tests/linear/should_fail/LinearLet1.stderr
- testsuite/tests/linear/should_fail/LinearLet2.stderr
- testsuite/tests/linear/should_fail/LinearLet3.stderr
- testsuite/tests/linear/should_fail/LinearLet4.stderr
- testsuite/tests/linear/should_fail/LinearLet5.stderr
- testsuite/tests/linear/should_fail/LinearLet6.stderr
- testsuite/tests/linear/should_fail/LinearLet8.stderr
- testsuite/tests/linear/should_fail/LinearLet9.stderr
- testsuite/tests/linear/should_fail/LinearPatSyn.stderr
- testsuite/tests/linear/should_fail/LinearPatSyn2.stderr
- testsuite/tests/linear/should_fail/LinearPatternGuardWildcard.stderr
- testsuite/tests/linear/should_fail/LinearRecordUpdate.stderr
- testsuite/tests/linear/should_fail/LinearRole.stderr
- testsuite/tests/linear/should_fail/LinearSeq.stderr
- testsuite/tests/linear/should_fail/LinearSequenceExpr.stderr
- testsuite/tests/linear/should_fail/LinearTHFail2.stderr
- testsuite/tests/linear/should_fail/LinearTHFail3.stderr
- testsuite/tests/linear/should_fail/LinearViewPattern.stderr
- testsuite/tests/linear/should_fail/T18888.stderr
- testsuite/tests/linear/should_fail/T19120.stderr
- testsuite/tests/linear/should_fail/T19361.stderr
- testsuite/tests/linear/should_fail/T23814fail.stderr
- testsuite/tests/mdo/should_fail/mdofail001.stderr
- testsuite/tests/mdo/should_fail/mdofail002.stderr
- testsuite/tests/mdo/should_fail/mdofail003.stderr
- testsuite/tests/module/T11970.stderr
- testsuite/tests/module/T11970B.stderr
- testsuite/tests/module/T20007.stderr
- testsuite/tests/module/T414.stderr
- testsuite/tests/module/T7765.stderr
- testsuite/tests/module/mod1.stderr
- testsuite/tests/module/mod10.stderr
- testsuite/tests/module/mod101.stderr
- testsuite/tests/module/mod102.stderr
- testsuite/tests/module/mod114.stderr
- testsuite/tests/module/mod116.stderr
- testsuite/tests/module/mod120.stderr
- testsuite/tests/module/mod121.stderr
- testsuite/tests/module/mod122.stderr
- testsuite/tests/module/mod123.stderr
- testsuite/tests/module/mod124.stderr
- testsuite/tests/module/mod125.stderr
- testsuite/tests/module/mod126.stderr
- testsuite/tests/module/mod127.stderr
- testsuite/tests/module/mod130.stderr
- testsuite/tests/module/mod131.stderr
- testsuite/tests/module/mod134.stderr
- testsuite/tests/module/mod135.stderr
- testsuite/tests/module/mod136.stderr
- testsuite/tests/module/mod138.stderr
- testsuite/tests/module/mod142.stderr
- testsuite/tests/module/mod143.stderr
- testsuite/tests/module/mod145.stderr
- testsuite/tests/module/mod150.stderr
- testsuite/tests/module/mod151.stderr
- testsuite/tests/module/mod152.stderr
- testsuite/tests/module/mod153.stderr
- testsuite/tests/module/mod155.stderr
- testsuite/tests/module/mod161.stderr
- testsuite/tests/module/mod164.stderr
- testsuite/tests/module/mod17.stderr
- testsuite/tests/module/mod18.stderr
- testsuite/tests/module/mod19.stderr
- testsuite/tests/module/mod2.stderr
- testsuite/tests/module/mod20.stderr
- testsuite/tests/module/mod21.stderr
- testsuite/tests/module/mod22.stderr
- testsuite/tests/module/mod23.stderr
- testsuite/tests/module/mod24.stderr
- testsuite/tests/module/mod25.stderr
- testsuite/tests/module/mod26.stderr
- testsuite/tests/module/mod27.stderr
- testsuite/tests/module/mod29.stderr
- testsuite/tests/module/mod3.stderr
- testsuite/tests/module/mod36.stderr
- testsuite/tests/module/mod38.stderr
- testsuite/tests/module/mod39.stderr
- testsuite/tests/module/mod4.stderr
- testsuite/tests/module/mod40.stderr
- testsuite/tests/module/mod41.stderr
- testsuite/tests/module/mod42.stderr
- testsuite/tests/module/mod43.stderr
- testsuite/tests/module/mod44.stderr
- testsuite/tests/module/mod45.stderr
- testsuite/tests/module/mod46.stderr
- testsuite/tests/module/mod47.stderr
- testsuite/tests/module/mod48.stderr
- testsuite/tests/module/mod49.stderr
- testsuite/tests/module/mod50.stderr
- testsuite/tests/module/mod51.stderr
- testsuite/tests/module/mod52.stderr
- testsuite/tests/module/mod59.stderr
- testsuite/tests/module/mod60.stderr
- testsuite/tests/module/mod61.stderr
- testsuite/tests/module/mod62.stderr
- testsuite/tests/module/mod63.stderr
- testsuite/tests/module/mod66.stderr
- testsuite/tests/module/mod67.stderr
- testsuite/tests/module/mod68.stderr
- testsuite/tests/module/mod7.stderr
- testsuite/tests/module/mod71.stderr
- testsuite/tests/module/mod72.stderr
- testsuite/tests/module/mod74.stderr
- testsuite/tests/module/mod77.stderr
- testsuite/tests/module/mod79.stderr
- testsuite/tests/module/mod8.stderr
- testsuite/tests/module/mod80.stderr
- testsuite/tests/module/mod88.stderr
- testsuite/tests/module/mod9.stderr
- testsuite/tests/module/mod90.stderr
- testsuite/tests/monadfail/MonadFailErrors.stderr
- testsuite/tests/overloadedlists/should_fail/overloadedlistsfail02.stderr
- testsuite/tests/overloadedlists/should_fail/overloadedlistsfail03.stderr
- testsuite/tests/overloadedlists/should_fail/overloadedlistsfail04.stderr
- testsuite/tests/overloadedlists/should_fail/overloadedlistsfail05.stderr
- testsuite/tests/overloadedrecflds/should_compile/BootFldReexport.stderr
- testsuite/tests/overloadedrecflds/should_compile/T13352_hard.stderr
- testsuite/tests/overloadedrecflds/should_compile/T22106_C.stderr
- testsuite/tests/overloadedrecflds/should_compile/T24293c.stderr
- testsuite/tests/overloadedrecflds/should_fail/DRF9156.stderr
- testsuite/tests/overloadedrecflds/should_fail/DRFHoleFits.stderr
- testsuite/tests/overloadedrecflds/should_fail/DRFPartialFields.stderr
- testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr
- testsuite/tests/overloadedrecflds/should_fail/DuplicateExports.stderr
- testsuite/tests/overloadedrecflds/should_fail/FieldSelectors.stderr
- testsuite/tests/overloadedrecflds/should_fail/NFS9156.stderr
- testsuite/tests/overloadedrecflds/should_fail/NFSExport.stderr
- testsuite/tests/overloadedrecflds/should_fail/NFSMixed.stderr
- testsuite/tests/overloadedrecflds/should_fail/NFSSuppressed.stderr
- testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr
- testsuite/tests/overloadedrecflds/should_fail/NoParent.stderr
- testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr
- testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr
- testsuite/tests/overloadedrecflds/should_fail/T14953.stderr
- testsuite/tests/overloadedrecflds/should_fail/T16745.stderr
- testsuite/tests/overloadedrecflds/should_fail/T17420.stderr
- testsuite/tests/overloadedrecflds/should_fail/T17469.stderr
- testsuite/tests/overloadedrecflds/should_fail/T17965.stderr
- testsuite/tests/overloadedrecflds/should_fail/T19287.stderr
- testsuite/tests/overloadedrecflds/should_fail/T21959.stderr
- testsuite/tests/overloadedrecflds/should_fail/T23010_fail.stderr
- testsuite/tests/overloadedrecflds/should_fail/T23063.stderr
- testsuite/tests/overloadedrecflds/should_fail/hasfieldfail01.stderr
- testsuite/tests/overloadedrecflds/should_fail/hasfieldfail02.stderr
- testsuite/tests/overloadedrecflds/should_fail/hasfieldfail03.stderr
- testsuite/tests/overloadedrecflds/should_fail/hasfieldfail04.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedlabelsfail01.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01a.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01b.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01c.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail03.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail05.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail07.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail08.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail09.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail10.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail14.stderr
- testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr
- testsuite/tests/package/T22884.stderr
- testsuite/tests/package/T22884_interactive.stderr
- testsuite/tests/package/T4806.stderr
- testsuite/tests/package/T4806_interactive.stderr
- testsuite/tests/package/T4806a.stderr
- testsuite/tests/package/package01e.stderr
- testsuite/tests/package/package06e.stderr
- testsuite/tests/package/package07e.stderr
- testsuite/tests/package/package08e.stderr
- testsuite/tests/package/package09e.stderr
- testsuite/tests/parser/should_fail/ListTuplePunsFail5.stderr
- testsuite/tests/parser/should_fail/MultilineStringsError.stderr
- testsuite/tests/parser/should_fail/NondecreasingIndentationFail.stderr
- testsuite/tests/parser/should_fail/NumericUnderscoresFail0.stderr
- testsuite/tests/parser/should_fail/NumericUnderscoresFail1.stderr
- testsuite/tests/parser/should_fail/OpaqueParseFail4.stderr
- testsuite/tests/parser/should_fail/ParserNoBinaryLiterals1.stderr
- testsuite/tests/parser/should_fail/ParserNoBinaryLiterals2.stderr
- testsuite/tests/parser/should_fail/ParserNoBinaryLiterals3.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail12.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail13.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail5.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail6.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail7.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail9.stderr
- testsuite/tests/parser/should_fail/RecordWildCardsFail.stderr
- testsuite/tests/parser/should_fail/T12446.stderr
- testsuite/tests/parser/should_fail/T12811.stderr
- testsuite/tests/parser/should_fail/T13414.stderr
- testsuite/tests/parser/should_fail/T14740.stderr
- testsuite/tests/parser/should_fail/T15209.stderr
- testsuite/tests/parser/should_fail/T15233.stderr
- testsuite/tests/parser/should_fail/T18130Fail.stderr
- testsuite/tests/parser/should_fail/T18251c.stderr
- testsuite/tests/parser/should_fail/T20385A.stderr
- testsuite/tests/parser/should_fail/T20385B.stderr
- testsuite/tests/parser/should_fail/T20654a.stderr
- testsuite/tests/parser/should_fail/T20654b.stderr
- testsuite/tests/parser/should_fail/T3811g.stderr
- testsuite/tests/parser/should_fail/T8501c.stderr
- testsuite/tests/parser/should_fail/ViewPatternsFail.stderr
- testsuite/tests/parser/should_fail/readFail001.stderr
- testsuite/tests/parser/should_fail/readFail003.stderr
- testsuite/tests/parser/should_fail/readFail008.stderr
- testsuite/tests/parser/should_fail/readFail016.stderr
- testsuite/tests/parser/should_fail/readFail021.stderr
- testsuite/tests/parser/should_fail/readFail023.stderr
- testsuite/tests/parser/should_fail/readFail028.stderr
- testsuite/tests/parser/should_fail/readFail032.stderr
- testsuite/tests/parser/should_fail/readFail036.stderr
- testsuite/tests/parser/should_fail/readFail037.stderr
- testsuite/tests/parser/should_fail/readFail038.stderr
- testsuite/tests/parser/should_fail/readFail039.stderr
- testsuite/tests/parser/should_fail/readFail041.stderr
- testsuite/tests/parser/should_fail/readFail042.stderr
- testsuite/tests/parser/should_fail/readFail043.stderr
- testsuite/tests/parser/should_fail/readFail048.stderr
- testsuite/tests/parser/unicode/T2302.stderr
- testsuite/tests/partial-sigs/should_compile/T12156.stderr
- testsuite/tests/partial-sigs/should_compile/T14217.stderr
- testsuite/tests/partial-sigs/should_fail/AnnotatedConstraint.stderr
- testsuite/tests/partial-sigs/should_fail/AnnotatedConstraintNotForgotten.stderr
- testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr
- testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
- testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr
- testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr
- testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr
- testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr
- testsuite/tests/partial-sigs/should_fail/Forall1Bad.stderr
- testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
- testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
- testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.stderr
- testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr
- testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
- testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
- testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr
- testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr
- testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr
- testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr
- testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
- testsuite/tests/partial-sigs/should_fail/PatBind3.stderr
- testsuite/tests/partial-sigs/should_fail/ScopedNamedWildcardsBad.stderr
- testsuite/tests/partial-sigs/should_fail/T10045.stderr
- testsuite/tests/partial-sigs/should_fail/T11515.stderr
- testsuite/tests/partial-sigs/should_fail/T11976.stderr
- testsuite/tests/partial-sigs/should_fail/T12039.stderr
- testsuite/tests/partial-sigs/should_fail/T12634.stderr
- testsuite/tests/partial-sigs/should_fail/T12732.stderr
- testsuite/tests/partial-sigs/should_fail/T13324_fail1.stderr
- testsuite/tests/partial-sigs/should_fail/T14449.stderr
- testsuite/tests/partial-sigs/should_fail/T14479.stderr
- testsuite/tests/partial-sigs/should_fail/T23223.stderr
- testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
- testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr
- testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr
- testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr
- testsuite/tests/partial-sigs/should_run/T15415.stderr
- testsuite/tests/patsyn/should_compile/T13441b.stderr
- testsuite/tests/patsyn/should_compile/T23038.stderr
- testsuite/tests/patsyn/should_compile/T9975a.stderr
- testsuite/tests/patsyn/should_fail/T10873.stderr
- testsuite/tests/patsyn/should_fail/T11039.stderr
- testsuite/tests/patsyn/should_fail/T11265.stderr
- testsuite/tests/patsyn/should_fail/T11667.stderr
- testsuite/tests/patsyn/should_fail/T12165.stderr
- testsuite/tests/patsyn/should_fail/T12819.stderr
- testsuite/tests/patsyn/should_fail/T13349.stderr
- testsuite/tests/patsyn/should_fail/T13470.stderr
- testsuite/tests/patsyn/should_fail/T14112.stderr
- testsuite/tests/patsyn/should_fail/T14114.stderr
- testsuite/tests/patsyn/should_fail/T14507.stderr
- testsuite/tests/patsyn/should_fail/T14552.stderr
- testsuite/tests/patsyn/should_fail/T15289.stderr
- testsuite/tests/patsyn/should_fail/T15685.stderr
- testsuite/tests/patsyn/should_fail/T15694.stderr
- testsuite/tests/patsyn/should_fail/T16900.stderr
- testsuite/tests/patsyn/should_fail/T18856.stderr
- testsuite/tests/patsyn/should_fail/T21479.stderr
- testsuite/tests/patsyn/should_fail/T23467.stderr
- testsuite/tests/patsyn/should_fail/T9161-1.stderr
- testsuite/tests/patsyn/should_fail/T9161-2.stderr
- testsuite/tests/patsyn/should_fail/T9705-1.stderr
- testsuite/tests/patsyn/should_fail/T9705-2.stderr
- testsuite/tests/patsyn/should_fail/UnliftedPSBind.stderr
- testsuite/tests/patsyn/should_fail/export-class.stderr
- testsuite/tests/patsyn/should_fail/export-ps-rec-sel.stderr
- testsuite/tests/patsyn/should_fail/export-type-synonym.stderr
- testsuite/tests/patsyn/should_fail/export-type.stderr
- testsuite/tests/patsyn/should_fail/local.stderr
- testsuite/tests/patsyn/should_fail/mixed-pat-syn-record-sels.stderr
- testsuite/tests/patsyn/should_fail/mono.stderr
- testsuite/tests/patsyn/should_fail/records-check-sels.stderr
- testsuite/tests/patsyn/should_fail/records-exquant.stderr
- testsuite/tests/patsyn/should_fail/records-mixing-fields.stderr
- testsuite/tests/patsyn/should_fail/records-no-uni-update.stderr
- testsuite/tests/patsyn/should_fail/records-no-uni-update2.stderr
- testsuite/tests/patsyn/should_fail/records-nofieldselectors.stderr
- testsuite/tests/patsyn/should_fail/unboxed-bind.stderr
- testsuite/tests/patsyn/should_fail/unboxed-wrapper-naked.stderr
- testsuite/tests/patsyn/should_fail/unidir.stderr
- testsuite/tests/patsyn/should_run/ghci.stderr
- testsuite/tests/perf/compiler/T10547.stderr
- testsuite/tests/perf/compiler/parsing001.stderr
- testsuite/tests/plugins/plugins10.stdout
- testsuite/tests/polykinds/BadKindVar.stderr
- testsuite/tests/polykinds/KindVType.stderr
- testsuite/tests/polykinds/PolyKinds02.stderr
- testsuite/tests/polykinds/PolyKinds04.stderr
- testsuite/tests/polykinds/PolyKinds06.stderr
- testsuite/tests/polykinds/PolyKinds07.stderr
- testsuite/tests/polykinds/T10516.stderr
- testsuite/tests/polykinds/T10570.stderr
- testsuite/tests/polykinds/T11142.stderr
- testsuite/tests/polykinds/T11459.stderr
- testsuite/tests/polykinds/T11466.stderr
- testsuite/tests/polykinds/T11516.stderr
- testsuite/tests/polykinds/T11611.stderr
- testsuite/tests/polykinds/T12055a.stderr
- testsuite/tests/polykinds/T12444.stderr
- testsuite/tests/polykinds/T12593.stderr
- testsuite/tests/polykinds/T13267.stderr
- testsuite/tests/polykinds/T13393.stderr
- testsuite/tests/polykinds/T13625.stderr
- testsuite/tests/polykinds/T13659.stderr
- testsuite/tests/polykinds/T13738.stderr
- testsuite/tests/polykinds/T13985.stderr
- testsuite/tests/polykinds/T14174.stderr
- testsuite/tests/polykinds/T14265.stderr
- testsuite/tests/polykinds/T14520.stderr
- testsuite/tests/polykinds/T14710.stderr
- testsuite/tests/polykinds/T15116.stderr
- testsuite/tests/polykinds/T15116a.stderr
- testsuite/tests/polykinds/T15577.stderr
- testsuite/tests/polykinds/T15789.stderr
- testsuite/tests/polykinds/T15804.stderr
- testsuite/tests/polykinds/T15881.stderr
- testsuite/tests/polykinds/T15881a.stderr
- testsuite/tests/polykinds/T16221a.stderr
- testsuite/tests/polykinds/T16244.stderr
- testsuite/tests/polykinds/T16245.stderr
- testsuite/tests/polykinds/T16245a.stderr
- testsuite/tests/polykinds/T16247.stderr
- testsuite/tests/polykinds/T16247a.stderr
- testsuite/tests/polykinds/T16263.stderr
- testsuite/tests/polykinds/T16762b.stderr
- testsuite/tests/polykinds/T16902.stderr
- testsuite/tests/polykinds/T17841.stderr
- testsuite/tests/polykinds/T18451a.stderr
- testsuite/tests/polykinds/T22743.stderr
- testsuite/tests/polykinds/T22793.stderr
- testsuite/tests/polykinds/T24083.stderr
- testsuite/tests/polykinds/T24686.stderr
- testsuite/tests/polykinds/T24686a.stderr
- testsuite/tests/polykinds/T5716.stderr
- testsuite/tests/polykinds/T6129.stderr
- testsuite/tests/polykinds/T7053.stderr
- testsuite/tests/polykinds/T7151.stderr
- testsuite/tests/polykinds/T7224.stderr
- testsuite/tests/polykinds/T7230.stderr
- testsuite/tests/polykinds/T7328.stderr
- testsuite/tests/polykinds/T7341.stderr
- testsuite/tests/polykinds/T7433.stderr
- testsuite/tests/polykinds/T7524.stderr
- testsuite/tests/polykinds/T7594.stderr
- testsuite/tests/polykinds/T7939a.stderr
- testsuite/tests/polykinds/T8132.stderr
- testsuite/tests/polykinds/T8566.stderr
- testsuite/tests/polykinds/T8616.stderr
- testsuite/tests/polykinds/T9017.stderr
- testsuite/tests/polykinds/T9106.stderr
- testsuite/tests/polykinds/T9144.stderr
- testsuite/tests/polykinds/T9200b.stderr
- testsuite/tests/polykinds/T9574.stderr
- testsuite/tests/polykinds/TidyClassKinds.stderr
- testsuite/tests/polykinds/TyVarTvKinds3.stderr
- testsuite/tests/printer/ListTuplePuns.stderr
- testsuite/tests/printer/T14343.stderr
- testsuite/tests/printer/T14343b.stderr
- testsuite/tests/printer/Test20315.stderr
- testsuite/tests/qualifieddo/should_fail/qdofail001.stderr
- testsuite/tests/qualifieddo/should_fail/qdofail003.stderr
- testsuite/tests/quantified-constraints/T15231.stderr
- testsuite/tests/quantified-constraints/T15316.stderr
- testsuite/tests/quantified-constraints/T15316A.stderr
- testsuite/tests/quantified-constraints/T15334.stderr
- testsuite/tests/quantified-constraints/T15918.stderr
- testsuite/tests/quantified-constraints/T16474.stderr
- testsuite/tests/quantified-constraints/T17267.stderr
- testsuite/tests/quantified-constraints/T17267a.stderr
- testsuite/tests/quantified-constraints/T17267b.stderr
- testsuite/tests/quantified-constraints/T17267c.stderr
- testsuite/tests/quantified-constraints/T17267e.stderr
- testsuite/tests/quantified-constraints/T17458.stderr
- testsuite/tests/quasiquotation/qq006/qq006.stderr
- testsuite/tests/quotes/TH_abstractFamily.stderr
- testsuite/tests/quotes/TH_top_splice.stderr
- testsuite/tests/rebindable/DoParamM.stderr
- testsuite/tests/rebindable/T20126.stderr
- testsuite/tests/rebindable/rebindable11.stderr
- testsuite/tests/rebindable/rebindable12.stderr
- testsuite/tests/rebindable/rebindable6.stderr
- testsuite/tests/rename/prog002/rename.prog002.stderr
- testsuite/tests/rename/prog003/rename.prog003.stderr
- testsuite/tests/rename/should_compile/T3823.stderr
- testsuite/tests/rename/should_compile/T4426.stderr
- testsuite/tests/rename/should_fail/DifferentExportWarnings.stderr
- testsuite/tests/rename/should_fail/ExplicitForAllRules2.stderr
- testsuite/tests/rename/should_fail/ImportLookupIllegal.stderr
- testsuite/tests/rename/should_fail/PackageImportsDisabled.stderr
- testsuite/tests/rename/should_fail/RnDefaultSigFail.stderr
- testsuite/tests/rename/should_fail/RnEmptyCaseFail.stderr
- testsuite/tests/rename/should_fail/RnEmptyStatementGroup1.stderr
- testsuite/tests/rename/should_fail/RnImplicitBindInMdoNotation.stderr
- testsuite/tests/rename/should_fail/RnMultipleFixityFail.stderr
- testsuite/tests/rename/should_fail/RnMultipleMinimalPragmaFail.stderr
- testsuite/tests/rename/should_fail/RnPatternSynonymFail.stderr
- testsuite/tests/rename/should_fail/RnStaticPointersFail01.stderr
- testsuite/tests/rename/should_fail/RnStaticPointersFail02.stderr
- testsuite/tests/rename/should_fail/RnStaticPointersFail03.stderr
- testsuite/tests/rename/should_fail/RnStupidThetaInGadt.stderr
- testsuite/tests/rename/should_fail/RnUnexpectedStandaloneDeriving.stderr
- testsuite/tests/rename/should_fail/T10618.stderr
- testsuite/tests/rename/should_fail/T10668.stderr
- testsuite/tests/rename/should_fail/T10781.stderr
- testsuite/tests/rename/should_fail/T11071.stderr
- testsuite/tests/rename/should_fail/T11071a.stderr
- testsuite/tests/rename/should_fail/T11167_ambig.stderr
- testsuite/tests/rename/should_fail/T11592.stderr
- testsuite/tests/rename/should_fail/T11663.stderr
- testsuite/tests/rename/should_fail/T12146.stderr
- testsuite/tests/rename/should_fail/T12681.stderr
- testsuite/tests/rename/should_fail/T12686b.stderr
- testsuite/tests/rename/should_fail/T13568.stderr
- testsuite/tests/rename/should_fail/T13644.stderr
- testsuite/tests/rename/should_fail/T13839b.stderr
- testsuite/tests/rename/should_fail/T13847.stderr
- testsuite/tests/rename/should_fail/T13947.stderr
- testsuite/tests/rename/should_fail/T14032f.stderr
- testsuite/tests/rename/should_fail/T14225.stderr
- testsuite/tests/rename/should_fail/T14307.stderr
- testsuite/tests/rename/should_fail/T14548.stderr
- testsuite/tests/rename/should_fail/T14591.stderr
- testsuite/tests/rename/should_fail/T14907b.stderr
- testsuite/tests/rename/should_fail/T15487.stderr
- testsuite/tests/rename/should_fail/T15539.stderr
- testsuite/tests/rename/should_fail/T15607.stderr
- testsuite/tests/rename/should_fail/T15611a.stderr
- testsuite/tests/rename/should_fail/T15611b.stderr
- testsuite/tests/rename/should_fail/T15659.stderr
- testsuite/tests/rename/should_fail/T15957_Fail.stderr
- testsuite/tests/rename/should_fail/T1595a.stderr
- testsuite/tests/rename/should_fail/T16002.stderr
- testsuite/tests/rename/should_fail/T16116b.stderr
- testsuite/tests/rename/should_fail/T16385.stderr
- testsuite/tests/rename/should_fail/T16504.stderr
- testsuite/tests/rename/should_fail/T16610.stderr
- testsuite/tests/rename/should_fail/T16635a.stderr
- testsuite/tests/rename/should_fail/T16635c.stderr
- testsuite/tests/rename/should_fail/T17593.stderr
- testsuite/tests/rename/should_fail/T18021.stderr
- testsuite/tests/rename/should_fail/T18138.stderr
- testsuite/tests/rename/should_fail/T18145.stderr
- testsuite/tests/rename/should_fail/T18240b.stderr
- testsuite/tests/rename/should_fail/T18740b.stderr
- testsuite/tests/rename/should_fail/T19781.stderr
- testsuite/tests/rename/should_fail/T19843a.stderr
- testsuite/tests/rename/should_fail/T19843b.stderr
- testsuite/tests/rename/should_fail/T19843d.stderr
- testsuite/tests/rename/should_fail/T19843e.stderr
- testsuite/tests/rename/should_fail/T19843f.stderr
- testsuite/tests/rename/should_fail/T19843g.stderr
- testsuite/tests/rename/should_fail/T19843i.stderr
- testsuite/tests/rename/should_fail/T19843j.stderr
- testsuite/tests/rename/should_fail/T19843k.stderr
- testsuite/tests/rename/should_fail/T19843l.stderr
- testsuite/tests/rename/should_fail/T19843m.stderr
- testsuite/tests/rename/should_fail/T20147.stderr
- testsuite/tests/rename/should_fail/T21605a.stderr
- testsuite/tests/rename/should_fail/T21605b.stderr
- testsuite/tests/rename/should_fail/T21605c.stderr
- testsuite/tests/rename/should_fail/T21605d.stderr
- testsuite/tests/rename/should_fail/T22478d.stderr
- testsuite/tests/rename/should_fail/T22839.stderr
- testsuite/tests/rename/should_fail/T23301.stderr
- testsuite/tests/rename/should_fail/T23512a.stderr
- testsuite/tests/rename/should_fail/T23570.stderr
- testsuite/tests/rename/should_fail/T23740a.stderr
- testsuite/tests/rename/should_fail/T23740b.stderr
- testsuite/tests/rename/should_fail/T23740c.stderr
- testsuite/tests/rename/should_fail/T23740d.stderr
- testsuite/tests/rename/should_fail/T23740e.stderr
- testsuite/tests/rename/should_fail/T23740f.stderr
- testsuite/tests/rename/should_fail/T23740g.stderr
- testsuite/tests/rename/should_fail/T23740h.stderr
- testsuite/tests/rename/should_fail/T23740j.stderr
- testsuite/tests/rename/should_fail/T2490.stderr
- testsuite/tests/rename/should_fail/T25437.stderr
- testsuite/tests/rename/should_fail/T2901.stderr
- testsuite/tests/rename/should_fail/T2993.stderr
- testsuite/tests/rename/should_fail/T3265.stderr
- testsuite/tests/rename/should_fail/T3792.stderr
- testsuite/tests/rename/should_fail/T4042.stderr
- testsuite/tests/rename/should_fail/T495.stderr
- testsuite/tests/rename/should_fail/T5001b.stderr
- testsuite/tests/rename/should_fail/T5372.stderr
- testsuite/tests/rename/should_fail/T5385.stderr
- testsuite/tests/rename/should_fail/T5513.stderr
- testsuite/tests/rename/should_fail/T5533.stderr
- testsuite/tests/rename/should_fail/T5589.stderr
- testsuite/tests/rename/should_fail/T5657.stderr
- testsuite/tests/rename/should_fail/T5745.stderr
- testsuite/tests/rename/should_fail/T5892a.stderr
- testsuite/tests/rename/should_fail/T5892b.stderr
- testsuite/tests/rename/should_fail/T6018rnfail.stderr
- testsuite/tests/rename/should_fail/T6060.stderr
- testsuite/tests/rename/should_fail/T6148a.stderr
- testsuite/tests/rename/should_fail/T6148b.stderr
- testsuite/tests/rename/should_fail/T6148c.stderr
- testsuite/tests/rename/should_fail/T7164.stderr
- testsuite/tests/rename/should_fail/T7338.stderr
- testsuite/tests/rename/should_fail/T7338a.stderr
- testsuite/tests/rename/should_fail/T7906.stderr
- testsuite/tests/rename/should_fail/T7937.stderr
- testsuite/tests/rename/should_fail/T7943.stderr
- testsuite/tests/rename/should_fail/T8448.stderr
- testsuite/tests/rename/should_fail/T9077.stderr
- testsuite/tests/rename/should_fail/T9156.stderr
- testsuite/tests/rename/should_fail/T9156_DF.stderr
- testsuite/tests/rename/should_fail/T9177.stderr
- testsuite/tests/rename/should_fail/T9177a.stderr
- testsuite/tests/rename/should_fail/T9436.stderr
- testsuite/tests/rename/should_fail/T9815.stderr
- testsuite/tests/rename/should_fail/T9815b.stderr
- testsuite/tests/rename/should_fail/T9815bghci.stderr
- testsuite/tests/rename/should_fail/T9815ghci.stderr
- testsuite/tests/rename/should_fail/mc13.stderr
- testsuite/tests/rename/should_fail/mc14.stderr
- testsuite/tests/rename/should_fail/rnfail001.stderr
- testsuite/tests/rename/should_fail/rnfail002.stderr
- testsuite/tests/rename/should_fail/rnfail003.stderr
- testsuite/tests/rename/should_fail/rnfail004.stderr
- testsuite/tests/rename/should_fail/rnfail007.stderr
- testsuite/tests/rename/should_fail/rnfail008.stderr
- testsuite/tests/rename/should_fail/rnfail009.stderr
- testsuite/tests/rename/should_fail/rnfail010.stderr
- testsuite/tests/rename/should_fail/rnfail011.stderr
- testsuite/tests/rename/should_fail/rnfail012.stderr
- testsuite/tests/rename/should_fail/rnfail013.stderr
- testsuite/tests/rename/should_fail/rnfail015.stderr
- testsuite/tests/rename/should_fail/rnfail017.stderr
- testsuite/tests/rename/should_fail/rnfail018.stderr
- testsuite/tests/rename/should_fail/rnfail019.stderr
- testsuite/tests/rename/should_fail/rnfail021.stderr
- testsuite/tests/rename/should_fail/rnfail022.stderr
- testsuite/tests/rename/should_fail/rnfail023.stderr
- testsuite/tests/rename/should_fail/rnfail024.stderr
- testsuite/tests/rename/should_fail/rnfail025.stderr
- testsuite/tests/rename/should_fail/rnfail027.stderr
- testsuite/tests/rename/should_fail/rnfail028.stderr
- testsuite/tests/rename/should_fail/rnfail029.stderr
- testsuite/tests/rename/should_fail/rnfail030.stderr
- testsuite/tests/rename/should_fail/rnfail031.stderr
- testsuite/tests/rename/should_fail/rnfail032.stderr
- testsuite/tests/rename/should_fail/rnfail033.stderr
- testsuite/tests/rename/should_fail/rnfail034.stderr
- testsuite/tests/rename/should_fail/rnfail035.stderr
- testsuite/tests/rename/should_fail/rnfail039.stderr
- testsuite/tests/rename/should_fail/rnfail040.stderr
- testsuite/tests/rename/should_fail/rnfail041.stderr
- testsuite/tests/rename/should_fail/rnfail042.stderr
- testsuite/tests/rename/should_fail/rnfail043.stderr
- testsuite/tests/rename/should_fail/rnfail044.stderr
- testsuite/tests/rename/should_fail/rnfail045.stderr
- testsuite/tests/rename/should_fail/rnfail046.stderr
- testsuite/tests/rename/should_fail/rnfail047.stderr
- testsuite/tests/rename/should_fail/rnfail048.stderr
- testsuite/tests/rename/should_fail/rnfail049.stderr
- testsuite/tests/rename/should_fail/rnfail050.stderr
- testsuite/tests/rename/should_fail/rnfail053.stderr
- testsuite/tests/rename/should_fail/rnfail054.stderr
- testsuite/tests/rename/should_fail/rnfail056.stderr
- testsuite/tests/rename/should_fail/rnfail057.stderr
- testsuite/tests/rename/should_fail/rnfail058.stderr
- testsuite/tests/rename/should_fail/rnfail059.stderr
- testsuite/tests/rep-poly/EtaExpandStupid2.stderr
- testsuite/tests/rep-poly/LevPolyDataToTag2.stderr
- testsuite/tests/rep-poly/LevPolyLet.stderr
- testsuite/tests/rep-poly/RepPolyApp.stderr
- testsuite/tests/rep-poly/RepPolyArrowCmd.stderr
- testsuite/tests/rep-poly/RepPolyArrowFun.stderr
- testsuite/tests/rep-poly/RepPolyBackpack1.stderr
- testsuite/tests/rep-poly/RepPolyCase1.stderr
- testsuite/tests/rep-poly/RepPolyCase2.stderr
- testsuite/tests/rep-poly/RepPolyClassMethod.stderr
- testsuite/tests/rep-poly/RepPolyDeferred.stderr
- testsuite/tests/rep-poly/RepPolyLambda.stderr
- testsuite/tests/rep-poly/RepPolyMatch.stderr
- testsuite/tests/rep-poly/RepPolyNewtypePat1.stderr
- testsuite/tests/rep-poly/RepPolyPatSynArg.stderr
- testsuite/tests/rep-poly/RepPolyPatSynRes.stderr
- testsuite/tests/rep-poly/RepPolyPatSynUnliftedNewtype.stderr
- testsuite/tests/rep-poly/RepPolyRecordPattern.stderr
- testsuite/tests/rep-poly/RepPolyRule2.stderr
- testsuite/tests/rep-poly/RepPolyRule3.stderr
- testsuite/tests/rep-poly/RepPolySum.stderr
- testsuite/tests/rep-poly/RepPolyUnboxedPatterns.stderr
- testsuite/tests/rep-poly/RepPolyWildcardPattern.stderr
- testsuite/tests/rep-poly/T11724.stderr
- testsuite/tests/rep-poly/T14765.stderr
- testsuite/tests/rep-poly/T17021.stderr
- testsuite/tests/rep-poly/T17360.stderr
- testsuite/tests/rep-poly/T18534.stderr
- testsuite/tests/rep-poly/T19709a.stderr
- testsuite/tests/rep-poly/T20113.stderr
- testsuite/tests/rep-poly/T20277.stderr
- testsuite/tests/rep-poly/T20363.stderr
- testsuite/tests/rep-poly/T20363b.stderr
- testsuite/tests/rep-poly/T20423.stderr
- testsuite/tests/rep-poly/T20423b.stderr
- testsuite/tests/rep-poly/T20426.stderr
- testsuite/tests/rep-poly/T21650_a.stderr
- testsuite/tests/rep-poly/T21650_b.stderr
- testsuite/tests/rep-poly/T23051.stderr
- testsuite/tests/rep-poly/T23176.stderr
- testsuite/tests/rep-poly/UnliftedNewtypesLevityBinder.stderr
- testsuite/tests/roles/should_fail/Roles11.stderr
- testsuite/tests/roles/should_fail/Roles5.stderr
- testsuite/tests/roles/should_fail/Roles6.stderr
- testsuite/tests/roles/should_fail/Roles8.stderr
- testsuite/tests/roles/should_fail/T8773.stderr
- testsuite/tests/runghc/T17171a.stderr
- testsuite/tests/safeHaskell/check/Check06.stderr
- testsuite/tests/safeHaskell/check/Check08.stderr
- testsuite/tests/safeHaskell/check/Check09.stderr
- testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr
- testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.stderr
- testsuite/tests/safeHaskell/flags/SafeFlags23.stderr
- testsuite/tests/safeHaskell/flags/SafeFlags26.stderr
- testsuite/tests/safeHaskell/ghci/p10.stderr
- testsuite/tests/safeHaskell/ghci/p11.stderr
- testsuite/tests/safeHaskell/ghci/p12.stderr
- testsuite/tests/safeHaskell/ghci/p13.stderr
- testsuite/tests/safeHaskell/ghci/p14.stderr
- testsuite/tests/safeHaskell/ghci/p16.stderr
- testsuite/tests/safeHaskell/ghci/p17.stderr
- testsuite/tests/safeHaskell/ghci/p18.stdout
- testsuite/tests/safeHaskell/ghci/p3.stderr
- testsuite/tests/safeHaskell/ghci/p4.stderr
- testsuite/tests/safeHaskell/ghci/p6.stderr
- testsuite/tests/safeHaskell/ghci/p9.stderr
- testsuite/tests/safeHaskell/overlapping/SH_Overlap1.stderr
- testsuite/tests/safeHaskell/overlapping/SH_Overlap2.stderr
- testsuite/tests/safeHaskell/overlapping/SH_Overlap5.stderr
- testsuite/tests/safeHaskell/overlapping/SH_Overlap6.stderr
- testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr
- testsuite/tests/safeHaskell/safeInfered/Mixed01.stderr
- testsuite/tests/safeHaskell/safeInfered/Mixed02.stderr
- testsuite/tests/safeHaskell/safeInfered/Mixed03.stderr
- testsuite/tests/safeHaskell/safeInfered/UnsafeInfered01.stderr
- testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.stderr
- testsuite/tests/safeHaskell/safeInfered/UnsafeInfered03.stderr
- testsuite/tests/safeHaskell/safeInfered/UnsafeInfered05.stderr
- testsuite/tests/safeHaskell/safeInfered/UnsafeInfered06.stderr
- testsuite/tests/safeHaskell/safeInfered/UnsafeInfered09.stderr
- testsuite/tests/safeHaskell/safeInfered/UnsafeInfered10.stderr
- testsuite/tests/safeHaskell/safeInfered/UnsafeInfered11.stderr
- testsuite/tests/safeHaskell/safeInfered/UnsafeInfered12.stderr
- testsuite/tests/safeHaskell/safeLanguage/SafeLang07.stderr
- testsuite/tests/safeHaskell/safeLanguage/SafeLang08.stderr
- testsuite/tests/safeHaskell/safeLanguage/SafeLang10.stderr
- testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr
- testsuite/tests/safeHaskell/safeLanguage/SafeLang17.stderr
- testsuite/tests/safeHaskell/unsafeLibs/BadImport01.stderr
- testsuite/tests/safeHaskell/unsafeLibs/BadImport06.stderr
- testsuite/tests/safeHaskell/unsafeLibs/BadImport07.stderr
- testsuite/tests/safeHaskell/unsafeLibs/BadImport08.stderr
- testsuite/tests/safeHaskell/unsafeLibs/BadImport09.stderr
- testsuite/tests/safeHaskell/unsafeLibs/Dep05.stderr
- testsuite/tests/safeHaskell/unsafeLibs/Dep06.stderr
- testsuite/tests/safeHaskell/unsafeLibs/Dep07.stderr
- testsuite/tests/safeHaskell/unsafeLibs/Dep08.stderr
- testsuite/tests/safeHaskell/unsafeLibs/Dep09.stderr
- testsuite/tests/safeHaskell/unsafeLibs/Dep10.stderr
- testsuite/tests/saks/should_fail/T16725.stderr
- testsuite/tests/saks/should_fail/T16727a.stderr
- testsuite/tests/saks/should_fail/T16727b.stderr
- testsuite/tests/saks/should_fail/T16756b.stderr
- testsuite/tests/saks/should_fail/T16826.stderr
- testsuite/tests/saks/should_fail/T18863a.stderr
- testsuite/tests/saks/should_fail/saks007_fail.stderr
- testsuite/tests/saks/should_fail/saks_fail001.stderr
- testsuite/tests/saks/should_fail/saks_fail002.stderr
- testsuite/tests/saks/should_fail/saks_fail004.stderr
- testsuite/tests/saks/should_fail/saks_fail005.stderr
- testsuite/tests/saks/should_fail/saks_fail006.stderr
- testsuite/tests/saks/should_fail/saks_fail008.stderr
- testsuite/tests/saks/should_fail/saks_fail009.stderr
- testsuite/tests/saks/should_fail/saks_fail010.stderr
- testsuite/tests/saks/should_fail/saks_fail011.stderr
- testsuite/tests/saks/should_fail/saks_fail012.stderr
- testsuite/tests/saks/should_fail/saks_fail013.stderr
- testsuite/tests/saks/should_fail/saks_fail014.stderr
- testsuite/tests/saks/should_fail/saks_fail015.stderr
- testsuite/tests/saks/should_fail/saks_fail016.stderr
- testsuite/tests/saks/should_fail/saks_fail017.stderr
- testsuite/tests/saks/should_fail/saks_fail018.stderr
- testsuite/tests/saks/should_fail/saks_fail019.stderr
- testsuite/tests/saks/should_fail/saks_fail020.stderr
- testsuite/tests/saks/should_fail/saks_fail021.stderr
- testsuite/tests/saks/should_fail/saks_fail022.stderr
- testsuite/tests/saks/should_fail/saks_fail023.stderr
- testsuite/tests/saks/should_fail/saks_fail026.stderr
- testsuite/tests/splice-imports/SI29.stderr
- testsuite/tests/th/T11452.stderr
- testsuite/tests/th/T15321.stderr
- testsuite/tests/th/T7276.stderr
- testsuite/tests/th/TH_NestedSplicesFail3.stderr
- testsuite/tests/th/TH_NestedSplicesFail4.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/165859aad9e5a1dcd1fd7a40f0a047…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/165859aad9e5a1dcd1fd7a40f0a047…
You're receiving this email because of your account on gitlab.haskell.org.
1
0

[Git][ghc/ghc][wip/haanss/depdir] replace spaces with tabs in makefile tests for dependentDir, because for some...
by Hassan Al-Awwadi (@hassan.awwadi) 18 Aug '25
by Hassan Al-Awwadi (@hassan.awwadi) 18 Aug '25
18 Aug '25
Hassan Al-Awwadi pushed to branch wip/haanss/depdir at Glasgow Haskell Compiler / GHC
Commits:
370faa27 by Hassan Al-Awwadi at 2025-08-18T14:21:12+02:00
replace spaces with tabs in makefile tests for dependentDir, because for some reason we use tabs here...
- - - - -
1 changed file:
- testsuite/tests/th/Makefile
Changes:
=====================================
testsuite/tests/th/Makefile
=====================================
@@ -55,25 +55,25 @@ TH_Depends_Dir:
mkdir DONT_TRIGGER_RECOMP
# First build with an empty dependent directory
- '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) --make -package template-haskell -v0 TH_Depends_Dir
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) --make -package template-haskell -v0 TH_Depends_Dir
./TH_Depends_Dir
# Create a file in the dependent directory to trigger recompilation
sleep 2
echo "dummy" > TRIGGER_RECOMP/dummy.txt
- '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) --make -package template-haskell -v0 TH_Depends_Dir
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) --make -package template-haskell -v0 TH_Depends_Dir
./TH_Depends_Dir
# Remove the file to check that recompilation is triggered
sleep 2
$(RM) TRIGGER_RECOMP/dummy.txt
- '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) --make -package template-haskell -v0 TH_Depends_Dir
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) --make -package template-haskell -v0 TH_Depends_Dir
./TH_Depends_Dir
# Should not trigger recompilation
sleep 2
echo "dummy" > DONT_TRIGGER_RECOMP/dummy.txt
- '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) --make -package template-haskell -v0 TH_Depends_Dir
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) --make -package template-haskell -v0 TH_Depends_Dir
./TH_Depends_Dir
# Should trigger a recompilation. Note that we should also see the change
@@ -81,7 +81,7 @@ TH_Depends_Dir:
# as we recompile, it just doesn't *trigger* a recompilation.
sleep 2
rm -rf TRIGGER_RECOMP
- '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) --make -package template-haskell -v0 TH_Depends_Dir
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) --make -package template-haskell -v0 TH_Depends_Dir
./TH_Depends_Dir
T8333:
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/370faa27c95e90d74d7e1ca2b6cad2e…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/370faa27c95e90d74d7e1ca2b6cad2e…
You're receiving this email because of your account on gitlab.haskell.org.
1
0

[Git][ghc/ghc][wip/batch-loaddll] 12 commits: Make injecting implicit bindings into its own pass
by Cheng Shao (@TerrorJack) 18 Aug '25
by Cheng Shao (@TerrorJack) 18 Aug '25
18 Aug '25
Cheng Shao pushed to branch wip/batch-loaddll at Glasgow Haskell Compiler / GHC
Commits:
fd811ded by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Make injecting implicit bindings into its own pass
Previously we were injecting "impliicit bindings" (data constructor
worker and wrappers etc)
- both at the end of CoreTidy,
- and at the start of CorePrep
This is unpleasant and confusing. This patch puts it it its own pass,
addImplicitBinds, which runs between the two.
The function `GHC.CoreToStg.AddImplicitBinds.addImplicitBinds` now takes /all/
TyCons, not just the ones for algebraic data types. That change ripples
through to
- corePrepPgm
- doCodeGen
- byteCodeGen
All take [TyCon] which includes all TyCons
- - - - -
9bd7fcc5 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Implement unary classes
The big change is described exhaustively in
Note [Unary class magic] in GHC.Core.TyCon
Other changes
* We never unbox class dictionaries in worker/wrapper. This has been true for some
time now, but the logic is now centralised in functions in
GHC.Core.Opt.WorkWrap.Utils, namely `canUnboxTyCon`, and `canUnboxArg`
See Note [Do not unbox class dictionaries] in GHC.Core.Opt.WorkWrap.Utils.
* Refactored the `notWorthFloating` logic in GHc.Core.Opt.SetLevels.
I can't remember if I actually changed any behaviour here, but if so it's
only in a corner cases.
* Fixed a bug in `GHC.Core.TyCon.isEnumerationTyCon`, which was wrongly returning
True for (##).
* Remove redundant Role argument to `liftCoSubstWithEx`. It was always
Representational.
* I refactored evidence generation in the constraint solver:
* Made GHC.Tc.Types.Evidence contain better abstactions for evidence
generation.
* I deleted the file `GHC.Tc.Types.EvTerm` and merged its (small) contents
elsewhere. It wasn't paying its way.
* Made evidence for implicit parameters go via a proper abstraction.
* Fix inlineBoringOk; see (IB6) in Note [inlineBoringOk]
This fixes a slowdown in `countdownEffectfulDynLocal`
in the `effectful` library.
Smaller things
* Rename `isDataTyCon` to `isBoxedDataTyCon`.
* GHC.Core.Corecion.liftCoSubstWithEx was only called with Representational role,
so I baked that into the function and removed the argument.
* Get rid of `GHC.Core.TyCon.tyConSingleAlgDataCon_maybe` in favour of calling
`not isNewTyCon` at the call sites; more explicit.
* Refatored `GHC.Core.TyCon.isInjectiveTyCon`; but I don't think I changed its
behaviour
* Moved `decomposeIPPred` to GHC.Core.Predicate
Compile time performance changes:
geo. mean +0.1%
minimum -6.8%
maximum +14.4%
The +14% one is in T21839c, where it seems that a bit more inlining
is taking place. That seems acceptable; and the average change is small
Metric Decrease:
LargeRecord
T12227
T12707
T16577
T21839r
T5642
Metric Increase:
T15164
T21839c
T3294
T5321FD
T5321Fun
WWRec
- - - - -
b4075d71 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Slight improvement to pre/postInlineUnconditionally
Avoids an extra simplifier iteration
- - - - -
9e443596 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Fix a long-standing assertion error in normSplitTyConApp_maybe
- - - - -
91310ad0 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Add comment to coercion optimiser
- - - - -
5b841d82 by Teo Camarasu at 2025-08-14T17:57:56-04:00
template-haskell: move some identifiers from ghc-internal to template-haskell
These identifiers are not used internally by the compiler. Therefore we
have no reason for them to be in ghc-internal.
By moving them to template-haskell, we benefit from it being easier to
change them and we avoid having to build them in stage0.
Resolves #26048
- - - - -
33e2c7e5 by Teo Camarasu at 2025-08-14T17:57:56-04:00
template-haskell: transfer $infix note to public module
This Haddock note should be in the public facing module
- - - - -
2a411fc4 by Sylvain Henry at 2025-08-14T17:59:09-04:00
JS: export HEAP8 symbol (#26290)
Newer Emscripten requires this.
- - - - -
248f78ca by Ben Gamari at 2025-08-14T17:59:51-04:00
users-guide: Drop the THREAD_RUNNABLE event
As of f361281c89fbce42865d8b8b27b0957205366186 it is no longer emitted.
- - - - -
706d33e3 by Recursion Ninja at 2025-08-15T04:12:12-04:00
Resolving issues #20645 and #26109
Correctly sign extending and casting smaller bit width types for LLVM operations:
- bitReverse8#
- bitReverse16#
- bitReverse32#
- byteSwap16#
- byteSwap32#
- pdep8#
- pdep16#
- pext8#
- pext16#
- - - - -
1cdc6f46 by Cheng Shao at 2025-08-15T04:12:56-04:00
hadrian: enforce have_llvm=False for wasm32/js
This patch fixes hadrian to always pass have_llvm=False to the
testsuite driver for wasm32/js targets. These targets don't really
support the LLVM backend, and the optllvm test way doesn't work. We
used to special-case wasm32/js to avoid auto-adding optllvm way in
testsuite/config/ghc, but this is still problematic if someone writes
a new LLVM-related test and uses something like when(have_llvm(),
extra_ways(["optllvm"])). So better just enforce have_llvm=False for
these targets here.
- - - - -
b10ad5a5 by Cheng Shao at 2025-08-18T14:17:47+02:00
ghci: LoadDLL -> LoadDLLs
Closes #25407.
Co-authored-by: Codex <codex(a)openai.com>
- - - - -
130 changed files:
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/InfoTable.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Core/Class.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Unfold.hs
- compiler/GHC/Core/Unfold/Make.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToStg.hs
- + compiler/GHC/CoreToStg/AddImplicitBinds.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Foreign/Call.hs
- compiler/GHC/Iface/Decl.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Linker/MacOS.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Instance/Family.hs
- compiler/GHC/Tc/Solver/Default.hs
- compiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/Solver/Equality.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Solver/Solve.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Build.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- − compiler/GHC/Tc/Types/EvTerm.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/Types/Demand.hs
- compiler/GHC/Types/Id.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Types/RepType.hs
- compiler/GHC/Types/TyThing.hs
- compiler/ghc.cabal.in
- docs/users_guide/eventlog-formats.rst
- hadrian/src/Settings/Builders/RunTest.hs
- libraries/ghc-internal/cbits/pdep.c
- libraries/ghc-internal/cbits/pext.c
- libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs
- libraries/ghci/GHCi/Message.hs
- libraries/ghci/GHCi/ObjLink.hs
- libraries/ghci/GHCi/Run.hs
- libraries/template-haskell/Language/Haskell/TH/Lib.hs
- libraries/template-haskell/Language/Haskell/TH/Quote.hs
- libraries/template-haskell/Language/Haskell/TH/Syntax.hs
- libraries/template-haskell/tests/all.T
- rts/js/mem.js
- testsuite/config/ghc
- testsuite/driver/testlib.py
- testsuite/tests/core-to-stg/T24124.stderr
- testsuite/tests/deSugar/should_compile/T2431.stderr
- testsuite/tests/dmdanal/should_compile/T16029.stdout
- testsuite/tests/dmdanal/sigs/T21119.stderr
- testsuite/tests/dmdanal/sigs/T21888.stderr
- testsuite/tests/ghci.debugger/scripts/break011.stdout
- testsuite/tests/ghci.debugger/scripts/break024.stdout
- testsuite/tests/indexed-types/should_compile/T2238.hs
- testsuite/tests/interface-stability/template-haskell-exports.stdout
- + testsuite/tests/llvm/should_run/T20645.hs
- + testsuite/tests/llvm/should_run/T20645.stdout
- testsuite/tests/llvm/should_run/all.T
- testsuite/tests/numeric/should_compile/T15547.stderr
- testsuite/tests/numeric/should_compile/T23907.stderr
- testsuite/tests/numeric/should_run/foundation.hs
- testsuite/tests/quasiquotation/T4491/test.T
- testsuite/tests/roles/should_compile/Roles14.stderr
- testsuite/tests/roles/should_compile/Roles3.stderr
- testsuite/tests/roles/should_compile/Roles4.stderr
- testsuite/tests/simplCore/should_compile/DataToTagFamilyScrut.stderr
- testsuite/tests/simplCore/should_compile/T15205.stderr
- testsuite/tests/simplCore/should_compile/T17366.stderr
- testsuite/tests/simplCore/should_compile/T17966.stderr
- testsuite/tests/simplCore/should_compile/T22309.stderr
- testsuite/tests/simplCore/should_compile/T22375DataFamily.stderr
- testsuite/tests/simplCore/should_compile/T23307.stderr
- testsuite/tests/simplCore/should_compile/T23307a.stderr
- testsuite/tests/simplCore/should_compile/T25389.stderr
- testsuite/tests/simplCore/should_compile/T25713.stderr
- testsuite/tests/simplCore/should_compile/T7360.stderr
- testsuite/tests/simplStg/should_compile/T15226b.stderr
- testsuite/tests/tcplugins/CtIdPlugin.hs
- testsuite/tests/th/Makefile
- testsuite/tests/typecheck/should_compile/Makefile
- testsuite/tests/typecheck/should_compile/T12763.stderr
- testsuite/tests/typecheck/should_compile/T14774.stdout
- testsuite/tests/typecheck/should_compile/T18406b.stderr
- testsuite/tests/typecheck/should_compile/T18529.stderr
- testsuite/tests/typecheck/should_compile/all.T
- testsuite/tests/unboxedsums/unpack_sums_7.stdout
- testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs
- testsuite/tests/wasm/should_run/control-flow/RunWasm.hs
- utils/genprimopcode/Lexer.x
- utils/genprimopcode/Main.hs
- utils/genprimopcode/Parser.y
- utils/genprimopcode/ParserM.hs
- utils/genprimopcode/Syntax.hs
- utils/jsffi/dyld.mjs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f45442e17774e69f3d630cda8f15c0…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f45442e17774e69f3d630cda8f15c0…
You're receiving this email because of your account on gitlab.haskell.org.
1
0

[Git][ghc/ghc][wip/fendor/bump-bootstrap-ci-version] 2 commits: Bump dependencies of hadrian-bootstrap-gen to use GHC 9.6.7
by Hannes Siebenhandl (@fendor) 18 Aug '25
by Hannes Siebenhandl (@fendor) 18 Aug '25
18 Aug '25
Hannes Siebenhandl pushed to branch wip/fendor/bump-bootstrap-ci-version at Glasgow Haskell Compiler / GHC
Commits:
9092c0a9 by fendor at 2025-08-18T12:21:47+02:00
Bump dependencies of hadrian-bootstrap-gen to use GHC 9.6.7
- - - - -
20f87cee by fendor at 2025-08-18T12:22:39+02:00
Update bootstrap `plan-*.json`s to GHC 9.10.1 and 9.12.2
Remove older GHC bootstrap configurations.
We require GHC 9.10.1 to build GHC.
- - - - -
21 changed files:
- hadrian/bootstrap/generate_bootstrap_plans
- hadrian/bootstrap/hadrian-bootstrap-gen.cabal
- hadrian/bootstrap/plan-9_10_1.json
- hadrian/bootstrap/plan-9_6_5.json → hadrian/bootstrap/plan-9_12_2.json
- − hadrian/bootstrap/plan-9_6_1.json
- − hadrian/bootstrap/plan-9_6_2.json
- − hadrian/bootstrap/plan-9_6_3.json
- − hadrian/bootstrap/plan-9_6_4.json
- − hadrian/bootstrap/plan-9_6_6.json
- − hadrian/bootstrap/plan-9_8_1.json
- − hadrian/bootstrap/plan-9_8_2.json
- hadrian/bootstrap/plan-bootstrap-9_10_1.json
- hadrian/bootstrap/plan-bootstrap-9_6_5.json → hadrian/bootstrap/plan-bootstrap-9_12_2.json
- − hadrian/bootstrap/plan-bootstrap-9_6_1.json
- − hadrian/bootstrap/plan-bootstrap-9_6_2.json
- − hadrian/bootstrap/plan-bootstrap-9_6_3.json
- − hadrian/bootstrap/plan-bootstrap-9_6_4.json
- − hadrian/bootstrap/plan-bootstrap-9_6_6.json
- − hadrian/bootstrap/plan-bootstrap-9_8_1.json
- − hadrian/bootstrap/plan-bootstrap-9_8_2.json
- hadrian/bootstrap/src/Main.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/726ecc419cfcbc4aef56d31e527897…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/726ecc419cfcbc4aef56d31e527897…
You're receiving this email because of your account on gitlab.haskell.org.
1
0

[Git][ghc/ghc][wip/haanss/depdir] 73 commits: Renaming around predicate types
by Hassan Al-Awwadi (@hassan.awwadi) 18 Aug '25
by Hassan Al-Awwadi (@hassan.awwadi) 18 Aug '25
18 Aug '25
Hassan Al-Awwadi pushed to branch wip/haanss/depdir at Glasgow Haskell Compiler / GHC
Commits:
a49eca26 by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Renaming around predicate types
.. we were (as it turned out) abstracting over
type-class selectors in SPECIALISATION rules!
Wibble isEqPred
- - - - -
f80375dd by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Refactor of Specialise.hs
This patch just tidies up `specHeader` a bit, removing one
of its many results, and adding some comments.
No change in behaviour.
Also add a few more `HasDebugCallStack` contexts.
- - - - -
1bd12371 by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Improve treatment of SPECIALISE pragmas -- again!
This MR does another major refactor of the way that SPECIALISE
pragmas work, to fix #26115, #26116, #26117.
* We now /always/ solve forall-constraints in an all-or-nothing way.
See Note [Solving a Wanted forall-constraint] in GHC.Tc.Solver.Solve
This means we might have unsolved quantified constraints, which need
to be reported. See `inert_insts` in `getUnsolvedInerts`.
* I refactored the short-cut solver for type classes to work by
recursively calling the solver rather than by having a little baby
solver that kept being not clever enough.
See Note [Shortcut solving] in GHC.Tc.Solver.Dict
* I totally rewrote the desugaring of SPECIALISE pragmas, again.
The new story is in Note [Desugaring new-form SPECIALISE pragmas]
in GHC.HsToCore.Binds
Both old-form and new-form SPECIALISE pragmas now route through the same
function `dsSpec_help`. The tricky function `decomposeRuleLhs` is now used only
for user-written RULES, not for SPECIALISE pragmas.
* I improved `solveOneFromTheOther` to account for rewriter sets. Previously
it would solve a non-rewritten dict from a rewritten one. For equalities
we were already dealing with this, in
Some incidental refactoring
* A small refactor: `ebv_tcvs` in `EvBindsBar` now has a list of coercions, rather
than a set of tyvars. We just delay taking the free vars.
* GHC.Core.FVs.exprFVs now returns /all/ free vars.
Use `exprLocalFVs` for Local vars.
Reason: I wanted another variant for /evidence/ variables.
* Ues `EvId` in preference to `EvVar`. (Evidence variables are always Ids.)
Rename `isEvVar` to `isEvId`.
* I moved `inert_safehask` out of `InertCans` and into `InertSet` where it
more properly belongs.
Compiler-perf changes:
* There was a palpable bug (#26117) which this MR fixes in
newWantedEvVar, which bypassed all the subtle overlapping-Given
and shortcutting logic. (See the new `newWantedEvVar`.) Fixing this
but leads to extra dictionary bindings; they are optimised away quickly
but they made CoOpt_Read allocate 3.6% more.
* Hpapily T15164 improves.
* The net compiler-allocation change is 0.0%
Metric Decrease:
T15164
Metric Increase:
CoOpt_Read
T12425
- - - - -
953fd8f1 by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Solve forall-constraints immediately, or not at all
This MR refactors the constraint solver to solve forall-constraints immediately,
rather than emitting an implication constraint to be solved later.
The most immediate motivation was that when solving quantified constraints
in SPECIALISE pragmas, we really really don't want to leave behind half-
solved implications. Also it's in tune with the approach of the new
short-cut solver, which recursively invokes the solver.
It /also/ saves quite a bit of plumbing; e.g
- The `wl_implics` field of `WorkList` is gone,
- The types of `solveSimpleWanteds` and friends are simplified.
- An EvFun contains binding, rather than an EvBindsVar ref-cell that
will in the future contain bindings. That makes `evVarsOfTerm`
simpler. Much nicer.
It also improves error messages a bit.
All described in Note [Solving a Wanted forall-constraint] in
GHC.Tc.Solver.Solve.
One tiresome point: in the tricky case of `inferConstraintsCoerceBased`
we make a forall-constraint. This we /do/ want to partially solve, so
we can infer a suitable context. (I'd be quite happy to force the user to
write a context, bt I don't want to change behavior.) So we want to generate
an /implication/ constraint in `emitPredSpecConstraints` rather than a
/forall-constraint/ as we were doing before. Discussed in (WFA3) of
the above Note.
Incidental refactoring
* `GHC.Tc.Deriv.Infer.inferConstraints` was consulting the state monad for
the DerivEnv that the caller had just consulted. Nicer to pass it as an
argument I think, so I have done that. No change in behaviour.
- - - - -
6921ab42 by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Remove duplicated code in Ast.hs for evTermFreeVars
This is just a tidy up.
- - - - -
1165f587 by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Small tc-tracing changes only
- - - - -
0776ffe0 by Simon Hengel at 2025-07-26T04:54:20-04:00
Respect `-fdiagnostics-as-json` for core diagnostics (see #24113)
- - - - -
cc1116e0 by Andrew Lelechenko at 2025-07-26T04:55:01-04:00
docs: add since pragma to Data.List.NonEmpty.mapMaybe
- - - - -
ee2dc248 by Simon Hengel at 2025-07-31T06:25:35-04:00
Update comments on `OptKind` to reflect the code reality
- - - - -
b029633a by Wen Kokke at 2025-07-31T06:26:21-04:00
rts: Disable --eventlog-flush-interval unless compiled with -threaded.
This commit fixes issue #26222:
Using --eventlog-flush-interval with the non-threaded RTS leads to eventlog corruption.
https://gitlab.haskell.org/ghc/ghc/-/issues/26222
This commit makes three changes when code is compiled against the non-threaded RTS:
1. It disables the --eventlog-flush-interval flag.
2. It disables the documentation for the --eventlog-flush-interval flag.
3. It disables the relevant state from RtsConfig and code from Timer.
4. It updates the entry for --eventlog-flush-interval in the users guide.
- - - - -
31159f1d by Wen Kokke at 2025-07-31T06:26:21-04:00
rts: Split T20006 into tests with and without -threaded
- - - - -
618687ef by Simon Hengel at 2025-07-31T06:27:03-04:00
docs/users_guide/win32-dlls.rst: Remove references to `readline`
- - - - -
083e40f1 by Rodrigo Mesquita at 2025-08-01T04:38:23-04:00
debugger: Uniquely identify breakpoints by internal id
Since b85b11994e0130ff2401dd4bbdf52330e0bcf776 (support inlining
breakpoints), a breakpoint has been identified at runtime by *two* pairs
of <module,index>.
- The first, aka a 'BreakpointId', uniquely identifies a breakpoint in
the source of a module by using the Tick index. A Tick index can index
into ModBreaks.modBreaks_xxx to fetch source-level information about
where that tick originated.
- When a user specifies e.g. a line breakpoint using :break, we'll reverse
engineer what a Tick index for that line
- We update the `BreakArray` of that module (got from the
LoaderState) at that tick index to `breakOn`.
- A BCO we can stop at is headed by a BRK_FUN instruction. This
instruction stores in an operand the `tick index` it is associated
to. We look it up in the associated `BreakArray` (also an operand)
and check wheter it was set to `breakOn`.
- The second, aka the `ibi_info_mod` + `ibi_info_ix` of the
`InternalBreakpointId`, uniquely index into the `imodBreaks_breakInfo`
-- the information we gathered during code generation about the
existing breakpoint *ocurrences*.
- Note that with optimisation there may be many occurrences of the
same source-tick-breakpoint across different modules. The
`ibi_info_ix` is unique per occurrence, but the `bi_tick_ix` may be
shared. See Note [Breakpoint identifiers] about this.
- Note that besides the tick ids, info ids are also stored in
`BRK_FUN` so the break handler can refer to the associated
`CgBreakInfo`.
In light of that, the driving changes come from the desire to have the
info_id uniquely identify the breakpoint at runtime, and the source tick
id being derived from it:
- An InternalBreakpointId should uniquely identify a breakpoint just
from the code-generation identifiers of `ibi_info_ix` and `ibi_info_mod`.
So we drop `ibi_tick_mod` and `ibi_tick_ix`.
- A BRK_FUN instruction need only record the "internal breakpoint id",
not the tick-level id.
So we drop the tick mod and tick index operands.
- A BreakArray should be indexed by InternalBreakpointId rather than
BreakpointId
That means we need to do some more work when setting a breakpoint.
Specifically, we need to figure out the internal ids (occurrences of a
breakpoint) from the source-level BreakpointId we want to set the
breakpoint at (recall :break refers to breaks at the source level).
Besides this change being an improvement to the handling of breakpoints
(it's clearer to have a single unique identifier than two competing
ones), it unlocks the possibility of generating "internal" breakpoints
during Cg (needed for #26042).
It should also be easier to introduce multi-threaded-aware `BreakArrays`
following this change (needed for #26064).
Se also the new Note [ModBreaks vs InternalModBreaks]
On i386-linux:
-------------------------
Metric Decrease:
interpreter_steplocal
-------------------------
- - - - -
bf03bbaa by Simon Hengel at 2025-08-01T04:39:05-04:00
Don't use MCDiagnostic for `ghcExit`
This changes the error message of `ghcExit` from
```
<no location info>: error:
Compilation had errors
```
to
```
Compilation had errors
```
- - - - -
a889ec75 by Simon Hengel at 2025-08-01T04:39:05-04:00
Respect `-fdiagnostics-as-json` for driver diagnostics (see #24113)
- - - - -
81577fe7 by Ben Gamari at 2025-08-02T04:29:39-04:00
configure: Allow override of CrossCompiling
As noted in #26236, the current inference logic is a bit simplistic. In
particular, there are many cases (e.g. building for a new libc) where
the target and host triples may differ yet we are still able to run the
produced artifacts as native code.
Closes #26236.
- - - - -
01136779 by Andreas Klebinger at 2025-08-02T04:30:20-04:00
rts: Support COFF BigObj files in archives.
- - - - -
1f9e4f54 by Stephen Morgan at 2025-08-03T15:14:08+10:00
refactor: Modify Data.List.sortOn to use (>) instead of compare. (#26184)
This lets a more efficient (>) operation be used if one exists.
This is technically a breaking change for malformed Ord instances, where
x > y is not equivalent to compare x y == GT.
Discussed by the CLC in issue #332: https://github.com/haskell/core-libraries-committee/issues/332
- - - - -
4f6bc9cf by fendor at 2025-08-04T17:50:06-04:00
Revert "base: Expose Backtraces constructor and fields"
This reverts commit 17db44c5b32fff82ea988fa4f1a233d1a27bdf57.
- - - - -
bcdec657 by Zubin Duggal at 2025-08-05T10:37:29+05:30
compiler: Export a version of `newNameCache` that is not prone to footguns.
`newNameCache` must be initialized with both a non-"reserved" unique tag, as well
as a list of known key names. Failing to do so results in hard to debug unique conflicts.
It is difficult for API users to tell which unique tags are safe to use. So instead of leaving
this up to the user to decide, we now export a version of `newNameCache` which uses a guaranteed
non-reserved unique tag. In fact, this is now the way the unique tag is initialized for all invocations
of the compiler.
The original version of `newNameCache` is now exported as `newNameCache'` for advanced users.
We also deprecate `initNameCache` as it is also prone to footguns and is completely subsumed in
functionality by `newNameCache` and `newNameCache'`.
Fixes #26135 and #26055
- - - - -
57d3b4a8 by Andrew Lelechenko at 2025-08-05T18:36:31-04:00
hadrian: bump Stackage snapshot to LTS 24.2 / GHC 9.10.2
In line with #25693 we should use GHC 9.10 as a boot compiler,
while Hadrian stack.yaml was stuck on GHC 9.6.
- - - - -
c2a78cea by Peng Fan at 2025-08-05T18:37:27-04:00
NCG/LA64: implement atomic write with finer-grained DBAR hints
Signed-off-by: Peng Fan <fanpeng(a)loongson.cn>
- - - - -
95231c8e by Teo Camarasu at 2025-08-06T08:35:58-04:00
CODEOWNERS: add CLC as codeowner of base
We also remove hvr, since I think he is no longer active
- - - - -
77df0ded by Andrew Lelechenko at 2025-08-06T08:36:39-04:00
Bump submodule text to 2.1.3
- - - - -
8af260d0 by Nikolaos Chatzikonstantinou at 2025-08-06T08:37:23-04:00
docs: fix internal import in getopt examples
This external-facing doc example shouldn't mention GHC internals when
using 'fromMaybe'.
- - - - -
69cc16ca by Marc Scholten at 2025-08-06T15:51:28-04:00
README: Add note on ghc.nix
- - - - -
93a2f450 by Daniel Díaz at 2025-08-06T15:52:14-04:00
Link to the "Strict Bindings" docs from the linear types docs
Strict Bidings are relevant for the kinds of multiplicity annotations
linear lets support.
- - - - -
246b7853 by Matthew Pickering at 2025-08-07T06:58:30-04:00
level imports: Check the level of exported identifiers
The level imports specification states that exported identifiers have to
be at level 0. This patch adds the requird level checks that all
explicitly mentioned identifiers occur at level 0.
For implicit export specifications (T(..) and module B), only level 0
identifiers are selected for re-export.
ghc-proposal: https://github.com/ghc-proposals/ghc-proposals/pull/705
Fixes #26090
- - - - -
358bc4fc by fendor at 2025-08-07T06:59:12-04:00
Bump GHC on darwin CI to 9.10.1
- - - - -
1903ae35 by Matthew Pickering at 2025-08-07T12:21:10+01:00
ipe: Place strings and metadata into specific .ipe section
By placing the .ipe metadata into a specific section it can be stripped
from the final binary if desired.
```
objcopy --remove-section .ipe <binary>
upx <binary>
```
Towards #21766
- - - - -
c80dd91c by Matthew Pickering at 2025-08-07T12:22:42+01:00
ipe: Place magic word at the start of entries in the .ipe section
The magic word "IPE\nIPE\n" is placed at the start of .ipe sections,
then if the section is stripped, we can check whether the section starts
with the magic word or not to determine whether there is metadata
present or not.
Towards #21766
- - - - -
cab42666 by Matthew Pickering at 2025-08-07T12:22:42+01:00
ipe: Use stable IDs for IPE entries
IPEs have historically been indexed and reported by their address.
This makes it impossible to compare profiles between runs, since the
addresses may change (due to ASLR) and also makes it tricky to separate
out the IPE map from the binary.
This small patch adds a stable identifier for each IPE entry.
The stable identifier is a single 64 bit word. The high-bits are a
per-module identifier and the low bits identify which entry in each
module.
1. When a node is added into the IPE buffer it is assigned a unique
identifier from an incrementing global counter.
2. Each entry already has an index by it's position in the
`IpeBufferListNode`.
The two are combined together by the `IPE_ENTRY_KEY` macro.
Info table profiling uses the stable identifier rather than the address
of the info table.
The benefits of this change are:
* Profiles from different runs can be easily compared
* The metadata can be extracted from the binary (via the eventlog for
example) and then stripped from the executable.
Fixes #21766
- - - - -
2860a9a5 by Simon Peyton Jones at 2025-08-07T20:29:18-04:00
In TcSShortCut, typechecker plugins should get empty Givens
Solving in TcShortCut mode means /ignoring the Givens/. So we
should not pass them to typechecker plugins!
Fixes #26258.
This is a fixup to the earlier MR:
commit 1bd12371feacc52394a0e660ef9349f9e8ee1c06
Author: Simon Peyton Jones <simon.peytonjones(a)gmail.com>
Date: Mon Jul 21 10:04:49 2025 +0100
Improve treatment of SPECIALISE pragmas -- again!
- - - - -
2157db2d by sterni at 2025-08-08T15:32:39-04:00
hadrian: enable terminfo if --with-curses-* flags are given
The GHC make build system used to support WITH_TERMINFO in ghc.mk which
allowed controlling whether to build GHC with terminfo or not. hadrian
has replaced this with a system where this is effectively controlled by
the cross-compiling setting (the default WITH_TERMINFO value was bassed
on CrossCompiling, iirc).
This behavior is undesireable in some cases and there is not really a
good way to work around it. Especially for downstream packagers,
modifying this via UserSettings is not really feasible since such a
source file has to be kept in sync with Settings/Default.hs manually
since it can't import Settings.Default or any predefined Flavour
definitions.
To avoid having to add a new setting to cfg/system.config and/or a new
configure flag (though I'm happy to implement both if required), I've
chosen to take --with-curses-* being set explicitly as an indication
that the user wants to have terminfo enabled. This would work for
Nixpkgs which sets these flags [1] as well as haskell.nix [2] (which
goes to some extreme measures [3] [4] to force terminfo in all scenarios).
In general, I'm an advocate for making the GHC build be the same for
native and cross insofar it is possible since it makes packaging GHC and
Haskell related things while still supporting cross much less
compilicated. A more minimal GHC with reduced dependencies should
probably be a specific flavor, not the default.
Partially addresses #26288 by forcing terminfo to be built if the user
explicitly passes configure flags related to it. However, it isn't built
by default when cross-compiling yet nor is there an explicit way to
control the package being built.
[1]: https://github.com/NixOS/nixpkgs/blob/3a7266fcefcb9ce353df49ba3f292d0644376…
[2]: https://github.com/input-output-hk/haskell.nix/blob/6eaafcdf04bab7be745d1aa…
[3]: https://github.com/input-output-hk/haskell.nix/blob/6eaafcdf04bab7be745d1aa…
[4]: https://github.com/input-output-hk/haskell.nix/blob/6eaafcdf04bab7be745d1aa…
- - - - -
b3c31488 by David Feuer at 2025-08-08T15:33:21-04:00
Add default QuasiQuoters
Add `defaultQuasiQuoter` and `namedDefaultQuasiQuoter` to make it easier
to write `QuasiQuoters` that give helpful error messages when they're
used in inappropriate contexts.
Closes #24434.
- - - - -
03555ed8 by Sylvain Henry at 2025-08-10T22:20:57-04:00
Handle non-fractional CmmFloats in Cmm's CBE (#26229)
Since f8d9d016305be355f518c141f6c6d4826f2de9a2, toRational for Float and
Double converts float's infinity and NaN into Rational's infinity and
NaN (respectively 1%0 and 0%0).
Cmm CommonBlockEliminator hashing function needs to take these values
into account as they can appear as literals now. See added testcase.
- - - - -
6c956af3 by J. Ryan Stinnett at 2025-08-10T22:21:42-04:00
Fix extensions list in `DoAndIfThenElse` docs
- - - - -
6dc420b1 by J. Ryan Stinnett at 2025-08-10T22:21:42-04:00
Document status of `RelaxedPolyRec` extension
This adds a brief extension page explaining the status of the
`RelaxedPolyRec` extension. The behaviour of this mode is already
explained elsewhere, so this page is mainly for completeness so that
various lists of extensions have somewhere to point to for this flag.
Fixes #18630
- - - - -
18036d52 by Simon Peyton Jones at 2025-08-11T11:31:20-04:00
Take more care in zonkEqTypes on AppTy/AppTy
This patch fixes #26256.
See Note [zonkEqTypes and the PKTI] in GHC.Tc.Solver.Equality
- - - - -
c8d76a29 by Zubin Duggal at 2025-08-11T11:32:02-04:00
ci: upgrade bootstrap compiler on windows to 9.10.1
- - - - -
34fc50c1 by Ben Gamari at 2025-08-11T13:36:25-04:00
Kill IOPort#
This type is unnecessary, having been superceded by `MVar` and a rework
of WinIO's blocking logic.
See #20947.
See https://github.com/haskell/core-libraries-committee/issues/213.
- - - - -
56b32c5a by sheaf at 2025-08-12T10:00:19-04:00
Improve deep subsumption
This commit improves the DeepSubsumption sub-typing implementation
in GHC.Tc.Utils.Unify.tc_sub_type_deep by being less eager to fall back
to unification.
For example, we now are properly able to prove the subtyping relationship
((∀ a. a->a) -> Int) -> Bool <= β[tau] Bool
for an unfilled metavariable β. In this case (with an AppTy on the right),
we used to fall back to unification. No longer: now, given that the LHS
is a FunTy and that the RHS is a deep rho type (does not need any instantiation),
we try to make the RHS into a FunTy, viz.
β := (->) γ
We can then continue using covariance & contravariance of the function
arrow, which allows us to prove the subtyping relationship, instead of
trying to unify which would cause us to error out with:
Couldn't match expected type ‘β’ with actual type ‘(->) ((∀ a. a -> a) -> Int)
See Note [FunTy vs non-FunTy case in tc_sub_type_deep] in GHC.Tc.Utils.Unify.
The other main improvement in this patch concerns type inference.
The main subsumption logic happens (before & after this patch) in
GHC.Tc.Gen.App.checkResultTy. However, before this patch, all of the
DeepSubsumption logic only kicked in in 'check' mode, not in 'infer' mode.
This patch adds deep instantiation in the 'infer' mode of checkResultTy
when we are doing deep subsumption, which allows us to accept programs
such as:
f :: Int -> (forall a. a->a)
g :: Int -> Bool -> Bool
test1 b =
case b of
True -> f
False -> g
test2 b =
case b of
True -> g
False -> f
See Note [Deeply instantiate in checkResultTy when inferring].
Finally, we add representation-polymorphism checks to ensure that the
lambda abstractions we introduce when doing subsumption obey the
representation polymorphism invariants of Note [Representation polymorphism invariants]
in GHC.Core. See Note [FunTy vs FunTy case in tc_sub_type_deep].
This is accompanied by a courtesy change to `(<.>) :: HsWrapper -> HsWrapper -> HsWrapper`,
adding the equation:
WpCast c1 <.> WpCast c2 = WpCast (c1 `mkTransCo` c2)
This is useful because mkWpFun does not introduce an eta-expansion when
both of the argument & result wrappers are casts; so this change allows
us to avoid introducing lambda abstractions when casts suffice.
Fixes #26225
- - - - -
d175aff8 by Sylvain Henry at 2025-08-12T10:01:31-04:00
Add regression test for #18619
- - - - -
a3983a26 by Sylvain Henry at 2025-08-12T10:02:20-04:00
RTS: remove some TSAN annotations (#20464)
Use RELAXED_LOAD_ALWAYS macro instead.
- - - - -
0434af81 by Ben Gamari at 2025-08-12T10:03:02-04:00
Bump time submodule to 1.15
Also required bumps of Cabal, directory, and hpc.
- - - - -
62899117 by Florian Ragwitz at 2025-08-13T21:01:34-04:00
Extend record-selector usage ticking to all binds using a record field
This extends the previous handling of ticking for RecordWildCards and
NamedFieldPuns to all var bindings that involve record selectors.
Note that certain patterns such as `Foo{foo = 42}` will currently not tick the
`foo` selector, as ticking is triggered by `HsVar`s.
Closes #26191.
- - - - -
b37b3af7 by Florian Ragwitz at 2025-08-13T21:01:34-04:00
Add release notes for 9.16.1 and move description of latest HPC changes there.
- - - - -
a5e4b7d9 by Ben Gamari at 2025-08-13T21:02:18-04:00
rts: Clarify rationale for undefined atomic wrappers
Since c06e3f46d24ef69f3a3d794f5f604cb8c2a40cbc the RTS has declared
various atomic operation wrappers defined by ghc-internal as undefined.
While the rationale for this isn't clear from the commit message, I
believe that this is necessary due to the unregisterised backend.
Specifically, the code generator will reference these symbols when
compiling RTS Cmm sources.
- - - - -
50842f83 by Andreas Klebinger at 2025-08-13T21:03:01-04:00
Make unexpected LLVM versions a warning rather than an error.
Typically a newer LLVM version *will* work so erroring out if
a user uses a newer LLVM version is too aggressive.
Fixes #25915
- - - - -
c91e2650 by fendor at 2025-08-13T21:03:43-04:00
Store `StackTrace` and `StackSnapshot` in `Backtraces`
Instead of decoding the stack traces when collecting the `Backtraces`,
defer this decoding until actually showing the `Backtraces`.
This allows users to customise how `Backtraces` are displayed by
using a custom implementation of `displayExceptionWithInfo`, overwriting
the default implementation for `Backtraces` (`displayBacktraces`).
- - - - -
dee28cdd by fendor at 2025-08-13T21:03:43-04:00
Allow users to customise the collection of exception annotations
Add a global `CollectExceptionAnnotationMechanism` which determines how
`ExceptionAnnotation`s are collected upon throwing an `Exception`.
This API is exposed via `ghc-experimental`.
By overriding how we collect `Backtraces`, we can control how the
`Backtraces` are displayed to the user by newtyping `Backtraces` and
giving a different instance for `ExceptionAnnotation`.
A concrete use-case for this feature is allowing us to experiment with
alternative stack decoders, without having to modify `base`, which take
additional information from the stack frames.
This commit does not modify how `Backtraces` are currently
collected or displayed.
- - - - -
66024722 by fendor at 2025-08-13T21:03:43-04:00
Expose Backtraces internals from ghc-experimental
Additionally, expose the same API `base:Control.Exception.Backtrace`
to make it easier to use as a drop-in replacement.
- - - - -
a766286f by Reed Mullanix at 2025-08-13T21:04:36-04:00
ghc-internal: Fix naturalAndNot for NB/NS case
When the first argument to `naturalAndNot` is larger than a `Word` and the second is `Word`-sized, `naturalAndNot` will truncate the
result:
```
>>> naturalAndNot ((2 ^ 65) .|. (2 ^ 3)) (2 ^ 3)
0
```
In contrast, `naturalAndNot` does not truncate when both arguments are larger than a `Word`, so this appears to be a bug.
Luckily, the fix is pretty easy: we just need to call `bigNatAndNotWord#` instead of truncating.
Fixes #26230
- - - - -
3506fa7d by Simon Hengel at 2025-08-13T21:05:18-04:00
Report -pgms as a deprecated flag
(instead of reporting an unspecific warning)
Before:
on the commandline: warning:
Object splitting was removed in GHC 8.8
After:
on the commandline: warning: [GHC-53692] [-Wdeprecated-flags]
-pgms is deprecated: Object splitting was removed in GHC 8.8
- - - - -
51c701fe by Zubin Duggal at 2025-08-13T21:06:00-04:00
testsuite: Be more permissive when filtering out GNU_PROPERTY_TYPE linker warnings
The warning text is slightly different with ld.bfd.
Fixes #26249
- - - - -
dfe6f464 by Simon Hengel at 2025-08-13T21:06:43-04:00
Refactoring: Don't misuse `MCDiagnostic` for lint messages
`MCDiagnostic` is meant to be used for compiler diagnostics.
Any code that creates `MCDiagnostic` directly, without going through
`GHC.Driver.Errors.printMessage`, side steps `-fdiagnostics-as-json`
(see e.g. !14475, !14492 !14548).
To avoid this in the future I want to control more narrowly who creates
`MCDiagnostic` (see #24113).
Some parts of the compiler use `MCDiagnostic` purely for formatting
purposes, without creating any real compiler diagnostics. This change
introduces a helper function, `formatDiagnostic`, that can be used in
such cases instead of constructing `MCDiagnostic`.
- - - - -
a8b2fbae by Teo Camarasu at 2025-08-13T21:07:24-04:00
rts: ensure MessageBlackHole.link is always a valid closure
We turn a MessageBlackHole into an StgInd in wakeBlockingQueue().
Therefore it's important that the link field, which becomes the
indirection field, always points to a valid closure.
It's unclear whether it's currently possible for the previous behaviour
to lead to a crash, but it's good to be consistent about this invariant nonetheless.
Co-authored-by: Andreas Klebinger <klebinger.andreas(a)gmx.at>
- - - - -
4021181e by Teo Camarasu at 2025-08-13T21:07:24-04:00
rts: spin if we see a WHITEHOLE in messageBlackHole
When a BLACKHOLE gets cancelled in raiseAsync, we indirect to a THUNK.
GC can then shortcut this, replacing our BLACKHOLE with a fresh THUNK.
This THUNK is not guaranteed to have a valid indirectee field.
If at the same time, a message intended for the previous BLACKHOLE is
processed and concurrently we BLACKHOLE the THUNK, thus temporarily
turning it into a WHITEHOLE, we can get a segfault, since we look at the
undefined indirectee field of the THUNK
The fix is simple: spin if we see a WHITEHOLE, and it will soon be
replaced with a valid BLACKHOLE.
Resolves #26205
- - - - -
1107af89 by Oleg Grenrus at 2025-08-13T21:08:06-04:00
Allow defining HasField instances for naughty fields
Resolves #26295
... as HasField solver doesn't solve for fields with "naughty"
selectors, we could as well allow defining HasField instances for these
fields.
- - - - -
020e7587 by Sylvain Henry at 2025-08-13T21:09:00-04:00
Fix Data.List unqualified import warning
- - - - -
fd811ded by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Make injecting implicit bindings into its own pass
Previously we were injecting "impliicit bindings" (data constructor
worker and wrappers etc)
- both at the end of CoreTidy,
- and at the start of CorePrep
This is unpleasant and confusing. This patch puts it it its own pass,
addImplicitBinds, which runs between the two.
The function `GHC.CoreToStg.AddImplicitBinds.addImplicitBinds` now takes /all/
TyCons, not just the ones for algebraic data types. That change ripples
through to
- corePrepPgm
- doCodeGen
- byteCodeGen
All take [TyCon] which includes all TyCons
- - - - -
9bd7fcc5 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Implement unary classes
The big change is described exhaustively in
Note [Unary class magic] in GHC.Core.TyCon
Other changes
* We never unbox class dictionaries in worker/wrapper. This has been true for some
time now, but the logic is now centralised in functions in
GHC.Core.Opt.WorkWrap.Utils, namely `canUnboxTyCon`, and `canUnboxArg`
See Note [Do not unbox class dictionaries] in GHC.Core.Opt.WorkWrap.Utils.
* Refactored the `notWorthFloating` logic in GHc.Core.Opt.SetLevels.
I can't remember if I actually changed any behaviour here, but if so it's
only in a corner cases.
* Fixed a bug in `GHC.Core.TyCon.isEnumerationTyCon`, which was wrongly returning
True for (##).
* Remove redundant Role argument to `liftCoSubstWithEx`. It was always
Representational.
* I refactored evidence generation in the constraint solver:
* Made GHC.Tc.Types.Evidence contain better abstactions for evidence
generation.
* I deleted the file `GHC.Tc.Types.EvTerm` and merged its (small) contents
elsewhere. It wasn't paying its way.
* Made evidence for implicit parameters go via a proper abstraction.
* Fix inlineBoringOk; see (IB6) in Note [inlineBoringOk]
This fixes a slowdown in `countdownEffectfulDynLocal`
in the `effectful` library.
Smaller things
* Rename `isDataTyCon` to `isBoxedDataTyCon`.
* GHC.Core.Corecion.liftCoSubstWithEx was only called with Representational role,
so I baked that into the function and removed the argument.
* Get rid of `GHC.Core.TyCon.tyConSingleAlgDataCon_maybe` in favour of calling
`not isNewTyCon` at the call sites; more explicit.
* Refatored `GHC.Core.TyCon.isInjectiveTyCon`; but I don't think I changed its
behaviour
* Moved `decomposeIPPred` to GHC.Core.Predicate
Compile time performance changes:
geo. mean +0.1%
minimum -6.8%
maximum +14.4%
The +14% one is in T21839c, where it seems that a bit more inlining
is taking place. That seems acceptable; and the average change is small
Metric Decrease:
LargeRecord
T12227
T12707
T16577
T21839r
T5642
Metric Increase:
T15164
T21839c
T3294
T5321FD
T5321Fun
WWRec
- - - - -
b4075d71 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Slight improvement to pre/postInlineUnconditionally
Avoids an extra simplifier iteration
- - - - -
9e443596 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Fix a long-standing assertion error in normSplitTyConApp_maybe
- - - - -
91310ad0 by Simon Peyton Jones at 2025-08-14T17:56:47-04:00
Add comment to coercion optimiser
- - - - -
5b841d82 by Teo Camarasu at 2025-08-14T17:57:56-04:00
template-haskell: move some identifiers from ghc-internal to template-haskell
These identifiers are not used internally by the compiler. Therefore we
have no reason for them to be in ghc-internal.
By moving them to template-haskell, we benefit from it being easier to
change them and we avoid having to build them in stage0.
Resolves #26048
- - - - -
33e2c7e5 by Teo Camarasu at 2025-08-14T17:57:56-04:00
template-haskell: transfer $infix note to public module
This Haddock note should be in the public facing module
- - - - -
2a411fc4 by Sylvain Henry at 2025-08-14T17:59:09-04:00
JS: export HEAP8 symbol (#26290)
Newer Emscripten requires this.
- - - - -
248f78ca by Ben Gamari at 2025-08-14T17:59:51-04:00
users-guide: Drop the THREAD_RUNNABLE event
As of f361281c89fbce42865d8b8b27b0957205366186 it is no longer emitted.
- - - - -
706d33e3 by Recursion Ninja at 2025-08-15T04:12:12-04:00
Resolving issues #20645 and #26109
Correctly sign extending and casting smaller bit width types for LLVM operations:
- bitReverse8#
- bitReverse16#
- bitReverse32#
- byteSwap16#
- byteSwap32#
- pdep8#
- pdep16#
- pext8#
- pext16#
- - - - -
1cdc6f46 by Cheng Shao at 2025-08-15T04:12:56-04:00
hadrian: enforce have_llvm=False for wasm32/js
This patch fixes hadrian to always pass have_llvm=False to the
testsuite driver for wasm32/js targets. These targets don't really
support the LLVM backend, and the optllvm test way doesn't work. We
used to special-case wasm32/js to avoid auto-adding optllvm way in
testsuite/config/ghc, but this is still problematic if someone writes
a new LLVM-related test and uses something like when(have_llvm(),
extra_ways(["optllvm"])). So better just enforce have_llvm=False for
these targets here.
- - - - -
f5affd92 by Hassan Al-Awwadi at 2025-08-18T11:56:48+02:00
Adds the fucnction addDependentDirectory to Q, resolving issue #26148.
This function adds a new directory to the list of things a module depends upon. That means that when the contents of the directory change, the recompilation checker will notice this and the module will be recompiled. Documentation has also been added for addDependentFunction and addDependentDirectory in the user guide.
- - - - -
ce0139f5 by Hassan Al-Awwadi at 2025-08-18T11:59:37+02:00
Specify package template haskell in makefile test for addDependentDir
- - - - -
415 changed files:
- .gitlab/darwin/toolchain.nix
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- CODEOWNERS
- README.md
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/PrimOps/Ids.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Types/Prim.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Breakpoints.hs
- compiler/GHC/ByteCode/InfoTable.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Cmm.hs
- compiler/GHC/Cmm/CommonBlockElim.hs
- compiler/GHC/CmmToAsm/LA64/CodeGen.hs
- compiler/GHC/CmmToAsm/PPC/Ppr.hs
- compiler/GHC/CmmToAsm/Ppr.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/CmmToLlvm/Data.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Class.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/Monad.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Unfold.hs
- compiler/GHC/Core/Unfold/Make.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/CoreToStg.hs
- + compiler/GHC/CoreToStg/AddImplicitBinds.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Driver/CmdLine.hs
- compiler/GHC/Driver/Errors/Ppr.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Breakpoints.hs
- compiler/GHC/HsToCore/Errors/Ppr.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Foreign/Call.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs
- compiler/GHC/HsToCore/Ticks.hs
- compiler/GHC/HsToCore/Usage.hs
- compiler/GHC/Iface/Decl.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Recomp/Types.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Runtime/Debugger/Breakpoints.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/Stg/Lint.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm.hs
- compiler/GHC/StgToCmm/InfoTableProv.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToJS/Prim.hs
- compiler/GHC/SysTools/Tasks.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Deriv/Infer.hs
- compiler/GHC/Tc/Deriv/Utils.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Instance/Family.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/Default.hs
- compiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/Solver/Equality.hs
- compiler/GHC/Tc/Solver/InertSet.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Solver/Rewrite.hs
- compiler/GHC/Tc/Solver/Solve.hs
- + compiler/GHC/Tc/Solver/Solve.hs-boot
- compiler/GHC/Tc/Solver/Types.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Build.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Types/Constraint.hs
- − compiler/GHC/Tc/Types/EvTerm.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/Concrete.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Tc/Utils/Unify.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Tc/Zonk/Type.hs
- compiler/GHC/Types/Demand.hs
- compiler/GHC/Types/Error.hs
- compiler/GHC/Types/Id.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Types/Name/Cache.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Types/RepType.hs
- compiler/GHC/Types/TyThing.hs
- compiler/GHC/Types/Var.hs
- compiler/GHC/Unit/Finder.hs
- compiler/GHC/Unit/Finder/Types.hs
- compiler/GHC/Unit/Module/Deps.hs
- compiler/GHC/Utils/Error.hs
- compiler/ghc.cabal.in
- configure.ac
- − docs/users_guide/9.14.1-notes.rst
- + docs/users_guide/9.16.1-notes.rst
- docs/users_guide/conf.py
- docs/users_guide/debug-info.rst
- docs/users_guide/eventlog-formats.rst
- docs/users_guide/expected-undocumented-flags.txt
- docs/users_guide/exts/doandifthenelse.rst
- docs/users_guide/exts/linear_types.rst
- + docs/users_guide/exts/relaxed_poly_rec.rst
- docs/users_guide/exts/strict.rst
- docs/users_guide/exts/types.rst
- docs/users_guide/release-notes.rst
- docs/users_guide/runtime_control.rst
- docs/users_guide/separate_compilation.rst
- docs/users_guide/win32-dlls.rst
- ghc/GHCi/UI.hs
- ghc/GHCi/UI/Monad.hs
- ghc/ghc-bin.cabal.in
- hadrian/src/Settings/Builders/RunTest.hs
- hadrian/src/Settings/Default.hs
- hadrian/src/Settings/Packages.hs
- hadrian/stack.yaml
- hadrian/stack.yaml.lock
- libraries/Cabal
- libraries/base/base.cabal.in
- libraries/base/changelog.md
- libraries/base/src/Control/Exception/Backtrace.hs
- libraries/base/src/Data/List/NonEmpty.hs
- libraries/base/src/GHC/Exts.hs
- − libraries/base/src/GHC/IOPort.hs
- libraries/base/src/System/Console/GetOpt.hs
- libraries/directory
- libraries/ghc-bignum/changelog.md
- + libraries/ghc-experimental/src/GHC/Exception/Backtrace/Experimental.hs
- libraries/ghc-heap/GHC/Exts/Heap/Closures.hs
- libraries/ghc-internal/cbits/pdep.c
- libraries/ghc-internal/cbits/pext.c
- libraries/ghc-internal/ghc-internal.cabal.in
- libraries/ghc-internal/src/GHC/Internal/Bignum/Natural.hs
- libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs
- libraries/ghc-internal/src/GHC/Internal/Event/Windows.hsc
- libraries/ghc-internal/src/GHC/Internal/Event/Windows/Thread.hs
- libraries/ghc-internal/src/GHC/Internal/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Exts.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Buffer.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Windows/Handle.hsc
- − libraries/ghc-internal/src/GHC/Internal/IOPort.hs
- libraries/ghc-internal/src/GHC/Internal/Prim/PtrEq.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Quote.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs
- + libraries/ghc-internal/tests/Makefile
- + libraries/ghc-internal/tests/all.T
- + libraries/ghc-internal/tests/backtraces/Makefile
- + libraries/ghc-internal/tests/backtraces/T14532a.hs
- + libraries/ghc-internal/tests/backtraces/T14532a.stdout
- + libraries/ghc-internal/tests/backtraces/T14532b.hs
- + libraries/ghc-internal/tests/backtraces/T14532b.stdout
- + libraries/ghc-internal/tests/backtraces/all.T
- libraries/ghc-prim/changelog.md
- libraries/ghci/GHCi/Debugger.hs
- libraries/ghci/GHCi/Message.hs
- libraries/ghci/GHCi/Run.hs
- libraries/ghci/GHCi/TH.hs
- libraries/hpc
- libraries/template-haskell/Language/Haskell/TH/Lib.hs
- libraries/template-haskell/Language/Haskell/TH/Quote.hs
- libraries/template-haskell/Language/Haskell/TH/Syntax.hs
- libraries/template-haskell/changelog.md
- libraries/template-haskell/tests/all.T
- libraries/text
- libraries/time
- libraries/unix
- rts/Disassembler.c
- rts/Exception.cmm
- rts/IPE.c
- rts/Interpreter.c
- rts/Messages.c
- rts/Prelude.h
- rts/PrimOps.cmm
- rts/ProfHeap.c
- rts/RtsFlags.c
- rts/RtsSymbols.c
- rts/StgMiscClosures.cmm
- rts/Timer.c
- rts/Updates.h
- rts/eventlog/EventLog.c
- rts/external-symbols.list.in
- rts/include/rts/Flags.h
- rts/include/rts/IPE.h
- rts/include/stg/MiscClosures.h
- rts/include/stg/SMP.h
- rts/js/mem.js
- rts/linker/LoadArchive.c
- rts/posix/ticker/Pthread.c
- rts/posix/ticker/TimerFd.c
- rts/rts.cabal
- rts/win32/AsyncWinIO.c
- rts/win32/libHSghc-internal.def
- testsuite/.gitignore
- testsuite/config/ghc
- testsuite/driver/testlib.py
- testsuite/tests/arrows/should_compile/T21301.stderr
- testsuite/tests/core-to-stg/T24124.stderr
- testsuite/tests/corelint/LintEtaExpand.stderr
- testsuite/tests/corelint/T21115b.stderr
- testsuite/tests/deSugar/should_compile/T2431.stderr
- testsuite/tests/deSugar/should_fail/DsStrictFail.stderr
- testsuite/tests/deSugar/should_run/T20024.stderr
- testsuite/tests/deSugar/should_run/dsrun005.stderr
- testsuite/tests/deSugar/should_run/dsrun007.stderr
- testsuite/tests/deSugar/should_run/dsrun008.stderr
- testsuite/tests/deriving/should_compile/T20815.hs
- testsuite/tests/deriving/should_fail/T12768.stderr
- testsuite/tests/deriving/should_fail/T1496.stderr
- testsuite/tests/deriving/should_fail/T5498.stderr
- testsuite/tests/deriving/should_fail/T7148.stderr
- testsuite/tests/deriving/should_fail/T7148a.stderr
- testsuite/tests/deriving/should_run/T9576.stderr
- testsuite/tests/dmdanal/should_compile/T16029.stdout
- testsuite/tests/dmdanal/sigs/T21119.stderr
- testsuite/tests/dmdanal/sigs/T21888.stderr
- testsuite/tests/ghci.debugger/scripts/break011.stdout
- testsuite/tests/ghci.debugger/scripts/break024.stdout
- testsuite/tests/ghci/scripts/Defer02.stderr
- testsuite/tests/ghci/scripts/T15325.stderr
- testsuite/tests/hiefile/should_run/HieQueries.stdout
- testsuite/tests/hiefile/should_run/TestUtils.hs
- testsuite/tests/hpc/recsel/recsel.hs
- testsuite/tests/hpc/recsel/recsel.stdout
- testsuite/tests/impredicative/T17332.stderr
- testsuite/tests/indexed-types/should_compile/T2238.hs
- testsuite/tests/indexed-types/should_fail/T5439.stderr
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/base-exports.stdout-ws-32
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
- testsuite/tests/interface-stability/ghc-prim-exports.stdout
- testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32
- testsuite/tests/interface-stability/template-haskell-exports.stdout
- + testsuite/tests/llvm/should_run/T20645.hs
- + testsuite/tests/llvm/should_run/T20645.stdout
- testsuite/tests/llvm/should_run/all.T
- testsuite/tests/numeric/should_compile/T15547.stderr
- testsuite/tests/numeric/should_compile/T23907.stderr
- + testsuite/tests/numeric/should_compile/T26229.hs
- testsuite/tests/numeric/should_compile/all.T
- + testsuite/tests/numeric/should_run/T18619.hs
- + testsuite/tests/numeric/should_run/T18619.stderr
- + testsuite/tests/numeric/should_run/T26230.hs
- + testsuite/tests/numeric/should_run/T26230.stdout
- testsuite/tests/numeric/should_run/all.T
- testsuite/tests/numeric/should_run/foundation.hs
- + testsuite/tests/overloadedrecflds/should_run/T26295.hs
- + testsuite/tests/overloadedrecflds/should_run/T26295.stdout
- testsuite/tests/overloadedrecflds/should_run/all.T
- testsuite/tests/partial-sigs/should_compile/T10403.stderr
- + testsuite/tests/partial-sigs/should_compile/T26256.hs
- + testsuite/tests/partial-sigs/should_compile/T26256.stderr
- testsuite/tests/partial-sigs/should_compile/all.T
- testsuite/tests/partial-sigs/should_fail/T10615.stderr
- testsuite/tests/patsyn/should_run/ghci.stderr
- testsuite/tests/primops/should_run/UnliftedIOPort.hs
- testsuite/tests/primops/should_run/all.T
- testsuite/tests/quantified-constraints/T15290a.stderr
- testsuite/tests/quantified-constraints/T19690.stderr
- testsuite/tests/quantified-constraints/T19921.stderr
- testsuite/tests/quantified-constraints/T21006.stderr
- testsuite/tests/quasiquotation/T4491/test.T
- testsuite/tests/quotes/LiftErrMsgDefer.stderr
- + testsuite/tests/rep-poly/NoEtaRequired.hs
- testsuite/tests/rep-poly/T21906.stderr
- testsuite/tests/rep-poly/all.T
- testsuite/tests/roles/should_compile/Roles14.stderr
- testsuite/tests/roles/should_compile/Roles3.stderr
- testsuite/tests/roles/should_compile/Roles4.stderr
- testsuite/tests/roles/should_fail/RolesIArray.stderr
- testsuite/tests/rts/flags/all.T
- testsuite/tests/rts/ipe/ipeMap.c
- testsuite/tests/rts/ipe/ipe_lib.c
- testsuite/tests/safeHaskell/safeLanguage/SafeLang15.stderr
- testsuite/tests/simplCore/should_compile/DataToTagFamilyScrut.stderr
- testsuite/tests/simplCore/should_compile/T15205.stderr
- testsuite/tests/simplCore/should_compile/T17366.stderr
- testsuite/tests/simplCore/should_compile/T17966.stderr
- testsuite/tests/simplCore/should_compile/T22309.stderr
- testsuite/tests/simplCore/should_compile/T22375DataFamily.stderr
- testsuite/tests/simplCore/should_compile/T23307.stderr
- testsuite/tests/simplCore/should_compile/T23307a.stderr
- testsuite/tests/simplCore/should_compile/T25389.stderr
- testsuite/tests/simplCore/should_compile/T25713.stderr
- + testsuite/tests/simplCore/should_compile/T26115.hs
- + testsuite/tests/simplCore/should_compile/T26115.stderr
- + testsuite/tests/simplCore/should_compile/T26116.hs
- + testsuite/tests/simplCore/should_compile/T26116.stderr
- + testsuite/tests/simplCore/should_compile/T26117.hs
- + testsuite/tests/simplCore/should_compile/T26117.stderr
- testsuite/tests/simplCore/should_compile/T7360.stderr
- testsuite/tests/simplCore/should_compile/all.T
- testsuite/tests/simplStg/should_compile/T15226b.stderr
- + testsuite/tests/splice-imports/DodgyLevelExport.hs
- + testsuite/tests/splice-imports/DodgyLevelExport.stderr
- + testsuite/tests/splice-imports/DodgyLevelExportA.hs
- + testsuite/tests/splice-imports/LevelImportExports.hs
- + testsuite/tests/splice-imports/LevelImportExports.stdout
- + testsuite/tests/splice-imports/LevelImportExportsA.hs
- testsuite/tests/splice-imports/Makefile
- + testsuite/tests/splice-imports/ModuleExport.hs
- + testsuite/tests/splice-imports/ModuleExport.stderr
- + testsuite/tests/splice-imports/ModuleExportA.hs
- + testsuite/tests/splice-imports/ModuleExportB.hs
- + testsuite/tests/splice-imports/T26090.hs
- + testsuite/tests/splice-imports/T26090.stderr
- + testsuite/tests/splice-imports/T26090A.hs
- testsuite/tests/splice-imports/all.T
- testsuite/tests/tcplugins/CtIdPlugin.hs
- testsuite/tests/th/Makefile
- + testsuite/tests/th/TH_Depends_Dir.hs
- + testsuite/tests/th/TH_Depends_Dir.stdout
- + testsuite/tests/th/TH_Depends_Dir_External.hs
- testsuite/tests/th/all.T
- testsuite/tests/type-data/should_run/T22332a.stderr
- testsuite/tests/typecheck/should_compile/Makefile
- testsuite/tests/typecheck/should_compile/T12427a.stderr
- testsuite/tests/typecheck/should_compile/T12763.stderr
- testsuite/tests/typecheck/should_compile/T14774.stdout
- testsuite/tests/typecheck/should_compile/T18406b.stderr
- testsuite/tests/typecheck/should_compile/T18529.stderr
- testsuite/tests/typecheck/should_compile/T23171.hs
- + testsuite/tests/typecheck/should_compile/T26225.hs
- + testsuite/tests/typecheck/should_compile/T26225b.hs
- + testsuite/tests/typecheck/should_compile/T26256a.hs
- testsuite/tests/typecheck/should_compile/TcSpecPragmas.stderr
- testsuite/tests/typecheck/should_compile/all.T
- − testsuite/tests/typecheck/should_fail/T12563.stderr
- testsuite/tests/typecheck/should_fail/T14605.hs
- testsuite/tests/typecheck/should_fail/T14605.stderr
- testsuite/tests/typecheck/should_fail/T14618.stderr
- testsuite/tests/typecheck/should_fail/T15801.stderr
- testsuite/tests/typecheck/should_fail/T18640a.stderr
- testsuite/tests/typecheck/should_fail/T18640b.stderr
- testsuite/tests/typecheck/should_fail/T19627.stderr
- testsuite/tests/typecheck/should_fail/T21530b.stderr
- testsuite/tests/typecheck/should_fail/T22912.stderr
- testsuite/tests/typecheck/should_fail/T6022.stderr
- testsuite/tests/typecheck/should_fail/T8883.stderr
- testsuite/tests/typecheck/should_fail/all.T
- testsuite/tests/typecheck/should_fail/tcfail140.stderr
- testsuite/tests/typecheck/should_fail/tcfail174.stderr
- testsuite/tests/typecheck/should_run/T10284.stderr
- testsuite/tests/typecheck/should_run/T13838.stderr
- testsuite/tests/typecheck/should_run/T9497a-run.stderr
- testsuite/tests/typecheck/should_run/T9497b-run.stderr
- testsuite/tests/typecheck/should_run/T9497c-run.stderr
- testsuite/tests/unboxedsums/unpack_sums_7.stdout
- testsuite/tests/unsatisfiable/T23816.stderr
- testsuite/tests/unsatisfiable/UnsatDefer.stderr
- testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs
- testsuite/tests/wasm/should_run/control-flow/RunWasm.hs
- utils/genprimopcode/Lexer.x
- utils/genprimopcode/Main.hs
- utils/genprimopcode/Parser.y
- utils/genprimopcode/ParserM.hs
- utils/genprimopcode/Syntax.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7fb97bf2cb5948e3b58221a92fbced…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7fb97bf2cb5948e3b58221a92fbced…
You're receiving this email because of your account on gitlab.haskell.org.
1
0

[Git][ghc/ghc][wip/T26217] 3 commits: ghc-internal: Split out GHC.Internal.TH.Monad from .Syntax
by Teo Camarasu (@teo) 18 Aug '25
by Teo Camarasu (@teo) 18 Aug '25
18 Aug '25
Teo Camarasu pushed to branch wip/T26217 at Glasgow Haskell Compiler / GHC
Commits:
4441d4a0 by Teo Camarasu at 2025-08-18T10:14:01+01:00
ghc-internal: Split out GHC.Internal.TH.Monad from .Syntax
Split the Quasi/Q, etc definition out of GHC.Internal.TH.Syntax
into its own module.
We do this for a few reasons:
- it enables future refactors to speed up compilation of these modules.
- it reduces the size of this very large module.
- it clarifies which modules in the GHC tree depend on the TH monads (Q/Quasi, etc) and
which just care about the syntax tree.
A step towards addressing: #26217
- - - - -
999aff65 by Teo Camarasu at 2025-08-18T10:14:01+01:00
ghc-internal: Move Data instance for TH.Syntax to Data.Data
This means that Data.Data no longer blocks building TH.Syntax, which
allows greater parallelism in our builds.
Previously TH.Syntax was a bottleneck when compiling ghc-internal. Now
it is less of a bottle-neck and is also slightly quicker to
compile (since it no longer contains these instances) at the cost of
making Data.Data slightly more expensive to compile.
TH.Lift which depends on TH.Syntax can also compile quicker and no
longer blocks ghc-internal finishing to compile.
Resolves #26217
- - - - -
165859aa by Teo Camarasu at 2025-08-18T10:14:01+01:00
compiler: delete unused names in Builtins.Names.TH
returnQ and bindQ are no longer used in the compiler.
There was also a very old comment that referred to them that I have modernized
- - - - -
22 changed files:
- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Gen/Splice.hs-boot
- compiler/GHC/Tc/Types/TH.hs
- libraries/base/src/Data/Array/Byte.hs
- libraries/base/src/Data/Fixed.hs
- + libraries/ghc-boot-th/GHC/Boot/TH/Monad.hs
- libraries/ghc-boot-th/ghc-boot-th.cabal.in
- libraries/ghc-internal/ghc-internal.cabal.in
- libraries/ghc-internal/src/GHC/Internal/Data/Data.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
- + libraries/ghc-internal/src/GHC/Internal/TH/Monad.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Quote.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs
- libraries/ghci/GHCi/Message.hs
- libraries/ghci/GHCi/TH.hs
- libraries/template-haskell/Language/Haskell/TH/Quote.hs
- libraries/template-haskell/Language/Haskell/TH/Syntax.hs
Changes:
=====================================
compiler/GHC/Builtin/Names/TH.hs
=====================================
@@ -30,7 +30,7 @@ templateHaskellNames :: [Name]
-- Should stay in sync with the import list of GHC.HsToCore.Quote
templateHaskellNames = [
- returnQName, bindQName, sequenceQName, newNameName, liftName, liftTypedName,
+ sequenceQName, newNameName, liftName, liftTypedName,
mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName, mkNameG_fldName,
mkNameLName,
mkNameSName, mkNameQName,
@@ -181,26 +181,30 @@ templateHaskellNames = [
-- Quasiquoting
quasiQuoterTyConName, quoteDecName, quoteTypeName, quoteExpName, quotePatName]
-thSyn, thLib, qqLib, liftLib :: Module
+thSyn, thMonad, thLib, qqLib, liftLib :: Module
thSyn = mkTHModule (fsLit "GHC.Internal.TH.Syntax")
+thMonad = mkTHModule (fsLit "GHC.Internal.TH.Monad")
thLib = mkTHModule (fsLit "GHC.Internal.TH.Lib")
qqLib = mkTHModule (fsLit "GHC.Internal.TH.Quote")
liftLib = mkTHModule (fsLit "GHC.Internal.TH.Lift")
+
mkTHModule :: FastString -> Module
mkTHModule m = mkModule ghcInternalUnit (mkModuleNameFS m)
-libFun, libTc, thFun, thTc, thCls, thCon, liftFun :: FastString -> Unique -> Name
+libFun, libTc, thFun, thTc, thCon, liftFun, thMonadTc, thMonadCls, thMonadFun :: FastString -> Unique -> Name
libFun = mk_known_key_name varName thLib
libTc = mk_known_key_name tcName thLib
thFun = mk_known_key_name varName thSyn
thTc = mk_known_key_name tcName thSyn
-thCls = mk_known_key_name clsName thSyn
thCon = mk_known_key_name dataName thSyn
liftFun = mk_known_key_name varName liftLib
+thMonadTc = mk_known_key_name tcName thMonad
+thMonadCls = mk_known_key_name clsName thMonad
+thMonadFun = mk_known_key_name varName thMonad
-thFld :: FastString -> FastString -> Unique -> Name
-thFld con = mk_known_key_name (fieldName con) thSyn
+thMonadFld :: FastString -> FastString -> Unique -> Name
+thMonadFld con = mk_known_key_name (fieldName con) thSyn
qqFld :: FastString -> Unique -> Name
qqFld = mk_known_key_name (fieldName (fsLit "QuasiQuoter")) qqLib
@@ -210,14 +214,14 @@ liftClassName :: Name
liftClassName = mk_known_key_name clsName liftLib (fsLit "Lift") liftClassKey
quoteClassName :: Name
-quoteClassName = thCls (fsLit "Quote") quoteClassKey
+quoteClassName = thMonadCls (fsLit "Quote") quoteClassKey
qTyConName, nameTyConName, fieldExpTyConName, patTyConName,
fieldPatTyConName, expTyConName, decTyConName, typeTyConName,
matchTyConName, clauseTyConName, funDepTyConName, predTyConName,
codeTyConName, injAnnTyConName, overlapTyConName, decsTyConName,
modNameTyConName, quasiQuoterTyConName :: Name
-qTyConName = thTc (fsLit "Q") qTyConKey
+qTyConName = thMonadTc (fsLit "Q") qTyConKey
nameTyConName = thTc (fsLit "Name") nameTyConKey
fieldExpTyConName = thTc (fsLit "FieldExp") fieldExpTyConKey
patTyConName = thTc (fsLit "Pat") patTyConKey
@@ -230,20 +234,18 @@ matchTyConName = thTc (fsLit "Match") matchTyConKey
clauseTyConName = thTc (fsLit "Clause") clauseTyConKey
funDepTyConName = thTc (fsLit "FunDep") funDepTyConKey
predTyConName = thTc (fsLit "Pred") predTyConKey
-codeTyConName = thTc (fsLit "Code") codeTyConKey
+codeTyConName = thMonadTc (fsLit "Code") codeTyConKey
injAnnTyConName = thTc (fsLit "InjectivityAnn") injAnnTyConKey
overlapTyConName = thTc (fsLit "Overlap") overlapTyConKey
modNameTyConName = thTc (fsLit "ModName") modNameTyConKey
quasiQuoterTyConName = mk_known_key_name tcName qqLib (fsLit "QuasiQuoter") quasiQuoterTyConKey
-returnQName, bindQName, sequenceQName, newNameName, liftName,
+sequenceQName, newNameName, liftName,
mkNameName, mkNameG_vName, mkNameG_fldName, mkNameG_dName, mkNameG_tcName,
mkNameLName, mkNameSName, liftStringName, unTypeName, unTypeCodeName,
unsafeCodeCoerceName, liftTypedName, mkModNameName, mkNameQName :: Name
-returnQName = thFun (fsLit "returnQ") returnQIdKey
-bindQName = thFun (fsLit "bindQ") bindQIdKey
-sequenceQName = thFun (fsLit "sequenceQ") sequenceQIdKey
-newNameName = thFun (fsLit "newName") newNameIdKey
+sequenceQName = thMonadFun (fsLit "sequenceQ") sequenceQIdKey
+newNameName = thMonadFun (fsLit "newName") newNameIdKey
mkNameName = thFun (fsLit "mkName") mkNameIdKey
mkNameG_vName = thFun (fsLit "mkNameG_v") mkNameG_vIdKey
mkNameG_dName = thFun (fsLit "mkNameG_d") mkNameG_dIdKey
@@ -253,9 +255,9 @@ mkNameLName = thFun (fsLit "mkNameL") mkNameLIdKey
mkNameQName = thFun (fsLit "mkNameQ") mkNameQIdKey
mkNameSName = thFun (fsLit "mkNameS") mkNameSIdKey
mkModNameName = thFun (fsLit "mkModName") mkModNameIdKey
-unTypeName = thFld (fsLit "TExp") (fsLit "unType") unTypeIdKey
-unTypeCodeName = thFun (fsLit "unTypeCode") unTypeCodeIdKey
-unsafeCodeCoerceName = thFun (fsLit "unsafeCodeCoerce") unsafeCodeCoerceIdKey
+unTypeName = thMonadFld (fsLit "TExp") (fsLit "unType") unTypeIdKey
+unTypeCodeName = thMonadFun (fsLit "unTypeCode") unTypeCodeIdKey
+unsafeCodeCoerceName = thMonadFun (fsLit "unsafeCodeCoerce") unsafeCodeCoerceIdKey
liftName = liftFun (fsLit "lift") liftIdKey
liftStringName = liftFun (fsLit "liftString") liftStringIdKey
liftTypedName = liftFun (fsLit "liftTyped") liftTypedIdKey
@@ -808,12 +810,10 @@ dataNamespaceSpecifierDataConKey = mkPreludeDataConUnique 215
-- IdUniques available: 200-499
-- If you want to change this, make sure you check in GHC.Builtin.Names
-returnQIdKey, bindQIdKey, sequenceQIdKey, liftIdKey, newNameIdKey,
+sequenceQIdKey, liftIdKey, newNameIdKey,
mkNameIdKey, mkNameG_vIdKey, mkNameG_fldIdKey, mkNameG_dIdKey, mkNameG_tcIdKey,
mkNameLIdKey, mkNameSIdKey, unTypeIdKey, unTypeCodeIdKey,
unsafeCodeCoerceIdKey, liftTypedIdKey, mkModNameIdKey, mkNameQIdKey :: Unique
-returnQIdKey = mkPreludeMiscIdUnique 200
-bindQIdKey = mkPreludeMiscIdUnique 201
sequenceQIdKey = mkPreludeMiscIdUnique 202
liftIdKey = mkPreludeMiscIdUnique 203
newNameIdKey = mkPreludeMiscIdUnique 204
=====================================
compiler/GHC/Hs/Expr.hs
=====================================
@@ -68,7 +68,7 @@ import GHC.Tc.Utils.TcType (TcType, TcTyVar)
import {-# SOURCE #-} GHC.Tc.Types.LclEnv (TcLclEnv)
import GHCi.RemoteTypes ( ForeignRef )
-import qualified GHC.Boot.TH.Syntax as TH (Q)
+import qualified GHC.Boot.TH.Monad as TH (Q)
-- libraries:
import Data.Data hiding (Fixity(..))
=====================================
compiler/GHC/HsToCore/Quote.hs
=====================================
@@ -245,14 +245,14 @@ first generate a polymorphic definition and then just apply the wrapper at the e
[| \x -> x |]
====>
- gensym (unpackString "x"#) `bindQ` \ x1::String ->
- lam (pvar x1) (var x1)
+ newName (unpackString "x"#) >>= \ x1::Name ->
+ lamE (varP x1) (varE x1)
[| \x -> $(f [| x |]) |]
====>
- gensym (unpackString "x"#) `bindQ` \ x1::String ->
- lam (pvar x1) (f (var x1))
+ newName (unpackString "x"#) >>= \ x1::Name ->
+ lamE (varP x1) (f (varE x1))
-}
=====================================
compiler/GHC/Rename/Splice.hs
=====================================
@@ -68,7 +68,7 @@ import {-# SOURCE #-} GHC.Tc.Gen.Splice
import GHC.Tc.Zonk.Type
import GHCi.RemoteTypes ( ForeignRef )
-import qualified GHC.Boot.TH.Syntax as TH (Q)
+import qualified GHC.Boot.TH.Monad as TH (Q)
import qualified GHC.LanguageExtensions as LangExt
import qualified Data.Set as Set
=====================================
compiler/GHC/Tc/Gen/Splice.hs
=====================================
@@ -144,6 +144,7 @@ import qualified GHC.LanguageExtensions as LangExt
-- THSyntax gives access to internal functions and data types
import qualified GHC.Boot.TH.Syntax as TH
+import qualified GHC.Boot.TH.Monad as TH
import qualified GHC.Boot.TH.Ppr as TH
#if defined(HAVE_INTERNAL_INTERPRETER)
=====================================
compiler/GHC/Tc/Gen/Splice.hs-boot
=====================================
@@ -12,6 +12,7 @@ import GHC.Hs.Extension ( GhcRn, GhcPs, GhcTc )
import GHC.Hs ( HsQuote, HsExpr, LHsExpr, LHsType, LPat, LHsDecl, ThModFinalizers, HsUntypedSpliceResult, HsTypedSpliceResult, HsTypedSplice )
import qualified GHC.Boot.TH.Syntax as TH
+import qualified GHC.Boot.TH.Monad as TH
tcTypedSplice :: HsTypedSpliceResult
-> HsTypedSplice GhcRn
=====================================
compiler/GHC/Tc/Types/TH.hs
=====================================
@@ -18,7 +18,7 @@ module GHC.Tc.Types.TH (
import GHC.Prelude
import GHCi.RemoteTypes
-import qualified GHC.Boot.TH.Syntax as TH
+import qualified GHC.Boot.TH.Monad as TH
import GHC.Tc.Types.Evidence
import GHC.Utils.Outputable
import GHC.Tc.Types.TcRef
=====================================
libraries/base/src/Data/Array/Byte.hs
=====================================
@@ -32,6 +32,7 @@ import GHC.Internal.Show (intToDigit)
import GHC.Internal.ST (ST(..), runST)
import GHC.Internal.Word (Word8(..))
import GHC.Internal.TH.Syntax
+import GHC.Internal.TH.Monad
import GHC.Internal.TH.Lift
import GHC.Internal.ForeignPtr
import Prelude
=====================================
libraries/base/src/Data/Fixed.hs
=====================================
@@ -91,7 +91,7 @@ import GHC.Internal.TypeLits (KnownNat, natVal)
import GHC.Internal.Read
import GHC.Internal.Text.ParserCombinators.ReadPrec
import GHC.Internal.Text.Read.Lex
-import qualified GHC.Internal.TH.Syntax as TH
+import qualified GHC.Internal.TH.Monad as TH
import qualified GHC.Internal.TH.Lift as TH
import Data.Typeable
import Prelude
=====================================
libraries/ghc-boot-th/GHC/Boot/TH/Monad.hs
=====================================
@@ -0,0 +1,6 @@
+{-# LANGUAGE Safe #-}
+{-# OPTIONS_HADDOCK not-home #-}
+module GHC.Boot.TH.Monad
+ (module GHC.Internal.TH.Monad) where
+
+import GHC.Internal.TH.Monad
=====================================
libraries/ghc-boot-th/ghc-boot-th.cabal.in
=====================================
@@ -60,9 +60,11 @@ Library
exposed-modules:
GHC.Boot.TH.Lib
GHC.Boot.TH.Syntax
+ GHC.Boot.TH.Monad
other-modules:
GHC.Internal.TH.Lib
GHC.Internal.TH.Syntax
+ GHC.Internal.TH.Monad
GHC.Internal.ForeignSrcLang
GHC.Internal.LanguageExtensions
GHC.Internal.Lexeme
@@ -74,4 +76,5 @@ Library
GHC.Boot.TH.Lib,
GHC.Boot.TH.Lift,
GHC.Boot.TH.Quote,
- GHC.Boot.TH.Syntax
+ GHC.Boot.TH.Syntax,
+ GHC.Boot.TH.Monad
=====================================
libraries/ghc-internal/ghc-internal.cabal.in
=====================================
@@ -298,6 +298,7 @@ Library
GHC.Internal.TH.Lib
GHC.Internal.TH.Lift
GHC.Internal.TH.Quote
+ GHC.Internal.TH.Monad
GHC.Internal.TopHandler
GHC.Internal.TypeError
GHC.Internal.TypeLits
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Data.hs
=====================================
@@ -143,6 +143,7 @@ import GHC.Internal.Arr -- So we can give Data instance for Array
import qualified GHC.Internal.Generics as Generics (Fixity(..))
import GHC.Internal.Generics hiding (Fixity(..))
-- So we can give Data instance for U1, V1, ...
+import qualified GHC.Internal.TH.Syntax as TH
------------------------------------------------------------------------------
--
@@ -1353,3 +1354,63 @@ deriving instance Data DecidedStrictness
-- | @since base-4.12.0.0
deriving instance Data a => Data (Down a)
+
+----------------------------------------------------------------------------
+-- Data instances for GHC.Internal.TH.Syntax
+
+deriving instance Data TH.AnnLookup
+deriving instance Data TH.AnnTarget
+deriving instance Data TH.Bang
+deriving instance Data TH.BndrVis
+deriving instance Data TH.Body
+deriving instance Data TH.Bytes
+deriving instance Data TH.Callconv
+deriving instance Data TH.Clause
+deriving instance Data TH.Con
+deriving instance Data TH.Dec
+deriving instance Data TH.DecidedStrictness
+deriving instance Data TH.DerivClause
+deriving instance Data TH.DerivStrategy
+deriving instance Data TH.DocLoc
+deriving instance Data TH.Exp
+deriving instance Data TH.FamilyResultSig
+deriving instance Data TH.Fixity
+deriving instance Data TH.FixityDirection
+deriving instance Data TH.Foreign
+deriving instance Data TH.FunDep
+deriving instance Data TH.Guard
+deriving instance Data TH.Info
+deriving instance Data TH.InjectivityAnn
+deriving instance Data TH.Inline
+deriving instance Data TH.Lit
+deriving instance Data TH.Loc
+deriving instance Data TH.Match
+deriving instance Data TH.ModName
+deriving instance Data TH.Module
+deriving instance Data TH.ModuleInfo
+deriving instance Data TH.Name
+deriving instance Data TH.NameFlavour
+deriving instance Data TH.NameSpace
+deriving instance Data TH.NamespaceSpecifier
+deriving instance Data TH.OccName
+deriving instance Data TH.Overlap
+deriving instance Data TH.Pat
+deriving instance Data TH.PatSynArgs
+deriving instance Data TH.PatSynDir
+deriving instance Data TH.Phases
+deriving instance Data TH.PkgName
+deriving instance Data TH.Pragma
+deriving instance Data TH.Range
+deriving instance Data TH.Role
+deriving instance Data TH.RuleBndr
+deriving instance Data TH.RuleMatch
+deriving instance Data TH.Safety
+deriving instance Data TH.SourceStrictness
+deriving instance Data TH.SourceUnpackedness
+deriving instance Data TH.Specificity
+deriving instance Data TH.Stmt
+deriving instance Data TH.TyLit
+deriving instance Data TH.TySynEqn
+deriving instance Data TH.Type
+deriving instance Data TH.TypeFamilyHead
+deriving instance Data flag => Data (TH.TyVarBndr flag)
=====================================
libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs
=====================================
@@ -21,6 +21,7 @@
module GHC.Internal.TH.Lib where
import GHC.Internal.TH.Syntax hiding (Role, InjectivityAnn)
+import GHC.Internal.TH.Monad
import qualified GHC.Internal.TH.Syntax as TH
#ifdef BOOTSTRAP_TH
=====================================
libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
=====================================
@@ -30,6 +30,7 @@ module GHC.Internal.TH.Lift
where
import GHC.Internal.TH.Syntax
+import GHC.Internal.TH.Monad
import qualified GHC.Internal.TH.Lib as Lib (litE) -- See wrinkle (W4) of Note [Tracking dependencies on primitives]
import GHC.Internal.Data.Either
=====================================
libraries/ghc-internal/src/GHC/Internal/TH/Monad.hs
=====================================
@@ -0,0 +1,971 @@
+{-# OPTIONS_HADDOCK not-home #-} -- we want users to import Language.Haskell.TH.Syntax instead
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE GADTs#-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE RoleAnnotations #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE StandaloneKindSignatures #-}
+{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE UnboxedSums #-}
+
+-- | This module is used internally in GHC's integration with Template Haskell
+-- and defines the Monads of Template Haskell, and associated definitions.
+--
+-- This is not a part of the public API, and as such, there are no API
+-- guarantees for this module from version to version.
+--
+-- Import "Language.Haskell.TH" or "Language.Haskell.TH.Syntax" instead!
+module GHC.Internal.TH.Monad
+ ( module GHC.Internal.TH.Monad
+ ) where
+
+#ifdef BOOTSTRAP_TH
+import Prelude
+import Data.Data hiding (Fixity(..))
+import Data.IORef
+import System.IO.Unsafe ( unsafePerformIO )
+import Control.Monad.IO.Class (MonadIO (..))
+import Control.Monad.Fix (MonadFix (..))
+import Control.Exception (BlockedIndefinitelyOnMVar (..), catch, throwIO)
+import Control.Exception.Base (FixIOException (..))
+import Control.Concurrent.MVar (newEmptyMVar, readMVar, putMVar)
+import System.IO ( hPutStrLn, stderr )
+import qualified Data.Kind as Kind (Type)
+import GHC.IO.Unsafe ( unsafeDupableInterleaveIO )
+import GHC.Types (TYPE, RuntimeRep(..))
+#else
+import GHC.Internal.Base hiding (NonEmpty(..),Type, Module, sequence)
+import GHC.Internal.Data.Data hiding (Fixity(..))
+import GHC.Internal.Data.Traversable
+import GHC.Internal.IORef
+import GHC.Internal.System.IO
+import GHC.Internal.Data.Foldable
+import GHC.Internal.Data.Typeable
+import GHC.Internal.Control.Monad.IO.Class
+import GHC.Internal.Control.Monad.Fail
+import GHC.Internal.Control.Monad.Fix
+import GHC.Internal.Control.Exception
+import GHC.Internal.Num
+import GHC.Internal.IO.Unsafe
+import GHC.Internal.MVar
+import GHC.Internal.IO.Exception
+import qualified GHC.Internal.Types as Kind (Type)
+#endif
+import GHC.Internal.ForeignSrcLang
+import GHC.Internal.LanguageExtensions
+import GHC.Internal.TH.Syntax
+
+-----------------------------------------------------
+--
+-- The Quasi class
+--
+-----------------------------------------------------
+
+class (MonadIO m, MonadFail m) => Quasi m where
+ -- | Fresh names. See 'newName'.
+ qNewName :: String -> m Name
+
+ ------- Error reporting and recovery -------
+ -- | Report an error (True) or warning (False)
+ -- ...but carry on; use 'fail' to stop. See 'report'.
+ qReport :: Bool -> String -> m ()
+
+ -- | See 'recover'.
+ qRecover :: m a -- ^ the error handler
+ -> m a -- ^ action which may fail
+ -> m a -- ^ Recover from the monadic 'fail'
+
+ ------- Inspect the type-checker's environment -------
+ -- | True <=> type namespace, False <=> value namespace. See 'lookupName'.
+ qLookupName :: Bool -> String -> m (Maybe Name)
+ -- | See 'reify'.
+ qReify :: Name -> m Info
+ -- | See 'reifyFixity'.
+ qReifyFixity :: Name -> m (Maybe Fixity)
+ -- | See 'reifyType'.
+ qReifyType :: Name -> m Type
+ -- | Is (n tys) an instance? Returns list of matching instance Decs (with
+ -- empty sub-Decs) Works for classes and type functions. See 'reifyInstances'.
+ qReifyInstances :: Name -> [Type] -> m [Dec]
+ -- | See 'reifyRoles'.
+ qReifyRoles :: Name -> m [Role]
+ -- | See 'reifyAnnotations'.
+ qReifyAnnotations :: Data a => AnnLookup -> m [a]
+ -- | See 'reifyModule'.
+ qReifyModule :: Module -> m ModuleInfo
+ -- | See 'reifyConStrictness'.
+ qReifyConStrictness :: Name -> m [DecidedStrictness]
+
+ -- | See 'location'.
+ qLocation :: m Loc
+
+ -- | Input/output (dangerous). See 'runIO'.
+ qRunIO :: IO a -> m a
+ qRunIO = liftIO
+ -- | See 'getPackageRoot'.
+ qGetPackageRoot :: m FilePath
+
+ -- | See 'addDependentFile'.
+ qAddDependentFile :: FilePath -> m ()
+
+ -- | See 'addTempFile'.
+ qAddTempFile :: String -> m FilePath
+
+ -- | See 'addTopDecls'.
+ qAddTopDecls :: [Dec] -> m ()
+
+ -- | See 'addForeignFilePath'.
+ qAddForeignFilePath :: ForeignSrcLang -> String -> m ()
+
+ -- | See 'addModFinalizer'.
+ qAddModFinalizer :: Q () -> m ()
+
+ -- | See 'addCorePlugin'.
+ qAddCorePlugin :: String -> m ()
+
+ -- | See 'getQ'.
+ qGetQ :: Typeable a => m (Maybe a)
+
+ -- | See 'putQ'.
+ qPutQ :: Typeable a => a -> m ()
+
+ -- | See 'isExtEnabled'.
+ qIsExtEnabled :: Extension -> m Bool
+ -- | See 'extsEnabled'.
+ qExtsEnabled :: m [Extension]
+
+ -- | See 'putDoc'.
+ qPutDoc :: DocLoc -> String -> m ()
+ -- | See 'getDoc'.
+ qGetDoc :: DocLoc -> m (Maybe String)
+
+-----------------------------------------------------
+-- The IO instance of Quasi
+-----------------------------------------------------
+
+-- | This instance is used only when running a Q
+-- computation in the IO monad, usually just to
+-- print the result. There is no interesting
+-- type environment, so reification isn't going to
+-- work.
+instance Quasi IO where
+ qNewName = newNameIO
+
+ qReport True msg = hPutStrLn stderr ("Template Haskell error: " ++ msg)
+ qReport False msg = hPutStrLn stderr ("Template Haskell error: " ++ msg)
+
+ qLookupName _ _ = badIO "lookupName"
+ qReify _ = badIO "reify"
+ qReifyFixity _ = badIO "reifyFixity"
+ qReifyType _ = badIO "reifyFixity"
+ qReifyInstances _ _ = badIO "reifyInstances"
+ qReifyRoles _ = badIO "reifyRoles"
+ qReifyAnnotations _ = badIO "reifyAnnotations"
+ qReifyModule _ = badIO "reifyModule"
+ qReifyConStrictness _ = badIO "reifyConStrictness"
+ qLocation = badIO "currentLocation"
+ qRecover _ _ = badIO "recover" -- Maybe we could fix this?
+ qGetPackageRoot = badIO "getProjectRoot"
+ qAddDependentFile _ = badIO "addDependentFile"
+ qAddTempFile _ = badIO "addTempFile"
+ qAddTopDecls _ = badIO "addTopDecls"
+ qAddForeignFilePath _ _ = badIO "addForeignFilePath"
+ qAddModFinalizer _ = badIO "addModFinalizer"
+ qAddCorePlugin _ = badIO "addCorePlugin"
+ qGetQ = badIO "getQ"
+ qPutQ _ = badIO "putQ"
+ qIsExtEnabled _ = badIO "isExtEnabled"
+ qExtsEnabled = badIO "extsEnabled"
+ qPutDoc _ _ = badIO "putDoc"
+ qGetDoc _ = badIO "getDoc"
+
+instance Quote IO where
+ newName = newNameIO
+
+newNameIO :: String -> IO Name
+newNameIO s = do { n <- atomicModifyIORef' counter (\x -> (x + 1, x))
+ ; pure (mkNameU s n) }
+
+badIO :: String -> IO a
+badIO op = do { qReport True ("Can't do `" ++ op ++ "' in the IO monad")
+ ; fail "Template Haskell failure" }
+
+-- Global variable to generate unique symbols
+counter :: IORef Uniq
+{-# NOINLINE counter #-}
+counter = unsafePerformIO (newIORef 0)
+
+
+-----------------------------------------------------
+--
+-- The Q monad
+--
+-----------------------------------------------------
+
+-- | In short, 'Q' provides the 'Quasi' operations in one neat monad for the
+-- user.
+--
+-- The longer story, is that 'Q' wraps an arbitrary 'Quasi'-able monad.
+-- The perceptive reader notices that 'Quasi' has only two instances, 'Q'
+-- itself and 'IO', neither of which have concrete implementations.'Q' plays
+-- the trick of [dependency
+-- inversion](https://en.wikipedia.org/wiki/Dependency_inversion_principle),
+-- providing an abstract interface for the user which is later concretely
+-- fufilled by an concrete 'Quasi' instance, internal to GHC.
+newtype Q a = Q { unQ :: forall m. Quasi m => m a }
+
+-- | \"Runs\" the 'Q' monad. Normal users of Template Haskell
+-- should not need this function, as the splice brackets @$( ... )@
+-- are the usual way of running a 'Q' computation.
+--
+-- This function is primarily used in GHC internals, and for debugging
+-- splices by running them in 'IO'.
+--
+-- Note that many functions in 'Q', such as 'reify' and other compiler
+-- queries, are not supported when running 'Q' in 'IO'; these operations
+-- simply fail at runtime. Indeed, the only operations guaranteed to succeed
+-- are 'newName', 'runIO', 'reportError' and 'reportWarning'.
+runQ :: Quasi m => Q a -> m a
+runQ (Q m) = m
+
+instance Monad Q where
+ Q m >>= k = Q (m >>= \x -> unQ (k x))
+ (>>) = (*>)
+
+instance MonadFail Q where
+ fail s = report True s >> Q (fail "Q monad failure")
+
+instance Functor Q where
+ fmap f (Q x) = Q (fmap f x)
+
+instance Applicative Q where
+ pure x = Q (pure x)
+ Q f <*> Q x = Q (f <*> x)
+ Q m *> Q n = Q (m *> n)
+
+-- | @since 2.17.0.0
+instance Semigroup a => Semigroup (Q a) where
+ (<>) = liftA2 (<>)
+
+-- | @since 2.17.0.0
+instance Monoid a => Monoid (Q a) where
+ mempty = pure mempty
+
+-- | If the function passed to 'mfix' inspects its argument,
+-- the resulting action will throw a 'FixIOException'.
+--
+-- @since 2.17.0.0
+instance MonadFix Q where
+ -- We use the same blackholing approach as in fixIO.
+ -- See Note [Blackholing in fixIO] in System.IO in base.
+ mfix k = do
+ m <- runIO newEmptyMVar
+ ans <- runIO (unsafeDupableInterleaveIO
+ (readMVar m `catch` \BlockedIndefinitelyOnMVar ->
+ throwIO FixIOException))
+ result <- k ans
+ runIO (putMVar m result)
+ return result
+
+
+-----------------------------------------------------
+--
+-- The Quote class
+--
+-----------------------------------------------------
+
+
+
+-- | The 'Quote' class implements the minimal interface which is necessary for
+-- desugaring quotations.
+--
+-- * The @Monad m@ superclass is needed to stitch together the different
+-- AST fragments.
+-- * 'newName' is used when desugaring binding structures such as lambdas
+-- to generate fresh names.
+--
+-- Therefore the type of an untyped quotation in GHC is `Quote m => m Exp`
+--
+-- For many years the type of a quotation was fixed to be `Q Exp` but by
+-- more precisely specifying the minimal interface it enables the `Exp` to
+-- be extracted purely from the quotation without interacting with `Q`.
+class Monad m => Quote m where
+ {- |
+ Generate a fresh name, which cannot be captured.
+
+ For example, this:
+
+ @f = $(do
+ nm1 <- newName \"x\"
+ let nm2 = 'mkName' \"x\"
+ return ('LamE' ['VarP' nm1] (LamE [VarP nm2] ('VarE' nm1)))
+ )@
+
+ will produce the splice
+
+ >f = \x0 -> \x -> x0
+
+ In particular, the occurrence @VarE nm1@ refers to the binding @VarP nm1@,
+ and is not captured by the binding @VarP nm2@.
+
+ Although names generated by @newName@ cannot /be captured/, they can
+ /capture/ other names. For example, this:
+
+ >g = $(do
+ > nm1 <- newName "x"
+ > let nm2 = mkName "x"
+ > return (LamE [VarP nm2] (LamE [VarP nm1] (VarE nm2)))
+ > )
+
+ will produce the splice
+
+ >g = \x -> \x0 -> x0
+
+ since the occurrence @VarE nm2@ is captured by the innermost binding
+ of @x@, namely @VarP nm1@.
+ -}
+ newName :: String -> m Name
+
+instance Quote Q where
+ newName s = Q (qNewName s)
+
+-----------------------------------------------------
+--
+-- The TExp type
+--
+-----------------------------------------------------
+
+type TExp :: TYPE r -> Kind.Type
+type role TExp nominal -- See Note [Role of TExp]
+newtype TExp a = TExp
+ { unType :: Exp -- ^ Underlying untyped Template Haskell expression
+ }
+-- ^ Typed wrapper around an 'Exp'.
+--
+-- This is the typed representation of terms produced by typed quotes.
+--
+-- Representation-polymorphic since /template-haskell-2.16.0.0/.
+
+-- | Discard the type annotation and produce a plain Template Haskell
+-- expression
+--
+-- Representation-polymorphic since /template-haskell-2.16.0.0/.
+unTypeQ :: forall (r :: RuntimeRep) (a :: TYPE r) m . Quote m => m (TExp a) -> m Exp
+unTypeQ m = do { TExp e <- m
+ ; return e }
+
+-- | Annotate the Template Haskell expression with a type
+--
+-- This is unsafe because GHC cannot check for you that the expression
+-- really does have the type you claim it has.
+--
+-- Representation-polymorphic since /template-haskell-2.16.0.0/.
+unsafeTExpCoerce :: forall (r :: RuntimeRep) (a :: TYPE r) m .
+ Quote m => m Exp -> m (TExp a)
+unsafeTExpCoerce m = do { e <- m
+ ; return (TExp e) }
+
+{- Note [Role of TExp]
+~~~~~~~~~~~~~~~~~~~~~~
+TExp's argument must have a nominal role, not phantom as would
+be inferred (#8459). Consider
+
+ e :: Code Q Age
+ e = [|| MkAge 3 ||]
+
+ foo = $(coerce e) + 4::Int
+
+The splice will evaluate to (MkAge 3) and you can't add that to
+4::Int. So you can't coerce a (Code Q Age) to a (Code Q Int). -}
+
+-- Code constructor
+#if __GLASGOW_HASKELL__ >= 909
+type Code :: (Kind.Type -> Kind.Type) -> forall r. TYPE r -> Kind.Type
+ -- See Note [Foralls to the right in Code]
+#else
+type Code :: (Kind.Type -> Kind.Type) -> TYPE r -> Kind.Type
+#endif
+type role Code representational nominal -- See Note [Role of TExp]
+newtype Code m a = Code
+ { examineCode :: m (TExp a) -- ^ Underlying monadic value
+ }
+-- ^ Represents an expression which has type @a@, built in monadic context @m@. Built on top of 'TExp', typed
+-- expressions allow for type-safe splicing via:
+--
+-- - typed quotes, written as @[|| ... ||]@ where @...@ is an expression; if
+-- that expression has type @a@, then the quotation has type
+-- @Quote m => Code m a@
+--
+-- - typed splices inside of typed quotes, written as @$$(...)@ where @...@
+-- is an arbitrary expression of type @Quote m => Code m a@
+--
+-- Traditional expression quotes and splices let us construct ill-typed
+-- expressions:
+--
+-- >>> fmap ppr $ runQ (unTypeCode [| True == $( [| "foo" |] ) |])
+-- GHC.Internal.Types.True GHC.Internal.Classes.== "foo"
+-- >>> GHC.Internal.Types.True GHC.Internal.Classes.== "foo"
+-- <interactive> error:
+-- • Couldn't match expected type ‘Bool’ with actual type ‘[Char]’
+-- • In the second argument of ‘(==)’, namely ‘"foo"’
+-- In the expression: True == "foo"
+-- In an equation for ‘it’: it = True == "foo"
+--
+-- With typed expressions, the type error occurs when /constructing/ the
+-- Template Haskell expression:
+--
+-- >>> fmap ppr $ runQ (unTypeCode [|| True == $$( [|| "foo" ||] ) ||])
+-- <interactive> error:
+-- • Couldn't match type ‘[Char]’ with ‘Bool’
+-- Expected type: Code Q Bool
+-- Actual type: Code Q [Char]
+-- • In the Template Haskell quotation [|| "foo" ||]
+-- In the expression: [|| "foo" ||]
+-- In the Template Haskell splice $$([|| "foo" ||])
+
+
+{- Note [Foralls to the right in Code]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Code has the following type signature:
+ type Code :: (Kind.Type -> Kind.Type) -> forall r. TYPE r -> Kind.Type
+
+This allows us to write
+ data T (f :: forall r . (TYPE r) -> Type) = MkT (f Int) (f Int#)
+
+ tcodeq :: T (Code Q)
+ tcodeq = MkT [||5||] [||5#||]
+
+If we used the slightly more straightforward signature
+ type Code :: foral r. (Kind.Type -> Kind.Type) -> TYPE r -> Kind.Type
+
+then the example above would become ill-typed. (See #23592 for some discussion.)
+-}
+
+-- | Unsafely convert an untyped code representation into a typed code
+-- representation.
+unsafeCodeCoerce :: forall (r :: RuntimeRep) (a :: TYPE r) m .
+ Quote m => m Exp -> Code m a
+unsafeCodeCoerce m = Code (unsafeTExpCoerce m)
+
+-- | Lift a monadic action producing code into the typed 'Code'
+-- representation
+liftCode :: forall (r :: RuntimeRep) (a :: TYPE r) m . m (TExp a) -> Code m a
+liftCode = Code
+
+-- | Extract the untyped representation from the typed representation
+unTypeCode :: forall (r :: RuntimeRep) (a :: TYPE r) m . Quote m
+ => Code m a -> m Exp
+unTypeCode = unTypeQ . examineCode
+
+-- | Modify the ambient monad used during code generation. For example, you
+-- can use `hoistCode` to handle a state effect:
+-- @
+-- handleState :: Code (StateT Int Q) a -> Code Q a
+-- handleState = hoistCode (flip runState 0)
+-- @
+hoistCode :: forall m n (r :: RuntimeRep) (a :: TYPE r) . Monad m
+ => (forall x . m x -> n x) -> Code m a -> Code n a
+hoistCode f (Code a) = Code (f a)
+
+
+-- | Variant of '(>>=)' which allows effectful computations to be injected
+-- into code generation.
+bindCode :: forall m a (r :: RuntimeRep) (b :: TYPE r) . Monad m
+ => m a -> (a -> Code m b) -> Code m b
+bindCode q k = liftCode (q >>= examineCode . k)
+
+-- | Variant of '(>>)' which allows effectful computations to be injected
+-- into code generation.
+bindCode_ :: forall m a (r :: RuntimeRep) (b :: TYPE r) . Monad m
+ => m a -> Code m b -> Code m b
+bindCode_ q c = liftCode ( q >> examineCode c)
+
+-- | A useful combinator for embedding monadic actions into 'Code'
+-- @
+-- myCode :: ... => Code m a
+-- myCode = joinCode $ do
+-- x <- someSideEffect
+-- return (makeCodeWith x)
+-- @
+joinCode :: forall m (r :: RuntimeRep) (a :: TYPE r) . Monad m
+ => m (Code m a) -> Code m a
+joinCode = flip bindCode id
+
+----------------------------------------------------
+-- Packaged versions for the programmer, hiding the Quasi-ness
+
+
+-- | Report an error (True) or warning (False),
+-- but carry on; use 'fail' to stop.
+report :: Bool -> String -> Q ()
+report b s = Q (qReport b s)
+{-# DEPRECATED report "Use reportError or reportWarning instead" #-} -- deprecated in 7.6
+
+-- | Report an error to the user, but allow the current splice's computation to carry on. To abort the computation, use 'fail'.
+reportError :: String -> Q ()
+reportError = report True
+
+-- | Report a warning to the user, and carry on.
+reportWarning :: String -> Q ()
+reportWarning = report False
+
+-- | Recover from errors raised by 'reportError' or 'fail'.
+recover :: Q a -- ^ handler to invoke on failure
+ -> Q a -- ^ computation to run
+ -> Q a
+recover (Q r) (Q m) = Q (qRecover r m)
+
+-- We don't export lookupName; the Bool isn't a great API
+-- Instead we export lookupTypeName, lookupValueName
+lookupName :: Bool -> String -> Q (Maybe Name)
+lookupName ns s = Q (qLookupName ns s)
+
+-- | Look up the given name in the (type namespace of the) current splice's scope. See "Language.Haskell.TH.Syntax#namelookup" for more details.
+lookupTypeName :: String -> Q (Maybe Name)
+lookupTypeName s = Q (qLookupName True s)
+
+-- | Look up the given name in the (value namespace of the) current splice's scope. See "Language.Haskell.TH.Syntax#namelookup" for more details.
+lookupValueName :: String -> Q (Maybe Name)
+lookupValueName s = Q (qLookupName False s)
+
+{-
+Note [Name lookup]
+~~~~~~~~~~~~~~~~~~
+-}
+{- $namelookup #namelookup#
+The functions 'lookupTypeName' and 'lookupValueName' provide
+a way to query the current splice's context for what names
+are in scope. The function 'lookupTypeName' queries the type
+namespace, whereas 'lookupValueName' queries the value namespace,
+but the functions are otherwise identical.
+
+A call @lookupValueName s@ will check if there is a value
+with name @s@ in scope at the current splice's location. If
+there is, the @Name@ of this value is returned;
+if not, then @Nothing@ is returned.
+
+The returned name cannot be \"captured\".
+For example:
+
+> f = "global"
+> g = $( do
+> Just nm <- lookupValueName "f"
+> [| let f = "local" in $( varE nm ) |]
+
+In this case, @g = \"global\"@; the call to @lookupValueName@
+returned the global @f@, and this name was /not/ captured by
+the local definition of @f@.
+
+The lookup is performed in the context of the /top-level/ splice
+being run. For example:
+
+> f = "global"
+> g = $( [| let f = "local" in
+> $(do
+> Just nm <- lookupValueName "f"
+> varE nm
+> ) |] )
+
+Again in this example, @g = \"global\"@, because the call to
+@lookupValueName@ queries the context of the outer-most @$(...)@.
+
+Operators should be queried without any surrounding parentheses, like so:
+
+> lookupValueName "+"
+
+Qualified names are also supported, like so:
+
+> lookupValueName "Prelude.+"
+> lookupValueName "Prelude.map"
+
+-}
+
+
+{- | 'reify' looks up information about the 'Name'. It will fail with
+a compile error if the 'Name' is not visible. A 'Name' is visible if it is
+imported or defined in a prior top-level declaration group. See the
+documentation for 'newDeclarationGroup' for more details.
+
+It is sometimes useful to construct the argument name using 'lookupTypeName' or 'lookupValueName'
+to ensure that we are reifying from the right namespace. For instance, in this context:
+
+> data D = D
+
+which @D@ does @reify (mkName \"D\")@ return information about? (Answer: @D@-the-type, but don't rely on it.)
+To ensure we get information about @D@-the-value, use 'lookupValueName':
+
+> do
+> Just nm <- lookupValueName "D"
+> reify nm
+
+and to get information about @D@-the-type, use 'lookupTypeName'.
+-}
+reify :: Name -> Q Info
+reify v = Q (qReify v)
+
+{- | @reifyFixity nm@ attempts to find a fixity declaration for @nm@. For
+example, if the function @foo@ has the fixity declaration @infixr 7 foo@, then
+@reifyFixity 'foo@ would return @'Just' ('Fixity' 7 'InfixR')@. If the function
+@bar@ does not have a fixity declaration, then @reifyFixity 'bar@ returns
+'Nothing', so you may assume @bar@ has 'defaultFixity'.
+-}
+reifyFixity :: Name -> Q (Maybe Fixity)
+reifyFixity nm = Q (qReifyFixity nm)
+
+{- | @reifyType nm@ attempts to find the type or kind of @nm@. For example,
+@reifyType 'not@ returns @Bool -> Bool@, and
+@reifyType ''Bool@ returns @Type@.
+This works even if there's no explicit signature and the type or kind is inferred.
+-}
+reifyType :: Name -> Q Type
+reifyType nm = Q (qReifyType nm)
+
+{- | Template Haskell is capable of reifying information about types and
+terms defined in previous declaration groups. Top-level declaration splices break up
+declaration groups.
+
+For an example, consider this code block. We define a datatype @X@ and
+then try to call 'reify' on the datatype.
+
+@
+module Check where
+
+data X = X
+ deriving Eq
+
+$(do
+ info <- reify ''X
+ runIO $ print info
+ )
+@
+
+This code fails to compile, noting that @X@ is not available for reification at the site of 'reify'. We can fix this by creating a new declaration group using an empty top-level splice:
+
+@
+data X = X
+ deriving Eq
+
+$(pure [])
+
+$(do
+ info <- reify ''X
+ runIO $ print info
+ )
+@
+
+We provide 'newDeclarationGroup' as a means of documenting this behavior
+and providing a name for the pattern.
+
+Since top level splices infer the presence of the @$( ... )@ brackets, we can also write:
+
+@
+data X = X
+ deriving Eq
+
+newDeclarationGroup
+
+$(do
+ info <- reify ''X
+ runIO $ print info
+ )
+@
+
+-}
+newDeclarationGroup :: Q [Dec]
+newDeclarationGroup = pure []
+
+{- | @reifyInstances nm tys@ returns a list of all visible instances (see below for "visible")
+of @nm tys@. That is,
+if @nm@ is the name of a type class, then all instances of this class at the types @tys@
+are returned. Alternatively, if @nm@ is the name of a data family or type family,
+all instances of this family at the types @tys@ are returned.
+
+Note that this is a \"shallow\" test; the declarations returned merely have
+instance heads which unify with @nm tys@, they need not actually be satisfiable.
+
+ - @reifyInstances ''Eq [ 'TupleT' 2 \``AppT`\` 'ConT' ''A \``AppT`\` 'ConT' ''B ]@ contains
+ the @instance (Eq a, Eq b) => Eq (a, b)@ regardless of whether @A@ and
+ @B@ themselves implement 'Eq'
+
+ - @reifyInstances ''Show [ 'VarT' ('mkName' "a") ]@ produces every available
+ instance of 'Show'
+
+There is one edge case: @reifyInstances ''Typeable tys@ currently always
+produces an empty list (no matter what @tys@ are given).
+
+In principle, the *visible* instances are
+* all instances defined in a prior top-level declaration group
+ (see docs on @newDeclarationGroup@), or
+* all instances defined in any module transitively imported by the
+ module being compiled
+
+However, actually searching all modules transitively below the one being
+compiled is unreasonably expensive, so @reifyInstances@ will report only the
+instance for modules that GHC has had some cause to visit during this
+compilation. This is a shortcoming: @reifyInstances@ might fail to report
+instances for a type that is otherwise unusued, or instances defined in a
+different component. You can work around this shortcoming by explicitly importing the modules
+whose instances you want to be visible. GHC issue <https://gitlab.haskell.org/ghc/ghc/-/issues/20529#note_388980 #20529>
+has some discussion around this.
+
+-}
+reifyInstances :: Name -> [Type] -> Q [InstanceDec]
+reifyInstances cls tys = Q (qReifyInstances cls tys)
+
+{- | @reifyRoles nm@ returns the list of roles associated with the parameters
+(both visible and invisible) of
+the tycon @nm@. Fails if @nm@ cannot be found or is not a tycon.
+The returned list should never contain 'InferR'.
+
+An invisible parameter to a tycon is often a kind parameter. For example, if
+we have
+
+@
+type Proxy :: forall k. k -> Type
+data Proxy a = MkProxy
+@
+
+and @reifyRoles Proxy@, we will get @['NominalR', 'PhantomR']@. The 'NominalR' is
+the role of the invisible @k@ parameter. Kind parameters are always nominal.
+-}
+reifyRoles :: Name -> Q [Role]
+reifyRoles nm = Q (qReifyRoles nm)
+
+-- | @reifyAnnotations target@ returns the list of annotations
+-- associated with @target@. Only the annotations that are
+-- appropriately typed is returned. So if you have @Int@ and @String@
+-- annotations for the same target, you have to call this function twice.
+reifyAnnotations :: Data a => AnnLookup -> Q [a]
+reifyAnnotations an = Q (qReifyAnnotations an)
+
+-- | @reifyModule mod@ looks up information about module @mod@. To
+-- look up the current module, call this function with the return
+-- value of 'Language.Haskell.TH.Lib.thisModule'.
+reifyModule :: Module -> Q ModuleInfo
+reifyModule m = Q (qReifyModule m)
+
+-- | @reifyConStrictness nm@ looks up the strictness information for the fields
+-- of the constructor with the name @nm@. Note that the strictness information
+-- that 'reifyConStrictness' returns may not correspond to what is written in
+-- the source code. For example, in the following data declaration:
+--
+-- @
+-- data Pair a = Pair a a
+-- @
+--
+-- 'reifyConStrictness' would return @['DecidedLazy', DecidedLazy]@ under most
+-- circumstances, but it would return @['DecidedStrict', DecidedStrict]@ if the
+-- @-XStrictData@ language extension was enabled.
+reifyConStrictness :: Name -> Q [DecidedStrictness]
+reifyConStrictness n = Q (qReifyConStrictness n)
+
+-- | Is the list of instances returned by 'reifyInstances' nonempty?
+--
+-- If you're confused by an instance not being visible despite being
+-- defined in the same module and above the splice in question, see the
+-- docs for 'newDeclarationGroup' for a possible explanation.
+isInstance :: Name -> [Type] -> Q Bool
+isInstance nm tys = do { decs <- reifyInstances nm tys
+ ; return (not (null decs)) }
+
+-- | The location at which this computation is spliced.
+location :: Q Loc
+location = Q qLocation
+
+-- |The 'runIO' function lets you run an I\/O computation in the 'Q' monad.
+-- Take care: you are guaranteed the ordering of calls to 'runIO' within
+-- a single 'Q' computation, but not about the order in which splices are run.
+--
+-- Note: for various murky reasons, stdout and stderr handles are not
+-- necessarily flushed when the compiler finishes running, so you should
+-- flush them yourself.
+runIO :: IO a -> Q a
+runIO m = Q (qRunIO m)
+
+-- | Get the package root for the current package which is being compiled.
+-- This can be set explicitly with the -package-root flag but is normally
+-- just the current working directory.
+--
+-- The motivation for this flag is to provide a principled means to remove the
+-- assumption from splices that they will be executed in the directory where the
+-- cabal file resides. Projects such as haskell-language-server can't and don't
+-- change directory when compiling files but instead set the -package-root flag
+-- appropriately.
+getPackageRoot :: Q FilePath
+getPackageRoot = Q qGetPackageRoot
+
+
+
+-- | Record external files that runIO is using (dependent upon).
+-- The compiler can then recognize that it should re-compile the Haskell file
+-- when an external file changes.
+--
+-- Expects an absolute file path.
+--
+-- Notes:
+--
+-- * ghc -M does not know about these dependencies - it does not execute TH.
+--
+-- * The dependency is based on file content, not a modification time
+addDependentFile :: FilePath -> Q ()
+addDependentFile fp = Q (qAddDependentFile fp)
+
+-- | Obtain a temporary file path with the given suffix. The compiler will
+-- delete this file after compilation.
+addTempFile :: String -> Q FilePath
+addTempFile suffix = Q (qAddTempFile suffix)
+
+-- | Add additional top-level declarations. The added declarations will be type
+-- checked along with the current declaration group.
+addTopDecls :: [Dec] -> Q ()
+addTopDecls ds = Q (qAddTopDecls ds)
+
+
+-- | Emit a foreign file which will be compiled and linked to the object for
+-- the current module. Currently only languages that can be compiled with
+-- the C compiler are supported, and the flags passed as part of -optc will
+-- be also applied to the C compiler invocation that will compile them.
+--
+-- Note that for non-C languages (for example C++) @extern "C"@ directives
+-- must be used to get symbols that we can access from Haskell.
+--
+-- To get better errors, it is recommended to use #line pragmas when
+-- emitting C files, e.g.
+--
+-- > {-# LANGUAGE CPP #-}
+-- > ...
+-- > addForeignSource LangC $ unlines
+-- > [ "#line " ++ show (__LINE__ + 1) ++ " " ++ show __FILE__
+-- > , ...
+-- > ]
+addForeignSource :: ForeignSrcLang -> String -> Q ()
+addForeignSource lang src = do
+ let suffix = case lang of
+ LangC -> "c"
+ LangCxx -> "cpp"
+ LangObjc -> "m"
+ LangObjcxx -> "mm"
+ LangAsm -> "s"
+ LangJs -> "js"
+ RawObject -> "a"
+ path <- addTempFile suffix
+ runIO $ writeFile path src
+ addForeignFilePath lang path
+
+-- | Same as 'addForeignSource', but expects to receive a path pointing to the
+-- foreign file instead of a 'String' of its contents. Consider using this in
+-- conjunction with 'addTempFile'.
+--
+-- This is a good alternative to 'addForeignSource' when you are trying to
+-- directly link in an object file.
+addForeignFilePath :: ForeignSrcLang -> FilePath -> Q ()
+addForeignFilePath lang fp = Q (qAddForeignFilePath lang fp)
+
+-- | Add a finalizer that will run in the Q monad after the current module has
+-- been type checked. This only makes sense when run within a top-level splice.
+--
+-- The finalizer is given the local type environment at the splice point. Thus
+-- 'reify' is able to find the local definitions when executed inside the
+-- finalizer.
+addModFinalizer :: Q () -> Q ()
+addModFinalizer act = Q (qAddModFinalizer (unQ act))
+
+-- | Adds a core plugin to the compilation pipeline.
+--
+-- @addCorePlugin m@ has almost the same effect as passing @-fplugin=m@ to ghc
+-- in the command line. The major difference is that the plugin module @m@
+-- must not belong to the current package. When TH executes, it is too late
+-- to tell the compiler that we needed to compile first a plugin module in the
+-- current package.
+addCorePlugin :: String -> Q ()
+addCorePlugin plugin = Q (qAddCorePlugin plugin)
+
+-- | Get state from the 'Q' monad. Note that the state is local to the
+-- Haskell module in which the Template Haskell expression is executed.
+getQ :: Typeable a => Q (Maybe a)
+getQ = Q qGetQ
+
+-- | Replace the state in the 'Q' monad. Note that the state is local to the
+-- Haskell module in which the Template Haskell expression is executed.
+putQ :: Typeable a => a -> Q ()
+putQ x = Q (qPutQ x)
+
+-- | Determine whether the given language extension is enabled in the 'Q' monad.
+isExtEnabled :: Extension -> Q Bool
+isExtEnabled ext = Q (qIsExtEnabled ext)
+
+-- | List all enabled language extensions.
+extsEnabled :: Q [Extension]
+extsEnabled = Q qExtsEnabled
+
+-- | Add Haddock documentation to the specified location. This will overwrite
+-- any documentation at the location if it already exists. This will reify the
+-- specified name, so it must be in scope when you call it. If you want to add
+-- documentation to something that you are currently splicing, you can use
+-- 'addModFinalizer' e.g.
+--
+-- > do
+-- > let nm = mkName "x"
+-- > addModFinalizer $ putDoc (DeclDoc nm) "Hello"
+-- > [d| $(varP nm) = 42 |]
+--
+-- The helper functions 'withDecDoc' and 'withDecsDoc' will do this for you, as
+-- will the 'funD_doc' and other @_doc@ combinators.
+-- You most likely want to have the @-haddock@ flag turned on when using this.
+-- Adding documentation to anything outside of the current module will cause an
+-- error.
+putDoc :: DocLoc -> String -> Q ()
+putDoc t s = Q (qPutDoc t s)
+
+-- | Retrieves the Haddock documentation at the specified location, if one
+-- exists.
+-- It can be used to read documentation on things defined outside of the current
+-- module, provided that those modules were compiled with the @-haddock@ flag.
+getDoc :: DocLoc -> Q (Maybe String)
+getDoc n = Q (qGetDoc n)
+
+instance MonadIO Q where
+ liftIO = runIO
+
+instance Quasi Q where
+ qNewName = newName
+ qReport = report
+ qRecover = recover
+ qReify = reify
+ qReifyFixity = reifyFixity
+ qReifyType = reifyType
+ qReifyInstances = reifyInstances
+ qReifyRoles = reifyRoles
+ qReifyAnnotations = reifyAnnotations
+ qReifyModule = reifyModule
+ qReifyConStrictness = reifyConStrictness
+ qLookupName = lookupName
+ qLocation = location
+ qGetPackageRoot = getPackageRoot
+ qAddDependentFile = addDependentFile
+ qAddTempFile = addTempFile
+ qAddTopDecls = addTopDecls
+ qAddForeignFilePath = addForeignFilePath
+ qAddModFinalizer = addModFinalizer
+ qAddCorePlugin = addCorePlugin
+ qGetQ = getQ
+ qPutQ = putQ
+ qIsExtEnabled = isExtEnabled
+ qExtsEnabled = extsEnabled
+ qPutDoc = putDoc
+ qGetDoc = getDoc
+
+
+----------------------------------------------------
+-- The following operations are used solely in GHC.HsToCore.Quote when
+-- desugaring brackets. They are not necessary for the user, who can use
+-- ordinary return and (>>=) etc
+
+-- | This function is only used in 'GHC.HsToCore.Quote' when desugaring
+-- brackets. This is not necessary for the user, who can use the ordinary
+-- 'return' and '(>>=)' operations.
+sequenceQ :: forall m . Monad m => forall a . [m a] -> m [a]
+sequenceQ = sequence
=====================================
libraries/ghc-internal/src/GHC/Internal/TH/Quote.hs
=====================================
@@ -20,6 +20,7 @@ module GHC.Internal.TH.Quote(
) where
import GHC.Internal.TH.Syntax
+import GHC.Internal.TH.Monad
import GHC.Internal.Base hiding (Type)
=====================================
libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs
=====================================
@@ -1,14 +1,16 @@
{-# OPTIONS_HADDOCK not-home #-} -- we want users to import Language.Haskell.TH.Syntax instead
-{-# LANGUAGE CPP, DeriveDataTypeable,
- DeriveGeneric, FlexibleInstances, DefaultSignatures,
- RankNTypes, RoleAnnotations, ScopedTypeVariables,
- MagicHash, KindSignatures, PolyKinds, TypeApplications, DataKinds,
- GADTs, UnboxedTuples, UnboxedSums, TypeOperators,
- Trustworthy, DeriveFunctor, DeriveTraversable,
- BangPatterns, RecordWildCards, ImplicitParams #-}
-
-{-# LANGUAGE TemplateHaskellQuotes #-}
-{-# LANGUAGE StandaloneKindSignatures #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DeriveTraversable #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE RoleAnnotations #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE UnboxedTuples #-}
-- | This module is used internally in GHC's integration with Template Haskell
-- and defines the abstract syntax of Template Haskell.
@@ -26,971 +28,37 @@ module GHC.Internal.TH.Syntax
#ifdef BOOTSTRAP_TH
import Prelude
-import Data.Data hiding (Fixity(..))
-import Data.IORef
import System.IO.Unsafe ( unsafePerformIO )
-import Control.Monad.IO.Class (MonadIO (..))
-import Control.Monad.Fix (MonadFix (..))
-import Control.Exception (BlockedIndefinitelyOnMVar (..), catch, throwIO)
-import Control.Exception.Base (FixIOException (..))
-import Control.Concurrent.MVar (newEmptyMVar, readMVar, putMVar)
-import System.IO ( hPutStrLn, stderr )
import Data.Char ( isAlpha, isAlphaNum, isUpper )
import Data.List.NonEmpty ( NonEmpty(..) )
import Data.Word
-import qualified Data.Kind as Kind (Type)
import Foreign.ForeignPtr
import Foreign.C.String
import Foreign.C.Types
-import GHC.IO.Unsafe ( unsafeDupableInterleaveIO )
import GHC.Ptr ( Ptr, plusPtr )
import GHC.Generics ( Generic )
-import GHC.Types (TYPE, RuntimeRep(..))
#else
import GHC.Internal.Base hiding (NonEmpty(..),Type, Module, sequence)
-import GHC.Internal.Data.Data hiding (Fixity(..))
import GHC.Internal.Data.NonEmpty (NonEmpty(..))
import GHC.Internal.Data.Traversable
import GHC.Internal.Word
import GHC.Internal.Generics (Generic)
-import GHC.Internal.IORef
-import GHC.Internal.System.IO
import GHC.Internal.Show
import GHC.Internal.Integer
import GHC.Internal.Real
import GHC.Internal.Data.Foldable
import GHC.Internal.Foreign.Ptr
import GHC.Internal.ForeignPtr
-import GHC.Internal.Data.Typeable
-import GHC.Internal.Control.Monad.IO.Class
import GHC.Internal.Foreign.C.Types
import GHC.Internal.Foreign.C.String
-import GHC.Internal.Control.Monad.Fail
-import GHC.Internal.Control.Monad.Fix
-import GHC.Internal.Control.Exception
import GHC.Internal.Num
import GHC.Internal.IO.Unsafe
import GHC.Internal.List (dropWhile, break, replicate, reverse, last)
-import GHC.Internal.MVar
-import GHC.Internal.IO.Exception
import GHC.Internal.Unicode
-import qualified GHC.Internal.Types as Kind (Type)
#endif
import GHC.Internal.ForeignSrcLang
import GHC.Internal.LanguageExtensions
------------------------------------------------------
---
--- The Quasi class
---
------------------------------------------------------
-
-class (MonadIO m, MonadFail m) => Quasi m where
- -- | Fresh names. See 'newName'.
- qNewName :: String -> m Name
-
- ------- Error reporting and recovery -------
- -- | Report an error (True) or warning (False)
- -- ...but carry on; use 'fail' to stop. See 'report'.
- qReport :: Bool -> String -> m ()
-
- -- | See 'recover'.
- qRecover :: m a -- ^ the error handler
- -> m a -- ^ action which may fail
- -> m a -- ^ Recover from the monadic 'fail'
-
- ------- Inspect the type-checker's environment -------
- -- | True <=> type namespace, False <=> value namespace. See 'lookupName'.
- qLookupName :: Bool -> String -> m (Maybe Name)
- -- | See 'reify'.
- qReify :: Name -> m Info
- -- | See 'reifyFixity'.
- qReifyFixity :: Name -> m (Maybe Fixity)
- -- | See 'reifyType'.
- qReifyType :: Name -> m Type
- -- | Is (n tys) an instance? Returns list of matching instance Decs (with
- -- empty sub-Decs) Works for classes and type functions. See 'reifyInstances'.
- qReifyInstances :: Name -> [Type] -> m [Dec]
- -- | See 'reifyRoles'.
- qReifyRoles :: Name -> m [Role]
- -- | See 'reifyAnnotations'.
- qReifyAnnotations :: Data a => AnnLookup -> m [a]
- -- | See 'reifyModule'.
- qReifyModule :: Module -> m ModuleInfo
- -- | See 'reifyConStrictness'.
- qReifyConStrictness :: Name -> m [DecidedStrictness]
-
- -- | See 'location'.
- qLocation :: m Loc
-
- -- | Input/output (dangerous). See 'runIO'.
- qRunIO :: IO a -> m a
- qRunIO = liftIO
- -- | See 'getPackageRoot'.
- qGetPackageRoot :: m FilePath
-
- -- | See 'addDependentFile'.
- qAddDependentFile :: FilePath -> m ()
-
- -- | See 'addTempFile'.
- qAddTempFile :: String -> m FilePath
-
- -- | See 'addTopDecls'.
- qAddTopDecls :: [Dec] -> m ()
-
- -- | See 'addForeignFilePath'.
- qAddForeignFilePath :: ForeignSrcLang -> String -> m ()
-
- -- | See 'addModFinalizer'.
- qAddModFinalizer :: Q () -> m ()
-
- -- | See 'addCorePlugin'.
- qAddCorePlugin :: String -> m ()
-
- -- | See 'getQ'.
- qGetQ :: Typeable a => m (Maybe a)
-
- -- | See 'putQ'.
- qPutQ :: Typeable a => a -> m ()
-
- -- | See 'isExtEnabled'.
- qIsExtEnabled :: Extension -> m Bool
- -- | See 'extsEnabled'.
- qExtsEnabled :: m [Extension]
-
- -- | See 'putDoc'.
- qPutDoc :: DocLoc -> String -> m ()
- -- | See 'getDoc'.
- qGetDoc :: DocLoc -> m (Maybe String)
-
------------------------------------------------------
--- The IO instance of Quasi
------------------------------------------------------
-
--- | This instance is used only when running a Q
--- computation in the IO monad, usually just to
--- print the result. There is no interesting
--- type environment, so reification isn't going to
--- work.
-instance Quasi IO where
- qNewName = newNameIO
-
- qReport True msg = hPutStrLn stderr ("Template Haskell error: " ++ msg)
- qReport False msg = hPutStrLn stderr ("Template Haskell error: " ++ msg)
-
- qLookupName _ _ = badIO "lookupName"
- qReify _ = badIO "reify"
- qReifyFixity _ = badIO "reifyFixity"
- qReifyType _ = badIO "reifyFixity"
- qReifyInstances _ _ = badIO "reifyInstances"
- qReifyRoles _ = badIO "reifyRoles"
- qReifyAnnotations _ = badIO "reifyAnnotations"
- qReifyModule _ = badIO "reifyModule"
- qReifyConStrictness _ = badIO "reifyConStrictness"
- qLocation = badIO "currentLocation"
- qRecover _ _ = badIO "recover" -- Maybe we could fix this?
- qGetPackageRoot = badIO "getProjectRoot"
- qAddDependentFile _ = badIO "addDependentFile"
- qAddTempFile _ = badIO "addTempFile"
- qAddTopDecls _ = badIO "addTopDecls"
- qAddForeignFilePath _ _ = badIO "addForeignFilePath"
- qAddModFinalizer _ = badIO "addModFinalizer"
- qAddCorePlugin _ = badIO "addCorePlugin"
- qGetQ = badIO "getQ"
- qPutQ _ = badIO "putQ"
- qIsExtEnabled _ = badIO "isExtEnabled"
- qExtsEnabled = badIO "extsEnabled"
- qPutDoc _ _ = badIO "putDoc"
- qGetDoc _ = badIO "getDoc"
-
-instance Quote IO where
- newName = newNameIO
-
-newNameIO :: String -> IO Name
-newNameIO s = do { n <- atomicModifyIORef' counter (\x -> (x + 1, x))
- ; pure (mkNameU s n) }
-
-badIO :: String -> IO a
-badIO op = do { qReport True ("Can't do `" ++ op ++ "' in the IO monad")
- ; fail "Template Haskell failure" }
-
--- Global variable to generate unique symbols
-counter :: IORef Uniq
-{-# NOINLINE counter #-}
-counter = unsafePerformIO (newIORef 0)
-
-
------------------------------------------------------
---
--- The Q monad
---
------------------------------------------------------
-
--- | In short, 'Q' provides the 'Quasi' operations in one neat monad for the
--- user.
---
--- The longer story, is that 'Q' wraps an arbitrary 'Quasi'-able monad.
--- The perceptive reader notices that 'Quasi' has only two instances, 'Q'
--- itself and 'IO', neither of which have concrete implementations.'Q' plays
--- the trick of [dependency
--- inversion](https://en.wikipedia.org/wiki/Dependency_inversion_principle),
--- providing an abstract interface for the user which is later concretely
--- fufilled by an concrete 'Quasi' instance, internal to GHC.
-newtype Q a = Q { unQ :: forall m. Quasi m => m a }
-
--- | \"Runs\" the 'Q' monad. Normal users of Template Haskell
--- should not need this function, as the splice brackets @$( ... )@
--- are the usual way of running a 'Q' computation.
---
--- This function is primarily used in GHC internals, and for debugging
--- splices by running them in 'IO'.
---
--- Note that many functions in 'Q', such as 'reify' and other compiler
--- queries, are not supported when running 'Q' in 'IO'; these operations
--- simply fail at runtime. Indeed, the only operations guaranteed to succeed
--- are 'newName', 'runIO', 'reportError' and 'reportWarning'.
-runQ :: Quasi m => Q a -> m a
-runQ (Q m) = m
-
-instance Monad Q where
- Q m >>= k = Q (m >>= \x -> unQ (k x))
- (>>) = (*>)
-
-instance MonadFail Q where
- fail s = report True s >> Q (fail "Q monad failure")
-
-instance Functor Q where
- fmap f (Q x) = Q (fmap f x)
-
-instance Applicative Q where
- pure x = Q (pure x)
- Q f <*> Q x = Q (f <*> x)
- Q m *> Q n = Q (m *> n)
-
--- | @since 2.17.0.0
-instance Semigroup a => Semigroup (Q a) where
- (<>) = liftA2 (<>)
-
--- | @since 2.17.0.0
-instance Monoid a => Monoid (Q a) where
- mempty = pure mempty
-
--- | If the function passed to 'mfix' inspects its argument,
--- the resulting action will throw a 'FixIOException'.
---
--- @since 2.17.0.0
-instance MonadFix Q where
- -- We use the same blackholing approach as in fixIO.
- -- See Note [Blackholing in fixIO] in System.IO in base.
- mfix k = do
- m <- runIO newEmptyMVar
- ans <- runIO (unsafeDupableInterleaveIO
- (readMVar m `catch` \BlockedIndefinitelyOnMVar ->
- throwIO FixIOException))
- result <- k ans
- runIO (putMVar m result)
- return result
-
-
------------------------------------------------------
---
--- The Quote class
---
------------------------------------------------------
-
-
-
--- | The 'Quote' class implements the minimal interface which is necessary for
--- desugaring quotations.
---
--- * The @Monad m@ superclass is needed to stitch together the different
--- AST fragments.
--- * 'newName' is used when desugaring binding structures such as lambdas
--- to generate fresh names.
---
--- Therefore the type of an untyped quotation in GHC is `Quote m => m Exp`
---
--- For many years the type of a quotation was fixed to be `Q Exp` but by
--- more precisely specifying the minimal interface it enables the `Exp` to
--- be extracted purely from the quotation without interacting with `Q`.
-class Monad m => Quote m where
- {- |
- Generate a fresh name, which cannot be captured.
-
- For example, this:
-
- @f = $(do
- nm1 <- newName \"x\"
- let nm2 = 'mkName' \"x\"
- return ('LamE' ['VarP' nm1] (LamE [VarP nm2] ('VarE' nm1)))
- )@
-
- will produce the splice
-
- >f = \x0 -> \x -> x0
-
- In particular, the occurrence @VarE nm1@ refers to the binding @VarP nm1@,
- and is not captured by the binding @VarP nm2@.
-
- Although names generated by @newName@ cannot /be captured/, they can
- /capture/ other names. For example, this:
-
- >g = $(do
- > nm1 <- newName "x"
- > let nm2 = mkName "x"
- > return (LamE [VarP nm2] (LamE [VarP nm1] (VarE nm2)))
- > )
-
- will produce the splice
-
- >g = \x -> \x0 -> x0
-
- since the occurrence @VarE nm2@ is captured by the innermost binding
- of @x@, namely @VarP nm1@.
- -}
- newName :: String -> m Name
-
-instance Quote Q where
- newName s = Q (qNewName s)
-
------------------------------------------------------
---
--- The TExp type
---
------------------------------------------------------
-
-type TExp :: TYPE r -> Kind.Type
-type role TExp nominal -- See Note [Role of TExp]
-newtype TExp a = TExp
- { unType :: Exp -- ^ Underlying untyped Template Haskell expression
- }
--- ^ Typed wrapper around an 'Exp'.
---
--- This is the typed representation of terms produced by typed quotes.
---
--- Representation-polymorphic since /template-haskell-2.16.0.0/.
-
--- | Discard the type annotation and produce a plain Template Haskell
--- expression
---
--- Representation-polymorphic since /template-haskell-2.16.0.0/.
-unTypeQ :: forall (r :: RuntimeRep) (a :: TYPE r) m . Quote m => m (TExp a) -> m Exp
-unTypeQ m = do { TExp e <- m
- ; return e }
-
--- | Annotate the Template Haskell expression with a type
---
--- This is unsafe because GHC cannot check for you that the expression
--- really does have the type you claim it has.
---
--- Representation-polymorphic since /template-haskell-2.16.0.0/.
-unsafeTExpCoerce :: forall (r :: RuntimeRep) (a :: TYPE r) m .
- Quote m => m Exp -> m (TExp a)
-unsafeTExpCoerce m = do { e <- m
- ; return (TExp e) }
-
-{- Note [Role of TExp]
-~~~~~~~~~~~~~~~~~~~~~~
-TExp's argument must have a nominal role, not phantom as would
-be inferred (#8459). Consider
-
- e :: Code Q Age
- e = [|| MkAge 3 ||]
-
- foo = $(coerce e) + 4::Int
-
-The splice will evaluate to (MkAge 3) and you can't add that to
-4::Int. So you can't coerce a (Code Q Age) to a (Code Q Int). -}
-
--- Code constructor
-#if __GLASGOW_HASKELL__ >= 909
-type Code :: (Kind.Type -> Kind.Type) -> forall r. TYPE r -> Kind.Type
- -- See Note [Foralls to the right in Code]
-#else
-type Code :: (Kind.Type -> Kind.Type) -> TYPE r -> Kind.Type
-#endif
-type role Code representational nominal -- See Note [Role of TExp]
-newtype Code m a = Code
- { examineCode :: m (TExp a) -- ^ Underlying monadic value
- }
--- ^ Represents an expression which has type @a@, built in monadic context @m@. Built on top of 'TExp', typed
--- expressions allow for type-safe splicing via:
---
--- - typed quotes, written as @[|| ... ||]@ where @...@ is an expression; if
--- that expression has type @a@, then the quotation has type
--- @Quote m => Code m a@
---
--- - typed splices inside of typed quotes, written as @$$(...)@ where @...@
--- is an arbitrary expression of type @Quote m => Code m a@
---
--- Traditional expression quotes and splices let us construct ill-typed
--- expressions:
---
--- >>> fmap ppr $ runQ (unTypeCode [| True == $( [| "foo" |] ) |])
--- GHC.Internal.Types.True GHC.Internal.Classes.== "foo"
--- >>> GHC.Internal.Types.True GHC.Internal.Classes.== "foo"
--- <interactive> error:
--- • Couldn't match expected type ‘Bool’ with actual type ‘[Char]’
--- • In the second argument of ‘(==)’, namely ‘"foo"’
--- In the expression: True == "foo"
--- In an equation for ‘it’: it = True == "foo"
---
--- With typed expressions, the type error occurs when /constructing/ the
--- Template Haskell expression:
---
--- >>> fmap ppr $ runQ (unTypeCode [|| True == $$( [|| "foo" ||] ) ||])
--- <interactive> error:
--- • Couldn't match type ‘[Char]’ with ‘Bool’
--- Expected type: Code Q Bool
--- Actual type: Code Q [Char]
--- • In the Template Haskell quotation [|| "foo" ||]
--- In the expression: [|| "foo" ||]
--- In the Template Haskell splice $$([|| "foo" ||])
-
-
-{- Note [Foralls to the right in Code]
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Code has the following type signature:
- type Code :: (Kind.Type -> Kind.Type) -> forall r. TYPE r -> Kind.Type
-
-This allows us to write
- data T (f :: forall r . (TYPE r) -> Type) = MkT (f Int) (f Int#)
-
- tcodeq :: T (Code Q)
- tcodeq = MkT [||5||] [||5#||]
-
-If we used the slightly more straightforward signature
- type Code :: foral r. (Kind.Type -> Kind.Type) -> TYPE r -> Kind.Type
-
-then the example above would become ill-typed. (See #23592 for some discussion.)
--}
-
--- | Unsafely convert an untyped code representation into a typed code
--- representation.
-unsafeCodeCoerce :: forall (r :: RuntimeRep) (a :: TYPE r) m .
- Quote m => m Exp -> Code m a
-unsafeCodeCoerce m = Code (unsafeTExpCoerce m)
-
--- | Lift a monadic action producing code into the typed 'Code'
--- representation
-liftCode :: forall (r :: RuntimeRep) (a :: TYPE r) m . m (TExp a) -> Code m a
-liftCode = Code
-
--- | Extract the untyped representation from the typed representation
-unTypeCode :: forall (r :: RuntimeRep) (a :: TYPE r) m . Quote m
- => Code m a -> m Exp
-unTypeCode = unTypeQ . examineCode
-
--- | Modify the ambient monad used during code generation. For example, you
--- can use `hoistCode` to handle a state effect:
--- @
--- handleState :: Code (StateT Int Q) a -> Code Q a
--- handleState = hoistCode (flip runState 0)
--- @
-hoistCode :: forall m n (r :: RuntimeRep) (a :: TYPE r) . Monad m
- => (forall x . m x -> n x) -> Code m a -> Code n a
-hoistCode f (Code a) = Code (f a)
-
-
--- | Variant of '(>>=)' which allows effectful computations to be injected
--- into code generation.
-bindCode :: forall m a (r :: RuntimeRep) (b :: TYPE r) . Monad m
- => m a -> (a -> Code m b) -> Code m b
-bindCode q k = liftCode (q >>= examineCode . k)
-
--- | Variant of '(>>)' which allows effectful computations to be injected
--- into code generation.
-bindCode_ :: forall m a (r :: RuntimeRep) (b :: TYPE r) . Monad m
- => m a -> Code m b -> Code m b
-bindCode_ q c = liftCode ( q >> examineCode c)
-
--- | A useful combinator for embedding monadic actions into 'Code'
--- @
--- myCode :: ... => Code m a
--- myCode = joinCode $ do
--- x <- someSideEffect
--- return (makeCodeWith x)
--- @
-joinCode :: forall m (r :: RuntimeRep) (a :: TYPE r) . Monad m
- => m (Code m a) -> Code m a
-joinCode = flip bindCode id
-
-----------------------------------------------------
--- Packaged versions for the programmer, hiding the Quasi-ness
-
-
--- | Report an error (True) or warning (False),
--- but carry on; use 'fail' to stop.
-report :: Bool -> String -> Q ()
-report b s = Q (qReport b s)
-{-# DEPRECATED report "Use reportError or reportWarning instead" #-} -- deprecated in 7.6
-
--- | Report an error to the user, but allow the current splice's computation to carry on. To abort the computation, use 'fail'.
-reportError :: String -> Q ()
-reportError = report True
-
--- | Report a warning to the user, and carry on.
-reportWarning :: String -> Q ()
-reportWarning = report False
-
--- | Recover from errors raised by 'reportError' or 'fail'.
-recover :: Q a -- ^ handler to invoke on failure
- -> Q a -- ^ computation to run
- -> Q a
-recover (Q r) (Q m) = Q (qRecover r m)
-
--- We don't export lookupName; the Bool isn't a great API
--- Instead we export lookupTypeName, lookupValueName
-lookupName :: Bool -> String -> Q (Maybe Name)
-lookupName ns s = Q (qLookupName ns s)
-
--- | Look up the given name in the (type namespace of the) current splice's scope. See "Language.Haskell.TH.Syntax#namelookup" for more details.
-lookupTypeName :: String -> Q (Maybe Name)
-lookupTypeName s = Q (qLookupName True s)
-
--- | Look up the given name in the (value namespace of the) current splice's scope. See "Language.Haskell.TH.Syntax#namelookup" for more details.
-lookupValueName :: String -> Q (Maybe Name)
-lookupValueName s = Q (qLookupName False s)
-
-{-
-Note [Name lookup]
-~~~~~~~~~~~~~~~~~~
--}
-{- $namelookup #namelookup#
-The functions 'lookupTypeName' and 'lookupValueName' provide
-a way to query the current splice's context for what names
-are in scope. The function 'lookupTypeName' queries the type
-namespace, whereas 'lookupValueName' queries the value namespace,
-but the functions are otherwise identical.
-
-A call @lookupValueName s@ will check if there is a value
-with name @s@ in scope at the current splice's location. If
-there is, the @Name@ of this value is returned;
-if not, then @Nothing@ is returned.
-
-The returned name cannot be \"captured\".
-For example:
-
-> f = "global"
-> g = $( do
-> Just nm <- lookupValueName "f"
-> [| let f = "local" in $( varE nm ) |]
-
-In this case, @g = \"global\"@; the call to @lookupValueName@
-returned the global @f@, and this name was /not/ captured by
-the local definition of @f@.
-
-The lookup is performed in the context of the /top-level/ splice
-being run. For example:
-
-> f = "global"
-> g = $( [| let f = "local" in
-> $(do
-> Just nm <- lookupValueName "f"
-> varE nm
-> ) |] )
-
-Again in this example, @g = \"global\"@, because the call to
-@lookupValueName@ queries the context of the outer-most @$(...)@.
-
-Operators should be queried without any surrounding parentheses, like so:
-
-> lookupValueName "+"
-
-Qualified names are also supported, like so:
-
-> lookupValueName "Prelude.+"
-> lookupValueName "Prelude.map"
-
--}
-
-
-{- | 'reify' looks up information about the 'Name'. It will fail with
-a compile error if the 'Name' is not visible. A 'Name' is visible if it is
-imported or defined in a prior top-level declaration group. See the
-documentation for 'newDeclarationGroup' for more details.
-
-It is sometimes useful to construct the argument name using 'lookupTypeName' or 'lookupValueName'
-to ensure that we are reifying from the right namespace. For instance, in this context:
-
-> data D = D
-
-which @D@ does @reify (mkName \"D\")@ return information about? (Answer: @D@-the-type, but don't rely on it.)
-To ensure we get information about @D@-the-value, use 'lookupValueName':
-
-> do
-> Just nm <- lookupValueName "D"
-> reify nm
-
-and to get information about @D@-the-type, use 'lookupTypeName'.
--}
-reify :: Name -> Q Info
-reify v = Q (qReify v)
-
-{- | @reifyFixity nm@ attempts to find a fixity declaration for @nm@. For
-example, if the function @foo@ has the fixity declaration @infixr 7 foo@, then
-@reifyFixity 'foo@ would return @'Just' ('Fixity' 7 'InfixR')@. If the function
-@bar@ does not have a fixity declaration, then @reifyFixity 'bar@ returns
-'Nothing', so you may assume @bar@ has 'defaultFixity'.
--}
-reifyFixity :: Name -> Q (Maybe Fixity)
-reifyFixity nm = Q (qReifyFixity nm)
-
-{- | @reifyType nm@ attempts to find the type or kind of @nm@. For example,
-@reifyType 'not@ returns @Bool -> Bool@, and
-@reifyType ''Bool@ returns @Type@.
-This works even if there's no explicit signature and the type or kind is inferred.
--}
-reifyType :: Name -> Q Type
-reifyType nm = Q (qReifyType nm)
-
-{- | Template Haskell is capable of reifying information about types and
-terms defined in previous declaration groups. Top-level declaration splices break up
-declaration groups.
-
-For an example, consider this code block. We define a datatype @X@ and
-then try to call 'reify' on the datatype.
-
-@
-module Check where
-
-data X = X
- deriving Eq
-
-$(do
- info <- reify ''X
- runIO $ print info
- )
-@
-
-This code fails to compile, noting that @X@ is not available for reification at the site of 'reify'. We can fix this by creating a new declaration group using an empty top-level splice:
-
-@
-data X = X
- deriving Eq
-
-$(pure [])
-
-$(do
- info <- reify ''X
- runIO $ print info
- )
-@
-
-We provide 'newDeclarationGroup' as a means of documenting this behavior
-and providing a name for the pattern.
-
-Since top level splices infer the presence of the @$( ... )@ brackets, we can also write:
-
-@
-data X = X
- deriving Eq
-
-newDeclarationGroup
-
-$(do
- info <- reify ''X
- runIO $ print info
- )
-@
-
--}
-newDeclarationGroup :: Q [Dec]
-newDeclarationGroup = pure []
-
-{- | @reifyInstances nm tys@ returns a list of all visible instances (see below for "visible")
-of @nm tys@. That is,
-if @nm@ is the name of a type class, then all instances of this class at the types @tys@
-are returned. Alternatively, if @nm@ is the name of a data family or type family,
-all instances of this family at the types @tys@ are returned.
-
-Note that this is a \"shallow\" test; the declarations returned merely have
-instance heads which unify with @nm tys@, they need not actually be satisfiable.
-
- - @reifyInstances ''Eq [ 'TupleT' 2 \``AppT`\` 'ConT' ''A \``AppT`\` 'ConT' ''B ]@ contains
- the @instance (Eq a, Eq b) => Eq (a, b)@ regardless of whether @A@ and
- @B@ themselves implement 'Eq'
-
- - @reifyInstances ''Show [ 'VarT' ('mkName' "a") ]@ produces every available
- instance of 'Show'
-
-There is one edge case: @reifyInstances ''Typeable tys@ currently always
-produces an empty list (no matter what @tys@ are given).
-
-In principle, the *visible* instances are
-* all instances defined in a prior top-level declaration group
- (see docs on @newDeclarationGroup@), or
-* all instances defined in any module transitively imported by the
- module being compiled
-
-However, actually searching all modules transitively below the one being
-compiled is unreasonably expensive, so @reifyInstances@ will report only the
-instance for modules that GHC has had some cause to visit during this
-compilation. This is a shortcoming: @reifyInstances@ might fail to report
-instances for a type that is otherwise unusued, or instances defined in a
-different component. You can work around this shortcoming by explicitly importing the modules
-whose instances you want to be visible. GHC issue <https://gitlab.haskell.org/ghc/ghc/-/issues/20529#note_388980 #20529>
-has some discussion around this.
-
--}
-reifyInstances :: Name -> [Type] -> Q [InstanceDec]
-reifyInstances cls tys = Q (qReifyInstances cls tys)
-
-{- | @reifyRoles nm@ returns the list of roles associated with the parameters
-(both visible and invisible) of
-the tycon @nm@. Fails if @nm@ cannot be found or is not a tycon.
-The returned list should never contain 'InferR'.
-
-An invisible parameter to a tycon is often a kind parameter. For example, if
-we have
-
-@
-type Proxy :: forall k. k -> Type
-data Proxy a = MkProxy
-@
-
-and @reifyRoles Proxy@, we will get @['NominalR', 'PhantomR']@. The 'NominalR' is
-the role of the invisible @k@ parameter. Kind parameters are always nominal.
--}
-reifyRoles :: Name -> Q [Role]
-reifyRoles nm = Q (qReifyRoles nm)
-
--- | @reifyAnnotations target@ returns the list of annotations
--- associated with @target@. Only the annotations that are
--- appropriately typed is returned. So if you have @Int@ and @String@
--- annotations for the same target, you have to call this function twice.
-reifyAnnotations :: Data a => AnnLookup -> Q [a]
-reifyAnnotations an = Q (qReifyAnnotations an)
-
--- | @reifyModule mod@ looks up information about module @mod@. To
--- look up the current module, call this function with the return
--- value of 'Language.Haskell.TH.Lib.thisModule'.
-reifyModule :: Module -> Q ModuleInfo
-reifyModule m = Q (qReifyModule m)
-
--- | @reifyConStrictness nm@ looks up the strictness information for the fields
--- of the constructor with the name @nm@. Note that the strictness information
--- that 'reifyConStrictness' returns may not correspond to what is written in
--- the source code. For example, in the following data declaration:
---
--- @
--- data Pair a = Pair a a
--- @
---
--- 'reifyConStrictness' would return @['DecidedLazy', DecidedLazy]@ under most
--- circumstances, but it would return @['DecidedStrict', DecidedStrict]@ if the
--- @-XStrictData@ language extension was enabled.
-reifyConStrictness :: Name -> Q [DecidedStrictness]
-reifyConStrictness n = Q (qReifyConStrictness n)
-
--- | Is the list of instances returned by 'reifyInstances' nonempty?
---
--- If you're confused by an instance not being visible despite being
--- defined in the same module and above the splice in question, see the
--- docs for 'newDeclarationGroup' for a possible explanation.
-isInstance :: Name -> [Type] -> Q Bool
-isInstance nm tys = do { decs <- reifyInstances nm tys
- ; return (not (null decs)) }
-
--- | The location at which this computation is spliced.
-location :: Q Loc
-location = Q qLocation
-
--- |The 'runIO' function lets you run an I\/O computation in the 'Q' monad.
--- Take care: you are guaranteed the ordering of calls to 'runIO' within
--- a single 'Q' computation, but not about the order in which splices are run.
---
--- Note: for various murky reasons, stdout and stderr handles are not
--- necessarily flushed when the compiler finishes running, so you should
--- flush them yourself.
-runIO :: IO a -> Q a
-runIO m = Q (qRunIO m)
-
--- | Get the package root for the current package which is being compiled.
--- This can be set explicitly with the -package-root flag but is normally
--- just the current working directory.
---
--- The motivation for this flag is to provide a principled means to remove the
--- assumption from splices that they will be executed in the directory where the
--- cabal file resides. Projects such as haskell-language-server can't and don't
--- change directory when compiling files but instead set the -package-root flag
--- appropriately.
-getPackageRoot :: Q FilePath
-getPackageRoot = Q qGetPackageRoot
-
-
-
--- | Record external files that runIO is using (dependent upon).
--- The compiler can then recognize that it should re-compile the Haskell file
--- when an external file changes.
---
--- Expects an absolute file path.
---
--- Notes:
---
--- * ghc -M does not know about these dependencies - it does not execute TH.
---
--- * The dependency is based on file content, not a modification time
-addDependentFile :: FilePath -> Q ()
-addDependentFile fp = Q (qAddDependentFile fp)
-
--- | Obtain a temporary file path with the given suffix. The compiler will
--- delete this file after compilation.
-addTempFile :: String -> Q FilePath
-addTempFile suffix = Q (qAddTempFile suffix)
-
--- | Add additional top-level declarations. The added declarations will be type
--- checked along with the current declaration group.
-addTopDecls :: [Dec] -> Q ()
-addTopDecls ds = Q (qAddTopDecls ds)
-
-
--- | Emit a foreign file which will be compiled and linked to the object for
--- the current module. Currently only languages that can be compiled with
--- the C compiler are supported, and the flags passed as part of -optc will
--- be also applied to the C compiler invocation that will compile them.
---
--- Note that for non-C languages (for example C++) @extern "C"@ directives
--- must be used to get symbols that we can access from Haskell.
---
--- To get better errors, it is recommended to use #line pragmas when
--- emitting C files, e.g.
---
--- > {-# LANGUAGE CPP #-}
--- > ...
--- > addForeignSource LangC $ unlines
--- > [ "#line " ++ show (__LINE__ + 1) ++ " " ++ show __FILE__
--- > , ...
--- > ]
-addForeignSource :: ForeignSrcLang -> String -> Q ()
-addForeignSource lang src = do
- let suffix = case lang of
- LangC -> "c"
- LangCxx -> "cpp"
- LangObjc -> "m"
- LangObjcxx -> "mm"
- LangAsm -> "s"
- LangJs -> "js"
- RawObject -> "a"
- path <- addTempFile suffix
- runIO $ writeFile path src
- addForeignFilePath lang path
-
--- | Same as 'addForeignSource', but expects to receive a path pointing to the
--- foreign file instead of a 'String' of its contents. Consider using this in
--- conjunction with 'addTempFile'.
---
--- This is a good alternative to 'addForeignSource' when you are trying to
--- directly link in an object file.
-addForeignFilePath :: ForeignSrcLang -> FilePath -> Q ()
-addForeignFilePath lang fp = Q (qAddForeignFilePath lang fp)
-
--- | Add a finalizer that will run in the Q monad after the current module has
--- been type checked. This only makes sense when run within a top-level splice.
---
--- The finalizer is given the local type environment at the splice point. Thus
--- 'reify' is able to find the local definitions when executed inside the
--- finalizer.
-addModFinalizer :: Q () -> Q ()
-addModFinalizer act = Q (qAddModFinalizer (unQ act))
-
--- | Adds a core plugin to the compilation pipeline.
---
--- @addCorePlugin m@ has almost the same effect as passing @-fplugin=m@ to ghc
--- in the command line. The major difference is that the plugin module @m@
--- must not belong to the current package. When TH executes, it is too late
--- to tell the compiler that we needed to compile first a plugin module in the
--- current package.
-addCorePlugin :: String -> Q ()
-addCorePlugin plugin = Q (qAddCorePlugin plugin)
-
--- | Get state from the 'Q' monad. Note that the state is local to the
--- Haskell module in which the Template Haskell expression is executed.
-getQ :: Typeable a => Q (Maybe a)
-getQ = Q qGetQ
-
--- | Replace the state in the 'Q' monad. Note that the state is local to the
--- Haskell module in which the Template Haskell expression is executed.
-putQ :: Typeable a => a -> Q ()
-putQ x = Q (qPutQ x)
-
--- | Determine whether the given language extension is enabled in the 'Q' monad.
-isExtEnabled :: Extension -> Q Bool
-isExtEnabled ext = Q (qIsExtEnabled ext)
-
--- | List all enabled language extensions.
-extsEnabled :: Q [Extension]
-extsEnabled = Q qExtsEnabled
-
--- | Add Haddock documentation to the specified location. This will overwrite
--- any documentation at the location if it already exists. This will reify the
--- specified name, so it must be in scope when you call it. If you want to add
--- documentation to something that you are currently splicing, you can use
--- 'addModFinalizer' e.g.
---
--- > do
--- > let nm = mkName "x"
--- > addModFinalizer $ putDoc (DeclDoc nm) "Hello"
--- > [d| $(varP nm) = 42 |]
---
--- The helper functions 'withDecDoc' and 'withDecsDoc' will do this for you, as
--- will the 'funD_doc' and other @_doc@ combinators.
--- You most likely want to have the @-haddock@ flag turned on when using this.
--- Adding documentation to anything outside of the current module will cause an
--- error.
-putDoc :: DocLoc -> String -> Q ()
-putDoc t s = Q (qPutDoc t s)
-
--- | Retrieves the Haddock documentation at the specified location, if one
--- exists.
--- It can be used to read documentation on things defined outside of the current
--- module, provided that those modules were compiled with the @-haddock@ flag.
-getDoc :: DocLoc -> Q (Maybe String)
-getDoc n = Q (qGetDoc n)
-
-instance MonadIO Q where
- liftIO = runIO
-
-instance Quasi Q where
- qNewName = newName
- qReport = report
- qRecover = recover
- qReify = reify
- qReifyFixity = reifyFixity
- qReifyType = reifyType
- qReifyInstances = reifyInstances
- qReifyRoles = reifyRoles
- qReifyAnnotations = reifyAnnotations
- qReifyModule = reifyModule
- qReifyConStrictness = reifyConStrictness
- qLookupName = lookupName
- qLocation = location
- qGetPackageRoot = getPackageRoot
- qAddDependentFile = addDependentFile
- qAddTempFile = addTempFile
- qAddTopDecls = addTopDecls
- qAddForeignFilePath = addForeignFilePath
- qAddModFinalizer = addModFinalizer
- qAddCorePlugin = addCorePlugin
- qGetQ = getQ
- qPutQ = putQ
- qIsExtEnabled = isExtEnabled
- qExtsEnabled = extsEnabled
- qPutDoc = putDoc
- qGetDoc = getDoc
-
-
-----------------------------------------------------
--- The following operations are used solely in GHC.HsToCore.Quote when
--- desugaring brackets. They are not necessary for the user, who can use
--- ordinary return and (>>=) etc
-
--- | This function is only used in 'GHC.HsToCore.Quote' when desugaring
--- brackets. This is not necessary for the user, who can use the ordinary
--- 'return' and '(>>=)' operations.
-sequenceQ :: forall m . Monad m => forall a . [m a] -> m [a]
-sequenceQ = sequence
-
oneName, manyName :: Name
-- | Synonym for @''GHC.Internal.Types.One'@, from @ghc-internal@.
oneName = mkNameG DataName "ghc-internal" "GHC.Internal.Types" "One"
@@ -1004,19 +72,19 @@ manyName = mkNameG DataName "ghc-internal" "GHC.Internal.Types" "Many"
-- | The name of a module.
newtype ModName = ModName String -- Module name
- deriving (Show,Eq,Ord,Data,Generic)
+ deriving (Show,Eq,Ord,Generic)
-- | The name of a package.
newtype PkgName = PkgName String -- package name
- deriving (Show,Eq,Ord,Data,Generic)
+ deriving (Show,Eq,Ord,Generic)
-- | Obtained from 'reifyModule' and 'Language.Haskell.TH.Lib.thisModule'.
data Module = Module PkgName ModName -- package qualified module name
- deriving (Show,Eq,Ord,Data,Generic)
+ deriving (Show,Eq,Ord,Generic)
-- | An "Occurence Name".
newtype OccName = OccName String
- deriving (Show,Eq,Ord,Data,Generic)
+ deriving (Show,Eq,Ord,Generic)
-- | Smart constructor for 'ModName'
mkModName :: String -> ModName
@@ -1132,7 +200,7 @@ Names constructed using @newName@ and @mkName@ may be used in bindings
(such as @let x = ...@ or @\x -> ...@), but names constructed using
@lookupValueName@, @lookupTypeName@, @'f@, @''T@ may not.
-}
-data Name = Name OccName NameFlavour deriving (Data, Eq, Generic)
+data Name = Name OccName NameFlavour deriving (Eq, Generic)
instance Ord Name where
-- check if unique is different before looking at strings
@@ -1148,7 +216,7 @@ data NameFlavour
-- An original name (occurrences only, not binders)
-- Need the namespace too to be sure which
-- thing we are naming
- deriving ( Data, Eq, Ord, Show, Generic )
+ deriving ( Eq, Ord, Show, Generic )
data NameSpace = VarName -- ^ Variables
| DataName -- ^ Data constructors
@@ -1162,7 +230,7 @@ data NameSpace = VarName -- ^ Variables
-- of the datatype (regardless of whether this constructor has this field).
-- - For a field of a pattern synonym, this is the name of the pattern synonym.
}
- deriving( Eq, Ord, Show, Data, Generic )
+ deriving( Eq, Ord, Show, Generic )
-- | @Uniq@ is used by GHC to distinguish names from each other.
type Uniq = Integer
@@ -1464,7 +532,7 @@ data Loc
, loc_module :: String
, loc_start :: CharPos
, loc_end :: CharPos }
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
type CharPos = (Int, Int) -- ^ Line and character position
@@ -1547,13 +615,13 @@ data Info
| TyVarI -- Scoped type variable
Name
Type -- What it is bound to
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | Obtained from 'reifyModule' in the 'Q' Monad.
data ModuleInfo =
-- | Contains the import list of the module.
ModuleInfo [Module]
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
{- |
In 'ClassOpI' and 'DataConI', name of the parent class or type
@@ -1591,11 +659,11 @@ type InstanceDec = Dec
-- | Fixity, as specified in a @infix[lr] n@ declaration.
data Fixity = Fixity Int FixityDirection
- deriving( Eq, Ord, Show, Data, Generic )
+ deriving( Eq, Ord, Show, Generic )
-- | The associativity of an operator, as in an @infix@ declaration.
data FixityDirection = InfixL | InfixR | InfixN
- deriving( Eq, Ord, Show, Data, Generic )
+ deriving( Eq, Ord, Show, Generic )
-- | Highest allowed operator precedence for 'Fixity' constructor (answer: 9)
maxPrecedence :: Int
@@ -1628,7 +696,7 @@ data Lit = CharL Char -- ^ @\'c\'@
| StringPrimL [Word8] -- ^ @"string"#@. A primitive C-style string, type 'Addr#'
| BytesPrimL Bytes -- ^ Some raw bytes, type 'Addr#':
| CharPrimL Char -- ^ @\'c\'#@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- We could add Int, Float, Double etc, as we do in HsLit,
-- but that could complicate the
@@ -1650,7 +718,7 @@ data Bytes = Bytes
-- , bytesInitialized :: Bool -- ^ False: only use `bytesSize` to allocate
-- -- an uninitialized region
}
- deriving (Data,Generic)
+ deriving (Generic)
-- We can't derive Show instance for Bytes because we don't want to show the
-- pointer value but the actual bytes (similarly to what ByteString does). See
@@ -1717,14 +785,14 @@ data Pat
| TypeP Type -- ^ @{ type p }@
| InvisP Type -- ^ @{ @p }@
| OrP (NonEmpty Pat) -- ^ @{ p1; p2 }@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A (field name, pattern) pair. See 'RecP'.
type FieldPat = (Name,Pat)
-- | A @case@-alternative
data Match = Match Pat Body [Dec] -- ^ @case e of { pat -> body where decs }@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A clause consists of patterns, guards, a body expression, and a list of
-- declarations under a @where@. Clauses are seen in equations for function
@@ -1732,7 +800,7 @@ data Match = Match Pat Body [Dec] -- ^ @case e of { pat -> body where decs }@
-- etc.
data Clause = Clause [Pat] Body [Dec]
-- ^ @f { p1 p2 = body where decs }@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A Haskell expression.
data Exp
@@ -1827,7 +895,7 @@ data Exp
| ForallE [TyVarBndr Specificity] Exp -- ^ @forall \<vars\>. \<expr\>@
| ForallVisE [TyVarBndr ()] Exp -- ^ @forall \<vars\> -> \<expr\>@
| ConstrainedE [Exp] Exp -- ^ @\<ctxt\> => \<expr\>@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A (field name, expression) pair. See 'RecConE' and 'RecUpdE'.
type FieldExp = (Name,Exp)
@@ -1841,13 +909,13 @@ data Body
-- | e3 = e4 }
-- where ds@
| NormalB Exp -- ^ @f p { = e } where ds@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A single guard.
data Guard
= NormalG Exp -- ^ @f x { | odd x } = x@
| PatG [Stmt] -- ^ @f x { | Just y <- x, Just z <- y } = z@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A single statement, as in @do@-notation.
data Stmt
@@ -1856,14 +924,14 @@ data Stmt
| NoBindS Exp -- ^ @e@
| ParS [[Stmt]] -- ^ @x <- e1 | s2, s3 | s4@ (in 'CompE')
| RecS [Stmt] -- ^ @rec { s1; s2 }@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A list/enum range expression.
data Range = FromR Exp -- ^ @[n ..]@
| FromThenR Exp Exp -- ^ @[n, m ..]@
| FromToR Exp Exp -- ^ @[n .. m]@
| FromThenToR Exp Exp Exp -- ^ @[n, m .. k]@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A single declaration.
data Dec
@@ -1950,7 +1018,7 @@ data Dec
--
-- Implicit parameter binding declaration. Can only be used in let
-- and where clauses which consist entirely of implicit bindings.
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A way to specify a namespace to look in when GHC needs to find
-- a name's source
@@ -1962,7 +1030,7 @@ data NamespaceSpecifier
-- or type variable
| DataNamespaceSpecifier -- ^ Name should be a term-level entity, such as a
-- function, data constructor, or pattern synonym
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | Varieties of allowed instance overlap.
data Overlap = Overlappable -- ^ May be overlapped by more specific instances
@@ -1971,12 +1039,12 @@ data Overlap = Overlappable -- ^ May be overlapped by more specific instances
| Incoherent -- ^ Both 'Overlapping' and 'Overlappable', and
-- pick an arbitrary one if multiple choices are
-- available.
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A single @deriving@ clause at the end of a datatype declaration.
data DerivClause = DerivClause (Maybe DerivStrategy) Cxt
-- ^ @{ deriving stock (Eq, Ord) }@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | What the user explicitly requests when deriving an instance with
-- @-XDerivingStrategies@.
@@ -1984,7 +1052,7 @@ data DerivStrategy = StockStrategy -- ^ @deriving {stock} C@
| AnyclassStrategy -- ^ @deriving {anyclass} C@, @-XDeriveAnyClass@
| NewtypeStrategy -- ^ @deriving {newtype} C@, @-XGeneralizedNewtypeDeriving@
| ViaStrategy Type -- ^ @deriving C {via T}@, @-XDerivingVia@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A pattern synonym's type. Note that a pattern synonym's /fully/
-- specified type has a peculiar shape coming with two forall
@@ -2040,7 +1108,7 @@ type PatSynType = Type
-- between @type family@ and @where@.
data TypeFamilyHead =
TypeFamilyHead Name [TyVarBndr BndrVis] FamilyResultSig (Maybe InjectivityAnn)
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | One equation of a type family instance or closed type family. The
-- arguments are the left-hand-side type and the right-hand-side result.
@@ -2060,28 +1128,28 @@ data TypeFamilyHead =
-- ('VarT' a)
-- @
data TySynEqn = TySynEqn (Maybe [TyVarBndr ()]) Type Type
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | [Functional dependency](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/functio…
-- syntax, as in a class declaration.
data FunDep = FunDep [Name] [Name] -- ^ @class C a b {| a -> b}@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A @foreign@ declaration.
data Foreign = ImportF Callconv Safety String Name Type
-- ^ @foreign import callconv safety "foreign_name" haskellName :: type@
| ExportF Callconv String Name Type
-- ^ @foreign export callconv "foreign_name" haskellName :: type@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- keep Callconv in sync with module ForeignCall in ghc/compiler/GHC/Types/ForeignCall.hs
-- | A calling convention identifier, as in a 'Foreign' declaration.
data Callconv = CCall | StdCall | CApi | Prim | JavaScript
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A safety level, as in a 'Foreign' declaration.
data Safety = Unsafe | Safe | Interruptible
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
data Pragma = InlineP Name Inline RuleMatch Phases
-- ^ @{ {\-\# [inline] [rule match] [phases] [phases] name #-} }@. See
@@ -2106,7 +1174,7 @@ data Pragma = InlineP Name Inline RuleMatch Phases
-- ^ @{ {\-\# COMPLETE C_1, ..., C_i [ :: T ] \#-} }@
| SCCP Name (Maybe String)
-- ^ @{ {\-\# SCC fun "optional_name" \#-} }@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | An inline pragma.
data Inline = NoInline
@@ -2115,7 +1183,7 @@ data Inline = NoInline
-- ^ @{ {\-\# INLINE ... #-} }@
| Inlinable
-- ^ @{ {\-\# INLINABLE ... #-} }@
- deriving (Show, Eq, Ord, Data, Generic)
+ deriving (Show, Eq, Ord, Generic)
-- | A @CONLIKE@ modifier, as in one of the various inline pragmas, or lack
-- thereof ('FunLike').
@@ -2123,7 +1191,7 @@ data RuleMatch = ConLike
-- ^ @{ {\-\# CONLIKE [inline] ... #-} }@
| FunLike
-- ^ @{ {\-\# [inline] ... #-} }@
- deriving (Show, Eq, Ord, Data, Generic)
+ deriving (Show, Eq, Ord, Generic)
-- | Phase control syntax.
data Phases = AllPhases
@@ -2132,14 +1200,14 @@ data Phases = AllPhases
-- ^ @[n]@
| BeforePhase Int
-- ^ @[~n]@
- deriving (Show, Eq, Ord, Data, Generic)
+ deriving (Show, Eq, Ord, Generic)
-- | A binder found in the @forall@ of a @RULES@ pragma.
data RuleBndr = RuleVar Name
-- ^ @forall {a} ... .@
| TypedRuleVar Name Type
-- ^ @forall {(a :: t)} ... .@
- deriving (Show, Eq, Ord, Data, Generic)
+ deriving (Show, Eq, Ord, Generic)
-- | The target of an @ANN@ pragma
data AnnTarget = ModuleAnnotation
@@ -2148,7 +1216,7 @@ data AnnTarget = ModuleAnnotation
-- ^ @{\-\# ANN type {name} ... #-}@
| ValueAnnotation Name
-- ^ @{\-\# ANN {name} ... #-}@
- deriving (Show, Eq, Ord, Data, Generic)
+ deriving (Show, Eq, Ord, Generic)
-- | A context, as found on the left side of a @=>@ in a type.
type Cxt = [Pred] -- ^ @(Eq a, Ord b)@
@@ -2166,7 +1234,7 @@ data SourceUnpackedness
= NoSourceUnpackedness -- ^ @C a@
| SourceNoUnpack -- ^ @C { {\-\# NOUNPACK \#-\} } a@
| SourceUnpack -- ^ @C { {\-\# UNPACK \#-\} } a@
- deriving (Show, Eq, Ord, Data, Generic)
+ deriving (Show, Eq, Ord, Generic)
-- | 'SourceStrictness' corresponds to strictness annotations found in the source code.
--
@@ -2175,7 +1243,7 @@ data SourceUnpackedness
data SourceStrictness = NoSourceStrictness -- ^ @C a@
| SourceLazy -- ^ @C {~}a@
| SourceStrict -- ^ @C {!}a@
- deriving (Show, Eq, Ord, Data, Generic)
+ deriving (Show, Eq, Ord, Generic)
-- | Unlike 'SourceStrictness' and 'SourceUnpackedness', 'DecidedStrictness'
-- refers to the strictness annotations that the compiler chooses for a data constructor
@@ -2188,7 +1256,7 @@ data SourceStrictness = NoSourceStrictness -- ^ @C a@
data DecidedStrictness = DecidedLazy -- ^ Field inferred to not have a bang.
| DecidedStrict -- ^ Field inferred to have a bang.
| DecidedUnpack -- ^ Field inferred to be unpacked.
- deriving (Show, Eq, Ord, Data, Generic)
+ deriving (Show, Eq, Ord, Generic)
-- | A data constructor.
--
@@ -2253,7 +1321,7 @@ data Con =
-- Invariant: the list must be non-empty.
[VarBangType] -- ^ The constructor arguments
Type -- ^ See Note [GADT return type]
- deriving (Show, Eq, Ord, Data, Generic)
+ deriving (Show, Eq, Ord, Generic)
-- Note [GADT return type]
-- ~~~~~~~~~~~~~~~~~~~~~~~
@@ -2285,7 +1353,7 @@ data Con =
-- | Strictness information in a data constructor's argument.
data Bang = Bang SourceUnpackedness SourceStrictness
-- ^ @C { {\-\# UNPACK \#-\} !}a@
- deriving (Show, Eq, Ord, Data, Generic)
+ deriving (Show, Eq, Ord, Generic)
-- | A type with a strictness annotation, as in data constructors. See 'Con'.
type BangType = (Bang, Type)
@@ -2309,14 +1377,14 @@ data PatSynDir
= Unidir -- ^ @pattern P x {<-} p@
| ImplBidir -- ^ @pattern P x {=} p@
| ExplBidir [Clause] -- ^ @pattern P x {<-} p where P x = e@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A pattern synonym's argument type.
data PatSynArgs
= PrefixPatSyn [Name] -- ^ @pattern P {x y z} = p@
| InfixPatSyn Name Name -- ^ @pattern {x P y} = p@
| RecordPatSyn [Name] -- ^ @pattern P { {x,y,z} } = p@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | A Haskell type.
data Type = ForallT [TyVarBndr Specificity] Cxt Type -- ^ @forall \<vars\>. \<ctxt\> => \<type\>@
@@ -2355,12 +1423,12 @@ data Type = ForallT [TyVarBndr Specificity] Cxt Type -- ^ @forall \<vars\>. \<ct
| LitT TyLit -- ^ @0@, @1@, @2@, etc.
| WildCardT -- ^ @_@
| ImplicitParamT String Type -- ^ @?x :: t@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | The specificity of a type variable in a @forall ...@.
data Specificity = SpecifiedSpec -- ^ @a@
| InferredSpec -- ^ @{a}@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | The @flag@ type parameter is instantiated to one of the following types:
--
@@ -2370,40 +1438,40 @@ data Specificity = SpecifiedSpec -- ^ @a@
--
data TyVarBndr flag = PlainTV Name flag -- ^ @a@
| KindedTV Name flag Kind -- ^ @(a :: k)@
- deriving( Show, Eq, Ord, Data, Generic, Functor, Foldable, Traversable )
+ deriving( Show, Eq, Ord, Generic, Functor, Foldable, Traversable )
-- | Visibility of a type variable. See [Inferred vs. specified type variables](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/type_app….
data BndrVis = BndrReq -- ^ @a@
| BndrInvis -- ^ @\@a@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | Type family result signature
data FamilyResultSig = NoSig -- ^ no signature
| KindSig Kind -- ^ @k@
| TyVarSig (TyVarBndr ()) -- ^ @= r, = (r :: k)@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | Injectivity annotation as in an [injective type family](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/type_famili…
data InjectivityAnn = InjectivityAnn Name [Name]
- deriving ( Show, Eq, Ord, Data, Generic )
+ deriving ( Show, Eq, Ord, Generic )
-- | Type-level literals.
data TyLit = NumTyLit Integer -- ^ @2@
| StrTyLit String -- ^ @\"Hello\"@
| CharTyLit Char -- ^ @\'C\'@, @since 4.16.0.0
- deriving ( Show, Eq, Ord, Data, Generic )
+ deriving ( Show, Eq, Ord, Generic )
-- | Role annotations
data Role = NominalR -- ^ @nominal@
| RepresentationalR -- ^ @representational@
| PhantomR -- ^ @phantom@
| InferR -- ^ @_@
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | Annotation target for reifyAnnotations
data AnnLookup = AnnLookupModule Module
| AnnLookupName Name
- deriving( Show, Eq, Ord, Data, Generic )
+ deriving( Show, Eq, Ord, Generic )
-- | To avoid duplication between kinds and types, they
-- are defined to be the same. Naturally, you would never
@@ -2454,7 +1522,7 @@ data DocLoc
| ArgDoc Name Int -- ^ At a specific argument of a function, indexed by its
-- position.
| InstDoc Type -- ^ At a class or family instance.
- deriving ( Show, Eq, Ord, Data, Generic )
+ deriving ( Show, Eq, Ord, Generic )
-----------------------------------------------------
-- Internal helper functions
=====================================
libraries/ghci/GHCi/Message.hs
=====================================
@@ -63,6 +63,7 @@ import Foreign
import GHC.Generics
import GHC.Stack.CCS
import qualified GHC.Boot.TH.Syntax as TH
+import qualified GHC.Boot.TH.Monad as TH
import System.Exit
import System.IO
import System.IO.Error
=====================================
libraries/ghci/GHCi/TH.hs
=====================================
@@ -114,6 +114,7 @@ import qualified Data.Map as M
import Data.Maybe
import GHC.Desugar (AnnotationWrapper(..))
import qualified GHC.Boot.TH.Syntax as TH
+import qualified GHC.Boot.TH.Monad as TH
import Unsafe.Coerce
-- | Create a new instance of 'QState'
=====================================
libraries/template-haskell/Language/Haskell/TH/Quote.hs
=====================================
@@ -22,7 +22,7 @@ module Language.Haskell.TH.Quote
, dataToQa, dataToExpQ, dataToPatQ
) where
-import GHC.Boot.TH.Syntax
+import GHC.Boot.TH.Monad
import GHC.Boot.TH.Quote
import Language.Haskell.TH.Syntax (dataToQa, dataToExpQ, dataToPatQ)
=====================================
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
=====================================
@@ -200,6 +200,7 @@ where
import GHC.Boot.TH.Lift
import GHC.Boot.TH.Syntax
+import GHC.Boot.TH.Monad
import System.FilePath
import Data.Data hiding (Fixity(..))
import Data.List.NonEmpty (NonEmpty(..))
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c2a0e9e2fafcff7744c0bf81b8d258…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c2a0e9e2fafcff7744c0bf81b8d258…
You're receiving this email because of your account on gitlab.haskell.org.
1
0

[Git][ghc/ghc][wip/26296] ci: Teach ci.sh to fetch FreeBSD artifacts from ghcup unofficial bindists and...
by Zubin (@wz1000) 18 Aug '25
by Zubin (@wz1000) 18 Aug '25
18 Aug '25
Zubin pushed to branch wip/26296 at Glasgow Haskell Compiler / GHC
Commits:
820927ef by Zubin Duggal at 2025-08-18T14:23:32+05:30
ci: Teach ci.sh to fetch FreeBSD artifacts from ghcup unofficial bindists and bootstrap compiler on FreeBSD to 9.10.1
Also refactor fetch_ghc logic in ci.sh, renaming the GHC_VERSION enviorment configuration variable to FETCH_GHC_VERSION,
making it clear that it is intended for use on platforms like Windows and FreeBSD where we don't want to use the GHC
excecutable from the platform environment and instead need to download and install GHC-$FETCH_GHC_VERSION from a release
bindist.
Fixes #26296
- - - - -
3 changed files:
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
Changes:
=====================================
.gitlab/ci.sh
=====================================
@@ -96,7 +96,9 @@ Environment variables determining bootstrap toolchain (Linux):
Environment variables determining bootstrap toolchain (non-Linux):
- GHC_VERSION Which GHC version to fetch for bootstrapping.
+ FETCH_GHC_VERSION Which GHC version to fetch for bootstrapping.
+ This should not be set if GHC is already provisioned, i.e. in the
+ docker image for linux platforms and via nix for darwin platforms
CABAL_INSTALL_VERSION
Cabal-install version to fetch for bootstrapping.
EOF
@@ -197,9 +199,6 @@ function set_toolchain_paths() {
CABAL="$toolchain/bin/cabal$exe"
HAPPY="$toolchain/bin/happy$exe"
ALEX="$toolchain/bin/alex$exe"
- if [ "$(uname)" = "FreeBSD" ]; then
- GHC=/usr/local/bin/ghc
- fi
;;
nix)
if [[ ! -f toolchain.sh ]]; then
@@ -275,29 +274,52 @@ function setup() {
}
function fetch_ghc() {
+ local should_fetch=false
+
if [ ! -e "$GHC" ]; then
- local v="$GHC_VERSION"
- if [[ -z "$v" ]]; then
- fail "neither GHC nor GHC_VERSION are not set"
+ if [ -z "${FETCH_GHC_VERSION:-}" ]; then
+ fail "GHC not found at '$GHC' and FETCH_GHC_VERSION is not set"
+ fi
+ should_fetch=true
+ fi
+
+ if [ -e "$GHC" ] && [ -n "${FETCH_GHC_VERSION:-}" ]; then
+ local current_version
+ if current_version=$($GHC --numeric-version 2>/dev/null); then
+ if [ "$current_version" != "$FETCH_GHC_VERSION" ]; then
+ info "GHC version mismatch: found $current_version, expected $FETCH_GHC_VERSION"
+ should_fetch=true
fi
+ fi
+ fi
+
+ if [ "$should_fetch" = true ]; then
+ local v="$FETCH_GHC_VERSION"
start_section fetch-ghc "Fetch GHC"
- url="https://downloads.haskell.org/~ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-${boot…"
+ case "$(uname)" in
+ FreeBSD)
+ url="https://downloads.haskell.org/ghcup/unofficial-bindists/ghc/${FETCH_GHC_VER…"
+ ;;
+ *)
+ url="https://downloads.haskell.org/~ghc/${FETCH_GHC_VERSION}/ghc-${FETCH_GHC_VER…"
+ ;;
+ esac
info "Fetching GHC binary distribution from $url..."
curl "$url" > ghc.tar.xz || fail "failed to fetch GHC binary distribution"
$TAR -xJf ghc.tar.xz || fail "failed to extract GHC binary distribution"
case "$(uname)" in
MSYS_*|MINGW*)
- cp -r ghc-${GHC_VERSION}*/* "$toolchain"
+ cp -r ghc-${FETCH_GHC_VERSION}*/* "$toolchain"
;;
*)
- pushd ghc-${GHC_VERSION}*
+ pushd ghc-${FETCH_GHC_VERSION}*
./configure --prefix="$toolchain"
"$MAKE" install
popd
;;
esac
- rm -Rf "ghc-${GHC_VERSION}" ghc.tar.xz
+ rm -Rf "ghc-${FETCH_GHC_VERSION}" ghc.tar.xz
end_section fetch-ghc
fi
=====================================
.gitlab/generate-ci/gen_ci.hs
=====================================
@@ -446,7 +446,7 @@ opsysVariables _ FreeBSD14 = mconcat
-- Prefer to use the system's clang-based toolchain and not gcc
, "CC" =: "cc"
, "CXX" =: "c++"
- , "GHC_VERSION" =: "9.6.4"
+ , "FETCH_GHC_VERSION" =: "9.10.1"
, "CABAL_INSTALL_VERSION" =: "3.10.3.0"
]
opsysVariables arch (Linux distro) = distroVariables arch distro
@@ -478,7 +478,7 @@ opsysVariables _ (Windows {}) = mconcat
, "LANG" =: "en_US.UTF-8"
, "CABAL_INSTALL_VERSION" =: "3.10.2.0"
, "HADRIAN_ARGS" =: "--docs=no-sphinx-pdfs"
- , "GHC_VERSION" =: "9.10.1"
+ , "FETCH_GHC_VERSION" =: "9.10.1"
]
opsysVariables _ _ = mempty
=====================================
.gitlab/jobs.yaml
=====================================
@@ -1467,7 +1467,7 @@
"CC": "cc",
"CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check",
"CXX": "c++",
- "GHC_VERSION": "9.6.4",
+ "FETCH_GHC_VERSION": "9.10.1",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-freebsd14-validate",
@@ -3698,7 +3698,7 @@
"BUILD_FLAVOUR": "validate",
"CABAL_INSTALL_VERSION": "3.10.2.0",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "GHC_VERSION": "9.10.1",
+ "FETCH_GHC_VERSION": "9.10.1",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
@@ -3761,7 +3761,7 @@
"BUILD_FLAVOUR": "validate",
"CABAL_INSTALL_VERSION": "3.10.2.0",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "GHC_VERSION": "9.10.1",
+ "FETCH_GHC_VERSION": "9.10.1",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
@@ -4355,7 +4355,7 @@
"CC": "cc",
"CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check",
"CXX": "c++",
- "GHC_VERSION": "9.6.4",
+ "FETCH_GHC_VERSION": "9.10.1",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
@@ -5579,7 +5579,7 @@
"BUILD_FLAVOUR": "release",
"CABAL_INSTALL_VERSION": "3.10.2.0",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "GHC_VERSION": "9.10.1",
+ "FETCH_GHC_VERSION": "9.10.1",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
@@ -5643,7 +5643,7 @@
"BUILD_FLAVOUR": "release",
"CABAL_INSTALL_VERSION": "3.10.2.0",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "GHC_VERSION": "9.10.1",
+ "FETCH_GHC_VERSION": "9.10.1",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
@@ -5782,7 +5782,7 @@
"CC": "cc",
"CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check",
"CXX": "c++",
- "GHC_VERSION": "9.6.4",
+ "FETCH_GHC_VERSION": "9.10.1",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-freebsd14-validate"
@@ -7982,7 +7982,7 @@
"BUILD_FLAVOUR": "validate",
"CABAL_INSTALL_VERSION": "3.10.2.0",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "GHC_VERSION": "9.10.1",
+ "FETCH_GHC_VERSION": "9.10.1",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
@@ -8044,7 +8044,7 @@
"BUILD_FLAVOUR": "validate",
"CABAL_INSTALL_VERSION": "3.10.2.0",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "GHC_VERSION": "9.10.1",
+ "FETCH_GHC_VERSION": "9.10.1",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/820927ef2686f5e9ff8c54fc5eddbcb…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/820927ef2686f5e9ff8c54fc5eddbcb…
You're receiving this email because of your account on gitlab.haskell.org.
1
0