[Git][ghc/ghc][master] EPA: Remove LocatedC / SrcSpanAnnC
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 2d0fd154 by Alan Zimmerman at 2026-06-29T11:44:00-04:00 EPA: Remove LocatedC / SrcSpanAnnC This is part of a cleanup of the zoo of SrcSpanAnnXXX types for exact print annotations. This one removes SrcSpanAnnC used for storing exact print annotations for contexts. It replaces it with an explicit `HsContext` data type that carries the annotations and the context. So, replace type HsContext pass = [LHsType pass] with type HsContext pass = HsContextDetails pass (LHsType pass) data HsContextDetails pass arg = HsContext { hsc_ext :: !(XHsContext pass) , hsc_ctxt :: [arg] } | XHsContextDetails !(XXHsContextDetails pass) We need the parameterised HsContextDetails because it is used both for HsQual carrying 'LHsExpr p' and "normal" contexts carrying 'LHsType p'. - - - - - 36 changed files: - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Dump.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Annotation.hs - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Parser/PostProcess/Haddock.hs - compiler/GHC/Rename/Expr.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Module.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Deriv.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Expr.hs - compiler/Language/Haskell/Syntax/Type.hs - testsuite/tests/ghc-api/T25121_status.stdout - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/T15323.stderr - testsuite/tests/printer/Test24533.stdout - utils/check-exact/ExactPrint.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/Interface/RenameType.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/2d0fd154fc10fe00974ea2a1f0b508c1... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2d0fd154fc10fe00974ea2a1f0b508c1... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)