[Git][ghc/ghc][wip/az/epa-tidy-locatedxxx-8] EPA: Keep decls together in ClassDecl
Alan Zimmerman pushed to branch wip/az/epa-tidy-locatedxxx-8 at Glasgow Haskell Compiler / GHC Commits: ebc758f6 by Alan Zimmerman at 2026-07-16T20:46:54+01:00 EPA: Keep decls together in ClassDecl Similar to 1718230f4d3d19d8c49c0e5d496cb0fb6f399528 for HsValBindsLR, this commit updates ClassDecl so that it no longer splits out the assorted `LHsDecl GhcPs` until the renamer. It does this by inserting a type family (separate from the classic TTG one) for this. So data TyClDecl ... | ClassDecl { ... tcdDecls :: XClassDecls pass with type instance XClassDecls GhcPs = [LHsDecl GhcPs] type instance XClassDecls GhcRn = ClassDeclX GhcRn type instance XClassDecls GhcTc = ClassDeclX GhcTc data ClassDeclX pass = ClassDeclX { tcdSigs :: [LSig pass], -- ^ Methods' signatures tcdMeths :: LHsBinds pass, -- ^ Default methods tcdATs :: [LFamilyDecl pass], -- ^ Associated types; tcdATDefs :: [LTyFamDefltDecl pass], -- ^ Associated type defaults tcdDocs :: [LDocDecl pass] -- ^ Haddock docs } - - - - - 33 changed files: - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Stats.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Docs.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Parser/PostProcess/Haddock.hs - compiler/GHC/Rename/Module.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/Tc/TyCl/Class.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Binds.hs - compiler/Language/Haskell/Syntax/Decls.hs - compiler/Language/Haskell/Syntax/Extension.hs - testsuite/tests/haddock/haddock_examples/haddock.Test.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/T20452.stderr - testsuite/tests/printer/Test24533.stdout - utils/check-exact/ExactPrint.hs - utils/check-exact/Utils.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs - utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/Create.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/haddock-api/src/Haddock/Types.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ebc758f69f3da634ba9411e5b9ca32b2... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ebc758f69f3da634ba9411e5b9ca32b2... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Alan Zimmerman (@alanz)