[Git][ghc/ghc][wip/sand-witch/infix-type-data] Namespacing for fixity signatures (14032)
Andrei Borzenkov (@sand-witch)
gitlab at gitlab.haskell.org
Tue Feb 6 13:10:12 UTC 2024
Andrei Borzenkov pushed to branch wip/sand-witch/infix-type-data at Glasgow Haskell Compiler / GHC
Commits:
c3e0e752 by Andrei Borzenkov at 2024-02-06T17:09:40+04:00
Namespacing for fixity signatures (14032)
Namespace specifiers were added to syntax of fixity signatures:
- sigdecl ::= infix prec ops | ...
+ sigdecl ::= infix prec namespace_spec ops | ...
To preserve namespace during renaming MiniFixityEnv type
now has separate FastStringEnv fields for names that should be
on the term level and for name that should be on the type level.
makeMiniFixityEnv function was changed to fill MiniFixityEnv in the right way:
- signatures without namespace specifiers fill both fields
- signatures with 'data' specifier fill data field only
- signatures with 'type' specifier fill type field only
Was added helper function lookupMiniFixityEnv that takes care about
looking for a name in an appropriate namespace.
Updates haddock submodule.
- - - - -
30 changed files:
- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Parser.y
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Fixity.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Error/Codes.hs
- docs/users_guide/9.10.1-notes.rst
- docs/users_guide/exts/explicit_namespaces.rst
- libraries/ghci/GHCi/TH/Binary.hs
- libraries/template-haskell/Language/Haskell/TH.hs
- libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
- libraries/template-haskell/Language/Haskell/TH/Ppr.hs
- libraries/template-haskell/Language/Haskell/TH/Syntax.hs
- libraries/template-haskell/changelog.md
- testsuite/tests/parser/should_compile/T20846.stderr
- + testsuite/tests/rename/should_compile/T14032b.hs
- + testsuite/tests/rename/should_compile/T14032b.stdout
- testsuite/tests/rename/should_compile/all.T
- + testsuite/tests/rename/should_fail/T14032c.hs
- + testsuite/tests/rename/should_fail/T14032c.stderr
- testsuite/tests/rename/should_fail/all.T
- testsuite/tests/th/T11345.hs
- + testsuite/tests/th/T14032a.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c3e0e7528754cd6721abb39c72e069974d3ddc23
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c3e0e7528754cd6721abb39c72e069974d3ddc23
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/20240206/fb42d74b/attachment-0001.html>
More information about the ghc-commits
mailing list