[Git][ghc/ghc][wip/TTG-No-Orphans] First pass of orphan instance removal.
recursion-ninja pushed to branch wip/TTG-No-Orphans at Glasgow Haskell Compiler / GHC Commits: 69607e46 by Recursion Ninja at 2026-07-09T19:34:49-04:00 First pass of orphan instance removal. This is part of a technical debt removal effort made possible now that seperating out the AST via TTG comes to a close. As the AST in 'L.H.S' has been incrementally separated from the GHC internals, there are many accumulated orphan instance of 'Binary', 'Outputable', 'Uniquable', etc. The orphan instance of data-types from within 'L.H.S' are having thier orphan instances moved to the module which defined the type-class; i.e. moving an orphan 'Binary' instance to 'GHC.Utils.Binary'. Orphan instances resolved (57): | Data-type | Resolved instance(s) | Former orphan module(s) | | -------------------- | -------------------------- | ------------------------- | | Role | Binary, NFData, Outputable | GHC.Core.Coercion.Axiom | | SrcStrictness | Binary, NFData, Outputable | GHC.Core.DataCon | | SrcUnpackedness | Binary, NFData, Outputable | GHC.Core.DataCon | | Fixity | Binary, Outputable | GHC.Hs.Basic | | FixityDirection | Binary, Outputable | GHC.Hs.Basic | | LexicalFixity | Outputable | GHC.Hs.Basic | | CCallTarget | NFData | GHC.Hs.Decls.Foreign | | CType | NFData | GHC.Hs.Decls.Foreign | | Header | NFData | GHC.Hs.Decls.Foreign | | OverlapMode | Binary, NFData | GHC.Hs.Decls.Overlap | | WithHsDocIdentifiers | Eq, NFData, Outputable | GHC.Hs.Doc | | HsDocString | Eq, NFData, Show | GHC.Hs.DocString | | HsDocStringChunk | Binary, Outputable | GHC.Hs.DocString | | HsDocStringDecorator | Binary, Outputable | GHC.Hs.DocString | | IEWrappedName | Eq, Outputable | GHC.Hs.ImpExp | | NamespaceSpecifier | Eq, Outputable | GHC.Hs.ImpExp | | IE | Eq | GHC.Hs.Instances | | HsLit | Eq | GHC.Hs.Lit | | HsOverLit | Eq | GHC.Hs.Lit | | OverLitVal | Eq | GHC.Hs.Lit | | HsQualLit | Eq | GHC.Hs.Lit | | QualLitVal | Eq | GHC.Hs.Lit | | FractionalLit | Eq, Show | GHC.Hs.Lit | | IntegralLit | Eq, Show | GHC.Hs.Lit | | StringLiteral | Eq, Show | GHC.Hs.Lit | | ForAllTyFlag | Binary, NFData, Outputable | GHC.Hs.Specificity | | Specificity | Binary, NFData | GHC.Hs.Specificity | | PromotionFlag | Binary, Outputable | GHC.Types.Basic | | FieldLabelString | Outputable, Uniquable | GHC.Types.FieldLabel | | CCallTarget | Eq | GHC.Types.ForeignCall | | Header | Eq | GHC.Types.ForeignCall | | InlinePragma | Binary | GHC.Types.InlinePragma | | InWarningCategory | Eq | GHC.Unit.Module.Warnings | | WarningTxt | Eq | GHC.Unit.Module.Warnings | Closes #21262, #27469 Resolving more orphan 'Eq' instances - - - - - 31 changed files: - compiler/GHC/Core/Coercion/Axiom.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Hs/Basic.hs - compiler/GHC/Hs/Decls/Overlap.hs - compiler/GHC/Hs/Doc.hs - compiler/GHC/Hs/DocString.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Lit.hs - − compiler/GHC/Hs/Specificity.hs - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Types/Basic.hs - compiler/GHC/Types/FieldLabel.hs - compiler/GHC/Types/Fixity.hs - compiler/GHC/Types/ForeignCall.hs - compiler/GHC/Types/InlinePragma.hs - compiler/GHC/Types/Unique.hs - compiler/GHC/Types/Var.hs - compiler/GHC/Unit/Module/Warnings.hs - compiler/GHC/Utils/Binary.hs - compiler/GHC/Utils/Outputable.hs - compiler/Language/Haskell/Syntax/Basic.hs - compiler/Language/Haskell/Syntax/Decls.hs - compiler/Language/Haskell/Syntax/Decls/Foreign.hs - compiler/Language/Haskell/Syntax/Doc.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/Language/Haskell/Syntax/ImpExp.hs - compiler/Language/Haskell/Syntax/Lit.hs - compiler/Language/Haskell/Syntax/Specificity.hs - compiler/ghc.cabal.in - testsuite/tests/count-deps/CountDepsParser.stdout The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/69607e46000eaf0cbb31002247f5fb3d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/69607e46000eaf0cbb31002247f5fb3d... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
recursion-ninja (@recursion-ninja)