diff options
Diffstat (limited to 'compiler/GHC/Core')
-rw-r--r-- | compiler/GHC/Core/TyCo/Rep.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Core/TyCo/Tidy.hs | 9 | ||||
-rw-r--r-- | compiler/GHC/Core/TyCon.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Core/Type.hs | 18 |
4 files changed, 6 insertions, 33 deletions
diff --git a/compiler/GHC/Core/TyCo/Rep.hs b/compiler/GHC/Core/TyCo/Rep.hs index bb7280dd0d..31c8813e10 100644 --- a/compiler/GHC/Core/TyCo/Rep.hs +++ b/compiler/GHC/Core/TyCo/Rep.hs @@ -713,10 +713,8 @@ data TyCoBinder instance Outputable TyCoBinder where ppr (Anon af ty) = ppr af <+> ppr ty ppr (Named (Bndr v Required)) = ppr v - -- See Note [Explicit Case Statement for Specificity] - ppr (Named (Bndr v (Invisible spec))) = case spec of - SpecifiedSpec -> char '@' <> ppr v - InferredSpec -> braces (ppr v) + ppr (Named (Bndr v Specified)) = char '@' <> ppr v + ppr (Named (Bndr v Inferred)) = braces (ppr v) -- | 'TyBinder' is like 'TyCoBinder', but there can only be 'TyVarBinder' diff --git a/compiler/GHC/Core/TyCo/Tidy.hs b/compiler/GHC/Core/TyCo/Tidy.hs index 96cbed6ade..97d3adf8e0 100644 --- a/compiler/GHC/Core/TyCo/Tidy.hs +++ b/compiler/GHC/Core/TyCo/Tidy.hs @@ -8,12 +8,10 @@ module GHC.Core.TyCo.Tidy -- * Tidying type related things up for printing tidyType, tidyTypes, tidyOpenType, tidyOpenTypes, - tidyOpenKind, tidyVarBndr, tidyVarBndrs, tidyFreeTyCoVars, avoidNameClashes, tidyOpenTyCoVar, tidyOpenTyCoVars, tidyTyCoVarOcc, tidyTopType, - tidyKind, tidyCo, tidyCos, tidyTyCoVarBinder, tidyTyCoVarBinders ) where @@ -215,13 +213,6 @@ tidyTopType :: Type -> Type tidyTopType ty = tidyType emptyTidyEnv ty --------------- -tidyOpenKind :: TidyEnv -> Kind -> (TidyEnv, Kind) -tidyOpenKind = tidyOpenType - -tidyKind :: TidyEnv -> Kind -> Kind -tidyKind = tidyType - ----------------- -- | Tidy a Coercion -- diff --git a/compiler/GHC/Core/TyCon.hs b/compiler/GHC/Core/TyCon.hs index 24807945cc..e267932e14 100644 --- a/compiler/GHC/Core/TyCon.hs +++ b/compiler/GHC/Core/TyCon.hs @@ -680,10 +680,8 @@ instance OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) where ppr_bi (AnonTCB VisArg) = text "anon-vis" ppr_bi (AnonTCB InvisArg) = text "anon-invis" ppr_bi (NamedTCB Required) = text "req" - -- See Note [Explicit Case Statement for Specificity] - ppr_bi (NamedTCB (Invisible spec)) = case spec of - SpecifiedSpec -> text "spec" - InferredSpec -> text "inf" + ppr_bi (NamedTCB Specified) = text "spec" + ppr_bi (NamedTCB Inferred) = text "inf" instance Binary TyConBndrVis where put_ bh (AnonTCB af) = do { putByte bh 0; put_ bh af } diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs index cf671657b0..85cc635791 100644 --- a/compiler/GHC/Core/Type.hs +++ b/compiler/GHC/Core/Type.hs @@ -222,12 +222,10 @@ module GHC.Core.Type ( -- * Tidying type related things up for printing tidyType, tidyTypes, tidyOpenType, tidyOpenTypes, - tidyOpenKind, tidyVarBndr, tidyVarBndrs, tidyFreeTyCoVars, tidyOpenTyCoVar, tidyOpenTyCoVars, tidyTyCoVarOcc, tidyTopType, - tidyKind, tidyTyCoVarBinder, tidyTyCoVarBinders, -- * Kinds @@ -3541,22 +3539,10 @@ tyConAppNeedsKindSig spec_inj_pos tc n_args _ -> emptyFV source_of_injectivity Required = True - -- See Note [Explicit Case Statement for Specificity] - source_of_injectivity (Invisible spec) = case spec of - SpecifiedSpec -> spec_inj_pos - InferredSpec -> False + source_of_injectivity Specified = spec_inj_pos + source_of_injectivity Inferred = False {- -Note [Explicit Case Statement for Specificity] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When pattern matching against an `ArgFlag`, you should not pattern match against -the pattern synonyms 'Specified' or 'Inferred', as this results in a -non-exhaustive pattern match warning. -Instead, pattern match against 'Invisible spec' and do another case analysis on -this specificity argument. -The issue has been fixed in GHC 8.10 (ticket #17876). This hack can thus be -dropped once version 8.10 is used as the minimum version for building GHC. - Note [When does a tycon application need an explicit kind signature?] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There are a couple of places in GHC where we convert Core Types into forms that |