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