[Git][ghc/ghc][wip/sand-witch/infix-type-data] Namespacing for fixity signatures (14032)

Andrei Borzenkov (@sand-witch) gitlab at gitlab.haskell.org
Wed Feb 14 18:14:57 UTC 2024



Andrei Borzenkov pushed to branch wip/sand-witch/infix-type-data at Glasgow Haskell Compiler / GHC


Commits:
f820b462 by Andrei Borzenkov at 2024-02-14T22:14: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/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/f820b462db301ed7bf088c997db9a2662accb9a3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f820b462db301ed7bf088c997db9a2662accb9a3
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/20240214/e0ef2069/attachment.html>


More information about the ghc-commits mailing list