[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: Rework built-in and punned names (#25174, #25179, #25180, #25182)
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Thu Jan 23 16:45:40 UTC 2025
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
51e3ec83 by Vladislav Zavialov at 2025-01-22T20:41:32+03:00
Rework built-in and punned names (#25174, #25179, #25180, #25182)
This patch rewrites part of the logic for dealing with built-in and
punned names, making it more principled and fixing a few bugs.
* Kill off filterCTuple. Its purpose was to improve pretty-printing of
constraint tuples, and the appropriate place for this is namePun_maybe.
* Remove unitTyCon, unboxedUnitTyCon, and soloTyCon from wiredInTyCons.
Their inclusion in the list was a workaround for shoddy logic in
lookupOrigNameCache. Now we treat tuples of all arities uniformly.
* In isBuiltInOcc_maybe, only match on actual built-in syntax, e.g. "FUN"
shouldn't be there (#25174). Also take ListTuplePuns into account (#25179).
* When matching OccNames, use the ShortByteString directly to avoid
potentially costly conversions to ByteString and String.
* Introduce isInfiniteFamilyOrigName_maybe, a purpose-built helper for
looking up tuples/sums in the OrigNameCache. This clears up the previously
convoluted relation between the orig name cache and built-in syntax.
* Reuse isKnownOrigName_maybe to eliminate the need for isPunOcc_maybe.
* Classify MkSolo and MkSolo# as UserSyntax, thus fixing whole-module
reexports (#25182).
* Teach valid-hole-fits about tuples, unboxed tuples, and unboxed sums,
up to a certain arity (#25180).
* Drop the unnecessary special case for unary constraint tuples in the
type checker (finish_tuple). It was a workaround for the lack of CSolo.
* Update Notes and other comments, add tests.
- - - - -
9ac6c521 by Brandon Chinn at 2025-01-23T11:45:16-05:00
Break out GHC.Parser.Lexer.Interface
- - - - -
8391cda0 by Brandon Chinn at 2025-01-23T11:45:16-05:00
Fix lexing comments in multiline strings (#25609)
Metric Decrease:
MultiLayerModulesRecomp
parsing001
- - - - -
112eaa74 by Teo Camarasu at 2025-01-23T11:45:17-05:00
doc: Add documentation for -XDoAndIfThenElse
Resolves #18631
Co-authored-by: Richard Eisenberg <rae at cs.brynmawr.edu>
- - - - -
30 changed files:
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Uniques.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Parser/HaddockLex.x
- compiler/GHC/Parser/Lexer.x
- + compiler/GHC/Parser/Lexer/Interface.hs
- + compiler/GHC/Parser/Lexer/String.x
- compiler/GHC/Plugins.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Tc/Errors/Hole.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Name.hs
- compiler/GHC/Types/Name/Cache.hs
- compiler/GHC/Types/Name/Ppr.hs
- compiler/ghc.cabal.in
- docs/users_guide/conf.py
- docs/users_guide/expected-undocumented-flags.txt
- + docs/users_guide/exts/doandifthenelse.rst
- docs/users_guide/exts/syntax.rst
- libraries/base/src/GHC/Base.hs
- libraries/base/src/GHC/Exts.hs
- testsuite/tests/core-to-stg/T24124.stderr
- testsuite/tests/count-deps/CountDepsParser.stdout
- testsuite/tests/ghc-api/T18522-dbg-ppr.hs
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b21c689b4a257db011c6ddbe5c2c72db8fa375c1...112eaa748dfada399de82108c68646f806b522a9
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b21c689b4a257db011c6ddbe5c2c72db8fa375c1...112eaa748dfada399de82108c68646f806b522a9
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/20250123/3d7d9037/attachment.html>
More information about the ghc-commits
mailing list