'Decouple Language.Haskell.Syntax.Decls' from 'GHC.Unit.Module.Warnings'
This MR addresses issue #26636 (closed), decoupling the Language.Haskell.Syntax.Decls module from depending on GHC.Unit.Module.Warnings.
The dependency between Language.Haskell.Syntax.Decls and GHC.Unit.Module.Warnings has been inverted, with
GHC.Unit.Module.Warnings now importing the core warning types from Language.Haskell.Syntax.Decls.
The following data-types are moved from GHC.Unit.Module.Warnings to Language.Haskell.Syntax.Decls.
WarningTxtInWarningCategoryWarningCategory
Extension points are defined for each of these data-types via the TTG methodology and their type family instances are defined within GHC.Unit.Module.Warnings.
Orphan type-class instances for these data-types exist as well.
-
GHC.Hs.Instancesdefines instances of:-
Data: These are expected to be defined here.
-
-
GHC.Unit.Module.Warningsdefines instances of:-
Eq: These are unlikely to be moveable toLanguage.Haskell.Syntax.Declsand will have to stay here. -
Binary: These show be moved toGHC.Utils.Binaryafter more TTG work has been complete. -
OutputableThese show be moved toGHC.Utils.Outputableafter more TTG work has been complete. -
UniqueableThese show be moved toGHC.Types.Uniquwafter more TTG work has been complete.
-
Edited by recursion-ninja