[Git][ghc/ghc][wip/js-th] 27 commits: Migrate errors in GHC.Rename.Splice GHC.Rename.Pat
Sylvain Henry (@hsyl20)
gitlab at gitlab.haskell.org
Wed May 31 11:23:02 UTC 2023
Sylvain Henry pushed to branch wip/js-th at Glasgow Haskell Compiler / GHC
Commits:
1b31b039 by uhbif19 at 2023-05-25T12:08:28+02:00
Migrate errors in GHC.Rename.Splice GHC.Rename.Pat
This commit migrates the errors in GHC.Rename.Splice and GHC.Rename.Pat
to use the new diagnostic infrastructure.
- - - - -
56abe494 by sheaf at 2023-05-25T12:09:55+02:00
Common up Template Haskell errors in TcRnMessage
This commit commons up the various Template Haskell errors into a
single constructor, TcRnTHError, of TcRnMessage.
- - - - -
a487ba9e by Krzysztof Gogolewski at 2023-05-25T14:35:56-04:00
Enable ghci tests for unboxed tuples
The tests were originally skipped because ghci used not to support
unboxed tuples/sums.
- - - - -
dc3422d4 by Matthew Pickering at 2023-05-25T18:57:19-04:00
rts: Build ticky GHC with single-threaded RTS
The threaded RTS allows you to use ticky profiling but only for the
counters in the generated code. The counters used in the C portion of
the RTS are disabled. Updating the counters is also racy using the
threaded RTS which can lead to misleading or incorrect ticky results.
Therefore we change the hadrian flavour to build using the
single-threaded RTS (mainly in order to get accurate C code counter
increments)
Fixes #23430
- - - - -
fbc8e04e by sheaf at 2023-05-25T18:58:00-04:00
Propagate long-distance info in generated code
When desugaring generated pattern matches, we skip pattern match checks.
However, this ended up also discarding long-distance information, which
might be needed for user-written sub-expressions.
Example:
```haskell
okay (GADT di) cd =
let sr_field :: ()
sr_field = case getFooBar di of { Foo -> () }
in case cd of { SomeRec _ -> SomeRec sr_field }
```
With sr_field a generated FunBind, we still want to propagate the outer
long-distance information from the GADT pattern match into the checks
for the user-written RHS of sr_field.
Fixes #23445
- - - - -
f8ced241 by Matthew Pickering at 2023-05-26T15:26:21-04:00
Introduce GHCiMessage to wrap GhcMessage
By introducing a wrapped message type we can control how certain
messages are printed in GHCi (to add extra information for example)
- - - - -
58e554c1 by Matthew Pickering at 2023-05-26T15:26:22-04:00
Generalise UnknownDiagnostic to allow embedded diagnostics to access
parent diagnostic options.
* Split default diagnostic options from Diagnostic class into
HasDefaultDiagnosticOpts class.
* Generalise UnknownDiagnostic to allow embedded diagnostics to access
options.
The principle idea here is that when wrapping an error message (such as
GHCMessage to make GHCiMessage) then we need to also be able to lift the
configuration when overriding how messages are printed (see load' for an
example).
- - - - -
b112546a by Matthew Pickering at 2023-05-26T15:26:22-04:00
Allow API users to wrap error messages created during 'load'
This allows API users to configure how messages are rendered when they
are emitted from the load function. For an example see how
'loadWithCache' is used in GHCi.
- - - - -
2e4cf0ee by Matthew Pickering at 2023-05-26T15:26:22-04:00
Abstract cantFindError and turn Opt_BuildingCabal into a print-time option
* cantFindError is abstracted so that the parts which mention specific
things about ghc/ghci are parameters. The intention being that
GHC/GHCi can specify the right values to put here but otherwise
display the same error message.
* The BuildingCabalPackage argument from GenericMissing is removed and
turned into a print-time option. The reason for the error is not
dependent on whether `-fbuilding-cabal-package` is passed, so we don't
want to store that in the error message.
- - - - -
34b44f7d by Matthew Pickering at 2023-05-26T15:26:22-04:00
error messages: Don't display ghci specific hints for missing packages
Tickets like #22884 suggest that it is confusing that GHC used on the
command line can suggest options which only work in GHCi.
This ticket uses the error message infrastructure to override certain
error messages which displayed GHCi specific information so that this
information is only showed when using GHCi.
The main annoyance is that we mostly want to display errors in the same
way as before, but with some additional information. This means that the
error rendering code has to be exported from the Iface/Errors/Ppr.hs
module.
I am unsure about whether the approach taken here is the best or most
maintainable solution.
Fixes #22884
- - - - -
05a1b626 by Matthew Pickering at 2023-05-26T15:26:58-04:00
ghcup-metadata: Don't override existing metadata if version already exists.
If a nightly pipeline runs twice for some reason for the same version
then we really don't want to override an existing entry with new
bindists. This could cause ABI compatability issues for users or break
ghcup's caching logic.
- - - - -
fcbcb3cc by Matthew Pickering at 2023-05-26T15:26:58-04:00
ghcup-metadata: Use proper API url for bindist download
Previously we were using links from the web interface, but it's more
robust and future-proof to use the documented links to the artifacts.
https://docs.gitlab.com/ee/api/job_artifacts.html
- - - - -
5b59c8fe by Matthew Pickering at 2023-05-26T15:26:58-04:00
ghcup-metadata: Set Nightly and LatestNightly tags
The latest nightly release needs the LatestNightly tag, and all other
nightly releases need the Nightly tag. Therefore when the metadata is
updated we need to replace all LatestNightly with Nightly.`
- - - - -
914e1468 by Matthew Pickering at 2023-05-26T15:26:58-04:00
ghcup-metadata: Download nightly metadata for correct date
The metadata now lives in https://gitlab.haskell.org/ghc/ghcup-metadata
with one metadata file per year. When we update the metadata we download
and update the right file for the current year.
- - - - -
16cf7d2e by Matthew Pickering at 2023-05-26T15:26:58-04:00
ghcup-metadata: Download metadata and update for correct year
something about pipeline date
- - - - -
14792c4b by Matthew Pickering at 2023-05-26T15:26:58-04:00
ghcup-metadata: Don't skip CI
On a push we now have a CI job which updates gitlab pages with the
metadata files.
- - - - -
1121bdd8 by Matthew Pickering at 2023-05-26T15:26:59-04:00
ghcup-metadata: Add --date flag to specify the release date
The ghcup-metadata now has a viReleaseDay field which needs to be
populated with the day of the release.
- - - - -
bc478bee by Matthew Pickering at 2023-05-26T15:26:59-04:00
ghcup-metadata: Add dlOutput field
ghcup now requires us to add this field which specifies where it should
download the bindist to. See
https://gitlab.haskell.org/ghc/ghcup-metadata/-/issues/1 for some more
discussion.
- - - - -
2bdbd9da by Josh Meredith at 2023-05-26T15:27:35-04:00
JS: Convert rendering to use HLine instead of SDoc (#22455)
- - - - -
abd9e37c by Norman Ramsey at 2023-05-26T15:28:12-04:00
testsuite: add WasmControlFlow test
This patch adds the WasmControlFlow test to test the wasm backend's
relooper component.
- - - - -
07f858eb by Sylvain Henry at 2023-05-26T15:28:53-04:00
Factorize getLinkDeps
Prepare reuse of getLinkDeps for TH implementation in the JS backend
(cf #22261 and review of !9779).
- - - - -
fad9d092 by Oleg Grenrus at 2023-05-27T13:38:08-04:00
Change GHC.Driver.Session import to .DynFlags
Also move targetPlatform selector
Plenty of GHC needs just DynFlags.
Even more can be made to use .DynFlags if more selectors is migrated.
This is a low hanging fruit.
- - - - -
69fdbece by Alan Zimmerman at 2023-05-27T13:38:45-04:00
EPA: Better fix for #22919
The original fix for #22919 simply removed the ability to match up
prior comments with the first declaration in the file.
Restore it, but add a check that the comment is on a single line, by
ensuring that it comes immediately prior to the next thing (comment or
start of declaration), and that the token preceding it is not on the
same line.
closes #22919
- - - - -
fd012ecc by Sylvain Henry at 2023-05-30T15:47:23+02:00
JS: implement TH support
- Add ghc-interp.js bootstrap script for the JS interpreter
- Interactively link and execute iserv code from the ghci package
- Incrementally load and run JS code for splices into the running iserv
Co-authored-by: Luite Stegeman <stegeman at gmail.com>
- - - - -
bbe73d9f by Sylvain Henry at 2023-05-30T15:53:10+02:00
Don't use getKey
- - - - -
f120d892 by Sylvain Henry at 2023-05-31T13:03:48+02:00
Stg: return imported FVs
This is used to determine what to link when using the interpreter.
For now it's only used by the JS interpreter but it could easily be used
by the native interpreter too (instead of extracting names from compiled BCOs).
- - - - -
d586b7c4 by Sylvain Henry at 2023-05-31T13:05:24+02:00
Fix some recompilation avoidance tests
- - - - -
30 changed files:
- .gitlab-ci.yml
- .gitlab/rel_eng/mk-ghcup-metadata/README.mkd
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- compiler/GHC.hs
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToLlvm.hs
- compiler/GHC/CmmToLlvm/Base.hs
- compiler/GHC/Core/LateCC.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/CmdLine.hs
- compiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/Driver/Config.hs
- compiler/GHC/Driver/Config/Cmm.hs
- compiler/GHC/Driver/Config/Cmm/Parser.hs
- compiler/GHC/Driver/Config/CmmToAsm.hs
- compiler/GHC/Driver/Config/CmmToLlvm.hs
- compiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/Driver/Config/Core/Lint/Interactive.hs
- compiler/GHC/Driver/Config/Core/Opt/Arity.hs
- compiler/GHC/Driver/Config/Core/Opt/LiberateCase.hs
- compiler/GHC/Driver/Config/Core/Opt/Simplify.hs
- compiler/GHC/Driver/Config/Core/Opt/WorkWrap.hs
- compiler/GHC/Driver/Config/Core/Rules.hs
- compiler/GHC/Driver/Config/CoreToStg.hs
- compiler/GHC/Driver/Config/Diagnostic.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0e55f2591487b685c599acc97a3a4357f9bf00f5...d586b7c4f4a53f913fb91d02698737b2f6f73acc
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0e55f2591487b685c599acc97a3a4357f9bf00f5...d586b7c4f4a53f913fb91d02698737b2f6f73acc
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/20230531/ced547bc/attachment-0001.html>
More information about the ghc-commits
mailing list