[Git][ghc/ghc][master] Namespacing for fixity signatures (#14032)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Feb 21 10:01:15 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
77629e76 by Andrei Borzenkov at 2024-02-21T05:00:35-05: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.

Metric Decrease:
    MultiLayerModulesTH_OneShot

- - - - -


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/T14032d.hs
- 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/T14032f.hs
- + testsuite/tests/rename/should_fail/T14032f.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/77629e76cc602d310f85b89b39536bd573aa4982

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/77629e76cc602d310f85b89b39536bd573aa4982
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/20240221/d2eb6d5d/attachment-0001.html>


More information about the ghc-commits mailing list