Move types from GHC.Types.Basic to proper L.H.S locations
GHC.Types.Basic has a few types that rightfully belong in L.H.S. For one, and it has some types that are currently imported but should really be moved to extension points.
import GHC.Types.Basic (TopLevelFlag, OverlapMode, RuleName, Activation -- in decls
,TyConFlavour(..), TypeOrData(..))
import GHC.Types.Basic ( RecFlag(..), TypeOrKind(..) ) -- in bind
And though its not explicitly in the import list InlinePragma also has the essence of something that should belong to L.H.S.
For now we have the following changes:
-
RuleNameis just a synonym forFastString, sinceFastStringis already imported in L.H.S.Basic, its definition has been moved there -
TopLevelFlaghas been moved to the extension point ofFamilyDecl, so it no longer needs to be imported -
OverlapModehas been moved to L.H.S.OverlapPragma and parameterized over the pass.- All instances of
SourceText, used for exact printing by GHC, have been moved to extension fields. -
NonCanonicalhas been moved to an extension constructor
- All instances of
-
InlinePragmahas been moved to L.H.S.InlinePragma and parameterized over the field- As have
ActivationandInlineSpecwhich it relies upon. - All instances of
SouceTexthave been moved to extension fields
- As have
I'm sure there will be plenty of feedback to be resolved since this change came with plenty of churn and people might want me to resolve things differently, but at least the edges have been cut now. Probably should have been three separate merge requests, but alas.