[Git][ghc/ghc][wip/T24676] 30 commits: template-haskell: Move wired-ins to ghc-internal
Simon Peyton Jones (@simonpj)
gitlab at gitlab.haskell.org
Thu May 30 11:37:58 UTC 2024
Simon Peyton Jones pushed to branch wip/T24676 at Glasgow Haskell Compiler / GHC
Commits:
228dcae6 by Teo Camarasu at 2024-05-28T13:12:24+00:00
template-haskell: Move wired-ins to ghc-internal
Thus we make `template-haskell` reinstallable and keep it as the public
API for Template Haskell.
All of the wired-in identifiers are moved to `ghc-internal`.
This necessitates also moving much of `ghc-boot-th` into `ghc-internal`.
These modules are then re-exported from `ghc-boot-th` and
`template-haskell`.
To avoid a dependency on `template-haskell` from `lib:ghc`, we instead
depend on the TH ASTs via `ghc-boot-th`.
As `template-haskell` no longer has special status, we can drop the
logic adding an implicit dependency on `template-haskell` when using TH.
We can also drop the `template-haskell-next` package, which was
previously used when bootstrapping.
When bootstrapping, we need to vendor the TH AST modules from
`ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap`
cabal flag as before. See Note [Bootstrapping Template Haskell].
We split out a GHC.Internal.TH.Lift module resolving #24752.
This module is only built when not bootstrapping.
Resolves #24703
-------------------------
Metric Increase:
ghc_boot_th_dir
ghc_boot_th_so
-------------------------
- - - - -
62dded28 by Teo Camarasu at 2024-05-28T13:12:24+00:00
testsuite: mark tests broken by #24886
Now that `template-haskell` is no longer wired-in.
These tests are triggering #24886, and so need to be marked broken.
- - - - -
3ca72ad9 by Cheng Shao at 2024-05-30T02:57:06-04:00
rts: fix missing function prototypes in ClosureMacros.h
- - - - -
e0029e3d by Andreas Klebinger at 2024-05-30T02:57:43-04:00
UnliftedFFITypes: Allow `(# #)` as argument when it's the only argument.
This allows representing functions like:
int foo(void);
to be imported like this:
foreign import ccall "a_number_c"
c_number :: (# #) -> Int64#
Which can be useful when the imported function isn't implicitly
stateful.
- - - - -
d0401335 by Matthew Pickering at 2024-05-30T02:58:19-04:00
ci: Update ci-images commit for fedora38 image
The fedora38 nightly job has been failing for quite a while because
`diff` was no longer installed. The ci-images bump explicitly installs
`diffutils` into these images so hopefully they now pass again.
- - - - -
3c97c74a by Jan Hrček at 2024-05-30T02:58:58-04:00
Update exactprint docs
- - - - -
77760cd7 by Jan Hrček at 2024-05-30T02:58:58-04:00
Incorporate review feedback
- - - - -
87591368 by Jan Hrček at 2024-05-30T02:58:58-04:00
Remove no longer relevant reference to comments
- - - - -
05f4f142 by Jan Hrček at 2024-05-30T02:58:59-04:00
Replace outdated code example
- - - - -
45a4a5f3 by Andreas Klebinger at 2024-05-30T02:59:34-04:00
Reword error resulting from missing -XBangPatterns.
It can be the result of either a bang pattern or strict binding,
so now we say so instead of claiming it must be a bang pattern.
Fixes #21032
- - - - -
e17f2df9 by Cheng Shao at 2024-05-30T03:00:10-04:00
testsuite: bump MultiLayerModulesDefsGhciReload timeout to 10x
- - - - -
8b19139b by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Fix a QuickLook bug
This MR fixes the bug exposed by #24676. The problem was that
quickLookArg was trying to avoid calling tcInstFun unnecessarily; but
it was in fact necessary. But that in turn forced me into a
significant refactoring, putting more fields into EValArgQL.
I added a lot of new material to
Note [Quick Look at value arguments]
It is a bit more subtle than I would like, but the overall plan
is rather clearer now than it was.
- - - - -
dc9bf500 by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Comments only...
.. relating to deep subsumption and visible (required) foralls.
See #24696
- - - - -
c01dbd16 by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
More fixes:
Not fully documented yet
* Recall: the danger is of unifying an inscope regular unification variable
alpha[n] := (...kappa[n]...), where kappa is an instantiation variable, and then
subsequently demote kappa[n].
* Remove unifyType from instantiateSigma (unnecessary, very seldom fires)
* Remove unifyKind from qlUnify. Rationale:
* The whole point of qlUnify is to get (kappa := ∀a. blah). If we get
(kappa := (∀ a. blah) ▷ co) there is no point whatsoever.
* So we can use qlUnify on the kinds, and check that we get tcEqType.
* I also realised that in the IVAR rule we should add all the fresh variables to delta.
* Net result: no calls of unifyType in QuickLook
- - - - -
45c1d44a by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Import wibbles
- - - - -
ffb654e2 by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Add more Notes
- - - - -
865e69f2 by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Emit an equality constraint in make_kinds_ok
Makes QL a tiny bit more robust
Consider:
k :: Type
co :: k ~ Type
f :: forall (a :: k). Proxy k a -> blah
q :: Proxy Type (forall b. b -> b)
x = ... f q ...
When QL-ing (f q) we'll instantiate `a` with `kappa` and qlUnify
Proxy k kappa ~ Proxy Type (forall b. b->b)
Ql-Unifying k with Type will fail; fine.
If ql-unifying (kappa::k) with (forall b. b->b) fails, then kappa will
end up as a mono-tyvar and subsequent unification will fail. But it
can succed with (kappa := (forall b. b->b) |> co), where we emit
an equalityconstraint for `co`.
- - - - -
26e82335 by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Wibbles
- - - - -
9a26d92d by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Rejig Quick Look again
We now track instantiation variables in the level number
Needs documentation... just committing for CI
- - - - -
2bb82d6b by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Wibbles
- - - - -
3736c773 by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Wibbles
- - - - -
cf1deb44 by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
More wibbles
- - - - -
618c0212 by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Wibble
- - - - -
b7fc0442 by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Wibbles
- - - - -
2de636e1 by Simon Peyton Jones at 2024-05-30T09:32:44+01:00
Wibblew
- - - - -
8e999e84 by Simon Peyton Jones at 2024-05-30T09:32:45+01:00
Wibbles
- - - - -
d449c856 by Simon Peyton Jones at 2024-05-30T09:32:45+01:00
More wibbles... finally getting there
- - - - -
7d99766a by Simon Peyton Jones at 2024-05-30T09:32:45+01:00
Typo
- - - - -
7d2877b8 by Simon Peyton Jones at 2024-05-30T09:32:45+01:00
More
* Try doing without QLUnified
* Note [Monomorphise instantiation variables]
- - - - -
47260795 by Simon Peyton Jones at 2024-05-30T12:37:28+01:00
Small fixes
Better error messages
- - - - -
30 changed files:
- .gitignore
- .gitlab-ci.yml
- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/TyCo/FVs.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/HsToCore/Foreign/Call.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Plugins.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Runtime/Interpreter/JS.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Foreign.hs
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/Match.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Gen/Splice.hs-boot
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4c467ccc40a5a4a656a22a4304faa052e4633c83...472607950417f4ca8619072ac42bdbdd53445962
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4c467ccc40a5a4a656a22a4304faa052e4633c83...472607950417f4ca8619072ac42bdbdd53445962
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240530/0865056d/attachment-0001.html>
More information about the ghc-commits
mailing list