
Vladislav Zavialov pushed to branch wip/int-index/deprecate-pattern-namespace-specifier at Glasgow Haskell Compiler / GHC Commits: 3b3a5dec by Ben Gamari at 2025-05-15T16:10:01-04:00 Don't emit unprintable characters when printing Uniques When faced with an unprintable tag we now instead print the codepoint number. Fixes #25989. (cherry picked from commit e832b1fadee66e8d6dd7b019368974756f8f8c46) - - - - - e1ef8974 by Mike Pilgrem at 2025-05-16T16:09:14-04:00 Translate iff in Haddock documentation into everyday English - - - - - fd64667d by Vladislav Zavialov at 2025-05-20T03:25:08-04:00 Allow the 'data' keyword in import/export lists (#25899) This patch introduces the 'data' namespace specifier in import and export lists. The intended use is to import data constructors without their parent type constructors, e.g. import Data.Proxy as D (data Proxy) type DP = D.Proxy -- promoted data constructor Additionally, it is possible to use 'data' to explicitly qualify any data constructors or terms, incl. operators and field selectors import Prelude (Semigroup(data (<>))) import Data.Function (data (&)) import Data.Monoid (data Dual, data getDual) x = Dual "Hello" <> Dual "World" & getDual The implementation mostly builds on top of the existing logic for the 'type' and 'pattern' namespace specifiers, plus there are a few tweaks to how we generate suggestions in error messages. - - - - - acc86753 by Ben Gamari at 2025-05-20T03:25:51-04:00 compiler: Use field selectors when creating BCOs This makes it easier to grep for these fields. - - - - - 60a55fd7 by Ben Gamari at 2025-05-20T03:25:51-04:00 compiler: Clarify BCO size Previously the semantics and size of StgBCO was a bit unclear. Specifically, the `size` field was documented to contain the size of the bitmap whereas it was actually the size of the closure *and* bitmap. Additionally, it was not as clear as it could be that the bitmap was a full StgLargeBitmap with its own `size` field. - - - - - c7cdd4ea by Vladislav Zavialov at 2025-05-20T21:42:47+03:00 Implement -Wpattern-namespace-specifier (#25900) In accordance with GHC Proposal #581 "Namespace-specified imports", section 2.3 "Deprecate use of pattern in import/export lists", the `pattern` namespace specifier is now deprecated. Test cases: T25900 T25900_noext - - - - - 95 changed files: - compiler/GHC/ByteCode/Asm.hs - compiler/GHC/ByteCode/Linker.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Errors/Ppr.hs - compiler/GHC/Parser/Errors/Types.hs - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/Export.hs - compiler/GHC/Types/Error/Codes.hs - compiler/GHC/Types/Hint.hs - compiler/GHC/Types/Hint/Ppr.hs - compiler/GHC/Types/Unique.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/Language/Haskell/Syntax/ImpExp.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/exts/explicit_namespaces.rst - docs/users_guide/exts/pattern_synonyms.rst - docs/users_guide/using-warnings.rst - hadrian/src/Flavour.hs - libraries/ghc-internal/src/GHC/Internal/Data/Maybe.hs - libraries/ghc-internal/src/GHC/Internal/Data/Typeable/Internal.hs - libraries/ghc-internal/src/GHC/Internal/Type/Reflection.hs - libraries/ghc-internal/src/GHC/Internal/TypeLits.hs - libraries/ghc-internal/src/GHC/Internal/TypeNats.hs - rts/PrimOps.cmm - rts/include/rts/storage/Closures.h - testsuite/tests/callarity/unittest/CallArity1.hs - testsuite/tests/ghci/scripts/ghci024.stdout - testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 - testsuite/tests/module/T21826.stderr - + testsuite/tests/parser/should_compile/T25900.hs - + testsuite/tests/parser/should_compile/T25900.stderr - + testsuite/tests/parser/should_compile/T25900_noext.hs - + testsuite/tests/parser/should_compile/T25900_noext.stderr - testsuite/tests/parser/should_compile/all.T - testsuite/tests/patsyn/should_compile/ImpExp_Exp.hs - testsuite/tests/patsyn/should_compile/T11959.hs - testsuite/tests/patsyn/should_compile/T11959.stderr - testsuite/tests/patsyn/should_compile/T11959Lib.hs - testsuite/tests/patsyn/should_compile/T13350/boolean/Boolean.hs - testsuite/tests/patsyn/should_compile/T22521.hs - testsuite/tests/patsyn/should_compile/T9857.hs - testsuite/tests/patsyn/should_compile/export.hs - testsuite/tests/pmcheck/complete_sigs/T25115a.hs - testsuite/tests/pmcheck/should_compile/T11822.hs - testsuite/tests/polykinds/T14270.hs - testsuite/tests/rename/should_compile/T12548.hs - testsuite/tests/rename/should_compile/T22581d.stdout - + testsuite/tests/rename/should_compile/T25899a.hs - + testsuite/tests/rename/should_compile/T25899b.hs - + testsuite/tests/rename/should_compile/T25899c.hs - + testsuite/tests/rename/should_compile/T25899c_helper.hs - + testsuite/tests/rename/should_compile/T25899d.script - + testsuite/tests/rename/should_compile/T25899d.stdout - testsuite/tests/rename/should_compile/all.T - testsuite/tests/rename/should_fail/T22581a.stderr - testsuite/tests/rename/should_fail/T22581b.stderr - testsuite/tests/rename/should_fail/T25056.stderr - testsuite/tests/rename/should_fail/T25056a.hs - + testsuite/tests/rename/should_fail/T25899e1.hs - + testsuite/tests/rename/should_fail/T25899e1.stderr - + testsuite/tests/rename/should_fail/T25899e2.hs - + testsuite/tests/rename/should_fail/T25899e2.stderr - + testsuite/tests/rename/should_fail/T25899e3.hs - + testsuite/tests/rename/should_fail/T25899e3.stderr - + testsuite/tests/rename/should_fail/T25899e_helper.hs - + testsuite/tests/rename/should_fail/T25899f.hs - + testsuite/tests/rename/should_fail/T25899f.stderr - + testsuite/tests/rename/should_fail/T25899f_helper.hs - testsuite/tests/rename/should_fail/all.T - testsuite/tests/simplCore/should_compile/T15186.hs - testsuite/tests/simplCore/should_compile/T15186A.hs - testsuite/tests/typecheck/should_compile/TypeRepCon.hs - testsuite/tests/warnings/should_compile/DataToTagWarnings.hs - testsuite/tests/warnings/should_compile/T14794a.hs - testsuite/tests/warnings/should_compile/T14794a.stderr - testsuite/tests/warnings/should_compile/T14794b.hs - testsuite/tests/warnings/should_compile/T14794b.stderr - testsuite/tests/warnings/should_compile/T14794c.hs - testsuite/tests/warnings/should_compile/T14794c.stderr - testsuite/tests/warnings/should_compile/T14794d.hs - testsuite/tests/warnings/should_compile/T14794d.stderr - testsuite/tests/warnings/should_compile/T14794e.hs - testsuite/tests/warnings/should_compile/T14794e.stderr - testsuite/tests/warnings/should_compile/T14794f.hs - testsuite/tests/warnings/should_compile/T14794f.stderr - testsuite/tests/wcompat-warnings/Template.hs - + testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr - utils/check-exact/ExactPrint.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/edd1ca876e636772ea77f625175a28e... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/edd1ca876e636772ea77f625175a28e... You're receiving this email because of your account on gitlab.haskell.org.