[Git][ghc/ghc][wip/reinstallable-th] 18 commits: Rename Solo# data constructor to MkSolo# (#24673)

Teo Camarasu (@teo) gitlab at gitlab.haskell.org
Wed May 8 15:22:48 UTC 2024



Teo Camarasu pushed to branch wip/reinstallable-th at Glasgow Haskell Compiler / GHC


Commits:
3b51995c by Andrei Borzenkov at 2024-05-07T14:39:40-04:00
Rename Solo# data constructor to MkSolo# (#24673)

- data Solo# a = (# a #)
+ data Solo# a = MkSolo# a

And `(# foo #)` syntax now becomes just a syntactic
sugar for `MkSolo# a`.

- - - - -
4d59abf2 by Arsen Arsenović at 2024-05-07T14:40:24-04:00
Add the cmm_cpp_is_gcc predicate to the testsuite

A future C-- test called T24474-cmm-override-g0 relies on the
GCC-specific behaviour of -g3 implying -dD, which, in turn, leads to it
emitting #defines past the preprocessing stage.  Clang, at least, does
not do this, so the test would fail if ran on Clang.

As the behaviour here being tested is ``-optCmmP-g3'' undoing effects of
the workaround we apply as a fix for bug #24474, and the workaround was
for GCC-specific behaviour, the test needs to be marked as fragile on
other compilers.

- - - - -
25b0b404 by Arsen Arsenović at 2024-05-07T14:40:24-04:00
Split out the C-- preprocessor, and make it pass -g0

Previously, C-- was processed with the C preprocessor program.  This
means that it inherited flags passed via -optc.  A flag that is somewhat
often passed through -optc is -g.  At certain -g levels (>=2), GCC
starts emitting defines *after* preprocessing, for the purposes of
debug info generation.  This is not useful for the C-- compiler, and, in
fact, causes lexer errors.  We can suppress this effect (safely, if
supported) via -g0.

As a workaround, in older versions of GCC (<=10), GCC only emitted
defines if a certain set of -g*3 flags was passed.  Newer versions check
the debug level.  For the former, we filter out those -g*3 flags and,
for the latter, we specify -g0 on top of that.

As a compatible and effective solution, this change adds a C--
preprocessor distinct from the C compiler and preprocessor, but that
keeps its flags.  The command line produced for C-- preprocessing now
looks like:

  $pgmCmmP $optCs_without_g3 $g0_if_supported $optCmmP

Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/24474

- - - - -
ac0719cd by Teo Camarasu at 2024-05-08T09:53:53+01:00
Make template-haskell reinstallable

- - - - -
71864274 by Teo Camarasu at 2024-05-08T09:53:53+01:00
Split out GHC.Internal.TH.Lift

- - - - -
7917ef33 by Teo Camarasu at 2024-05-08T09:53:53+01:00
Move MonadIO to ghc-internal

- - - - -
952d0761 by Teo Camarasu at 2024-05-08T09:53:54+01:00
Move GHC.Internal.Syntax into ghc-internal

- - - - -
44e13ad9 by Teo Camarasu at 2024-05-08T09:53:54+01:00
Move GHC.Lexeme into ghc-internal

- - - - -
ed988768 by Teo Camarasu at 2024-05-08T09:53:54+01:00
Move GHC.Internal.TH.Lib to ghc-internal

- - - - -
e71231e4 by Teo Camarasu at 2024-05-08T09:53:54+01:00
Move GHC.Internal.TH.Lift to ghc-internal

- - - - -
4712894b by Teo Camarasu at 2024-05-08T09:53:55+01:00
Move GHC.Internal.TH.Quote to ghc-internal

- - - - -
abb384f1 by Teo Camarasu at 2024-05-08T09:53:55+01:00
Drop thUnit/thUnitId

- - - - -
abae26ea by Teo Camarasu at 2024-05-08T14:33:41+01:00
Update Safe/trustworthy annotations

- - - - -
9d5edbc9 by Teo Camarasu at 2024-05-08T14:36:36+01:00
Update test outputs

- - - - -
48b97f3c by Teo Camarasu at 2024-05-08T14:41:09+01:00
Stop vendoring filepath in template-haskell

There is no need now that it is reinstallable

- - - - -
b8c98874 by Teo Camarasu at 2024-05-08T16:09:41+01:00
Rename modules moved to ghc-internal to start with GHC.Internal

We re-expose the old names from ghc-boot-th for backcompat

- - - - -
15d852d4 by Teo Camarasu at 2024-05-08T16:18:47+01:00
Update docs

- - - - -
4d007d7f by Teo Camarasu at 2024-05-08T16:22:35+01:00
mark as safe

- - - - -


30 changed files:

- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Recomp/Flags.hs
- compiler/GHC/Plugins.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Runtime/Interpreter/JS.hs
- compiler/GHC/Settings.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/SysTools/Cpp.hs
- compiler/GHC/SysTools/Tasks.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Gen/Splice.hs-boot
- compiler/GHC/Tc/Types/TH.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Unit/State.hs
- compiler/GHC/Unit/Types.hs
- compiler/ghc.cabal.in
- configure.ac
- distrib/configure.ac.in
- docs/users_guide/phases.rst
- hadrian/bindist/Makefile
- hadrian/bindist/config.mk.in


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bbb27ec859c36dcb889dd9ed62cca1cb1deb4b00...4d007d7f99289b1d451647bb01070c1a557a77c8

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bbb27ec859c36dcb889dd9ed62cca1cb1deb4b00...4d007d7f99289b1d451647bb01070c1a557a77c8
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/20240508/f1a07bf0/attachment-0001.html>


More information about the ghc-commits mailing list