diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-05-14 13:52:44 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-05-24 01:55:24 -0400 |
commit | a426abb9b41de6097e888b9fdca7b275306b17c9 (patch) | |
tree | 0ffe12ea44262510e2bf3f1ce979849aef9fd171 /compiler/GHC | |
parent | 37430251c3f684c46e893552dba78653d80e5243 (diff) | |
download | haskell-a426abb9b41de6097e888b9fdca7b275306b17c9.tar.gz |
Rename GHC.Hs.Types into GHC.Hs.Type
See discussion in https://gitlab.haskell.org/ghc/ghc/issues/13009#note_268610
Diffstat (limited to 'compiler/GHC')
-rw-r--r-- | compiler/GHC/Hs.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Hs/Binds.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Hs/Decls.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Hs/Expr.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Hs/Instances.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Hs/Pat.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Hs/Type.hs (renamed from compiler/GHC/Hs/Types.hs) | 4 | ||||
-rw-r--r-- | compiler/GHC/Hs/Utils.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/HsToCore/Docs.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/HsToCore/Quote.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Parser.y | 2 | ||||
-rw-r--r-- | compiler/GHC/Parser/PostProcess.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Rename/HsType.hs | 8 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/HsType.hs | 10 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/Splice.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Tc/Solver/Canonical.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Tc/Utils/TcMType.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Tc/Utils/Unify.hs-boot | 2 | ||||
-rw-r--r-- | compiler/GHC/ThToHs.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Types/Var.hs | 2 |
20 files changed, 31 insertions, 31 deletions
diff --git a/compiler/GHC/Hs.hs b/compiler/GHC/Hs.hs index fa71e65599..587a0cd1b2 100644 --- a/compiler/GHC/Hs.hs +++ b/compiler/GHC/Hs.hs @@ -25,7 +25,7 @@ module GHC.Hs ( module GHC.Hs.ImpExp, module GHC.Hs.Lit, module GHC.Hs.Pat, - module GHC.Hs.Types, + module GHC.Hs.Type, module GHC.Hs.Utils, module GHC.Hs.Doc, module GHC.Hs.Extension, @@ -44,7 +44,7 @@ import GHC.Hs.ImpExp import GHC.Hs.Lit import GHC.Hs.Extension import GHC.Hs.Pat -import GHC.Hs.Types +import GHC.Hs.Type import GHC.Types.Basic ( Fixity, WarningTxt ) import GHC.Hs.Utils import GHC.Hs.Doc diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs index ccc5a8d422..0f4a16c98e 100644 --- a/compiler/GHC/Hs/Binds.hs +++ b/compiler/GHC/Hs/Binds.hs @@ -31,7 +31,7 @@ import {-# SOURCE #-} GHC.Hs.Expr ( pprExpr, LHsExpr, import {-# SOURCE #-} GHC.Hs.Pat ( LPat ) import GHC.Hs.Extension -import GHC.Hs.Types +import GHC.Hs.Type import GHC.Core import GHC.Tc.Types.Evidence import GHC.Core.Type diff --git a/compiler/GHC/Hs/Decls.hs b/compiler/GHC/Hs/Decls.hs index 6dfe75005e..931c9b218f 100644 --- a/compiler/GHC/Hs/Decls.hs +++ b/compiler/GHC/Hs/Decls.hs @@ -101,7 +101,7 @@ import {-# SOURCE #-} GHC.Hs.Expr( HsExpr, HsSplice, pprExpr, -- Because Expr imports Decls via HsBracket import GHC.Hs.Binds -import GHC.Hs.Types +import GHC.Hs.Type import GHC.Hs.Doc import GHC.Core.TyCon import GHC.Types.Basic diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs index 2ef0d62db4..880277d8fd 100644 --- a/compiler/GHC/Hs/Expr.hs +++ b/compiler/GHC/Hs/Expr.hs @@ -33,7 +33,7 @@ import GHC.Hs.Decls import GHC.Hs.Pat import GHC.Hs.Lit import GHC.Hs.Extension -import GHC.Hs.Types +import GHC.Hs.Type import GHC.Hs.Binds -- others: diff --git a/compiler/GHC/Hs/Instances.hs b/compiler/GHC/Hs/Instances.hs index a003a6b885..a5588f31d2 100644 --- a/compiler/GHC/Hs/Instances.hs +++ b/compiler/GHC/Hs/Instances.hs @@ -22,7 +22,7 @@ import GHC.Hs.Binds import GHC.Hs.Decls import GHC.Hs.Expr import GHC.Hs.Lit -import GHC.Hs.Types +import GHC.Hs.Type import GHC.Hs.Pat import GHC.Hs.ImpExp @@ -369,7 +369,7 @@ deriving instance (Data body) => Data (HsRecFields GhcRn body) deriving instance (Data body) => Data (HsRecFields GhcTc body) -- --------------------------------------------------------------------- --- Data derivations from GHC.Hs.Types ---------------------------------- +-- Data derivations from GHC.Hs.Type ---------------------------------- -- deriving instance (DataIdLR p p) => Data (LHsQTyVars p) deriving instance Data (LHsQTyVars GhcPs) diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs index 7b279ef3e1..241e3c59e0 100644 --- a/compiler/GHC/Hs/Pat.hs +++ b/compiler/GHC/Hs/Pat.hs @@ -58,7 +58,7 @@ import {-# SOURCE #-} GHC.Hs.Expr (SyntaxExpr, LHsExpr, HsSplice, pprLExpr, pprS import GHC.Hs.Binds import GHC.Hs.Lit import GHC.Hs.Extension -import GHC.Hs.Types +import GHC.Hs.Type import GHC.Tc.Types.Evidence import GHC.Types.Basic -- others: diff --git a/compiler/GHC/Hs/Types.hs b/compiler/GHC/Hs/Type.hs index 2bb4d11240..977e790a97 100644 --- a/compiler/GHC/Hs/Types.hs +++ b/compiler/GHC/Hs/Type.hs @@ -3,7 +3,7 @@ (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -GHC.Hs.Types: Abstract syntax: user-defined types +GHC.Hs.Type: Abstract syntax: user-defined types -} {-# LANGUAGE DeriveDataTypeable #-} @@ -17,7 +17,7 @@ GHC.Hs.Types: Abstract syntax: user-defined types {-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} -module GHC.Hs.Types ( +module GHC.Hs.Type ( HsType(..), NewHsTypeX(..), LHsType, HsKind, LHsKind, HsTyVarBndr(..), LHsTyVarBndr, ForallVisFlag(..), LHsQTyVars(..), diff --git a/compiler/GHC/Hs/Utils.hs b/compiler/GHC/Hs/Utils.hs index 6301927b26..cbb21b1ad0 100644 --- a/compiler/GHC/Hs/Utils.hs +++ b/compiler/GHC/Hs/Utils.hs @@ -110,7 +110,7 @@ import GHC.Hs.Decls import GHC.Hs.Binds import GHC.Hs.Expr import GHC.Hs.Pat -import GHC.Hs.Types +import GHC.Hs.Type import GHC.Hs.Lit import GHC.Hs.Extension @@ -745,7 +745,7 @@ typeToLHsType ty argf_to_spec :: ArgFlag -> Specificity argf_to_spec Required = SpecifiedSpec - -- see Note [Specificity in HsForAllTy] in GHC.Hs.Types + -- see Note [Specificity in HsForAllTy] in GHC.Hs.Type argf_to_spec (Invisible s) = s go_tv :: TyVarBinder -> LHsTyVarBndr Specificity GhcPs diff --git a/compiler/GHC/HsToCore/Docs.hs b/compiler/GHC/HsToCore/Docs.hs index c14c2ac7e8..1aee1fbd68 100644 --- a/compiler/GHC/HsToCore/Docs.hs +++ b/compiler/GHC/HsToCore/Docs.hs @@ -14,7 +14,7 @@ import GHC.Hs.Binds import GHC.Hs.Doc import GHC.Hs.Decls import GHC.Hs.Extension -import GHC.Hs.Types +import GHC.Hs.Type import GHC.Hs.Utils import GHC.Types.Name import GHC.Types.Name.Set diff --git a/compiler/GHC/HsToCore/Quote.hs b/compiler/GHC/HsToCore/Quote.hs index e449b03a5d..d67f5b4509 100644 --- a/compiler/GHC/HsToCore/Quote.hs +++ b/compiler/GHC/HsToCore/Quote.hs @@ -1282,7 +1282,7 @@ repTy ty@(HsForAllTy { hst_fvf = fvf, hst_bndrs = tvs, hst_body = body }) = case fvf of ForallInvis -> repForallT ty ForallVis -> let tvs' = map ((<$>) (setHsTyVarBndrFlag ())) tvs - -- see Note [Specificity in HsForAllTy] in GHC.Hs.Types + -- see Note [Specificity in HsForAllTy] in GHC.Hs.Type in addHsTyVarBinds tvs' $ \bndrs -> do body1 <- repLTy body repTForallVis bndrs body1 diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y index c9b5f1f893..00ea6fbda8 100644 --- a/compiler/GHC/Parser.y +++ b/compiler/GHC/Parser.y @@ -3467,7 +3467,7 @@ qconop :: { Located RdrName } -- Type constructors --- See Note [Unit tuples] in GHC.Hs.Types for the distinction +-- See Note [Unit tuples] in GHC.Hs.Type for the distinction -- between gtycon and ntgtycon gtycon :: { Located RdrName } -- A "general" qualified tycon, including unit tuples : ntgtycon { $1 } diff --git a/compiler/GHC/Parser/PostProcess.hs b/compiler/GHC/Parser/PostProcess.hs index c0afde8242..88475120b8 100644 --- a/compiler/GHC/Parser/PostProcess.hs +++ b/compiler/GHC/Parser/PostProcess.hs @@ -974,7 +974,7 @@ checkTyClHdr is_cls ty arity = length ts tup_name | is_cls = cTupleTyConName arity | otherwise = getName (tupleTyCon Boxed arity) - -- See Note [Unit tuples] in GHC.Hs.Types (TODO: is this still relevant?) + -- See Note [Unit tuples] in GHC.Hs.Type (TODO: is this still relevant?) go l _ _ _ _ = addFatalError l (text "Malformed head of type or class declaration:" <+> ppr ty) diff --git a/compiler/GHC/Rename/HsType.hs b/compiler/GHC/Rename/HsType.hs index 35e683652e..5f82f6935a 100644 --- a/compiler/GHC/Rename/HsType.hs +++ b/compiler/GHC/Rename/HsType.hs @@ -101,7 +101,7 @@ data HsSigWcTypeScoping -- This only applies to RULES that do not explicitly bind their type -- variables. If a RULE explicitly quantifies its type variables, then -- 'NeverBind' is used instead. See also - -- @Note [Pattern signature binders and scoping]@ in "GHC.Hs.Types". + -- @Note [Pattern signature binders and scoping]@ in "GHC.Hs.Type". | BindUnlessForall -- ^ Unless there's forall at the top, do the same thing as 'AlwaysBind'. -- This is only ever used in places where the \"@forall@-or-nothing\" rule @@ -118,7 +118,7 @@ data HsSigWcTypeScoping -- but if the user had written @(y :: b)@ instead of @y@ in the term -- variable binders, then @b@ would be rejected for being out of scope. -- See also @Note [Pattern signature binders and scoping]@ in - -- "GHC.Hs.Types". + -- "GHC.Hs.Type". rnHsSigWcType :: HsDocContext -> Maybe SDoc @@ -143,7 +143,7 @@ rnHsPatSigType :: HsSigWcTypeScoping -- ScopedTypeVariables isn't enabled -- Wildcards are allowed -- --- See Note [Pattern signature binders and scoping] in GHC.Hs.Types +-- See Note [Pattern signature binders and scoping] in GHC.Hs.Type rnHsPatSigType scoping ctx inf_err sig_ty thing_inside = do { ty_sig_okay <- xoptM LangExt.ScopedTypeVariables ; checkErr ty_sig_okay (unexpectedPatSigTypeErr sig_ty) @@ -298,7 +298,7 @@ partition_nwcs free_vars ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Identifiers starting with an underscore are always parsed as type variables. It is only here in the renamer that we give the special treatment. -See Note [The wildcard story for types] in GHC.Hs.Types. +See Note [The wildcard story for types] in GHC.Hs.Type. It's easy! When we collect the implicitly bound type variables, ready to bring them into scope, and NamedWildCards is on, we partition the diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs index 328ed43d65..a3218936a6 100644 --- a/compiler/GHC/Tc/Gen/HsType.hs +++ b/compiler/GHC/Tc/Gen/HsType.hs @@ -427,7 +427,7 @@ argument, which we do not want because users should be able to write solution is to switch the PartialTypeSignatures flags here to let the typechecker know that it's checking a '@_' and do not emit hole constraints on it. See related Note [Wildcards in visible kind -application] and Note [The wildcard story for types] in GHC.Hs.Types +application] and Note [The wildcard story for types] in GHC.Hs.Type Ugh! @@ -772,7 +772,7 @@ tc_hs_type mode rn_ty@(HsListTy _ elt_ty) exp_kind ; checkWiredInTyCon listTyCon ; checkExpectedKind rn_ty (mkListTy tau_ty) liftedTypeKind exp_kind } --- See Note [Distinguishing tuple kinds] in GHC.Hs.Types +-- See Note [Distinguishing tuple kinds] in GHC.Hs.Type -- See Note [Inferring tuple kinds] tc_hs_type mode rn_ty@(HsTupleTy _ HsBoxedOrConstraintTuple hs_tys) exp_kind -- (NB: not zonking before looking at exp_k, to avoid left-right bias) @@ -953,7 +953,7 @@ And whenever we see a '@', we automatically turn on PartialTypeSignatures and turn off hole constraint warnings, and do not call emitAnonTypeHole under these conditions. See related Note [Wildcards in visible type application] here and -Note [The wildcard story for types] in GHC.Hs.Types +Note [The wildcard story for types] in GHC.Hs.Type Note [Skolem escape and forall-types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1842,7 +1842,7 @@ tcNamedWildCardBinders :: [Name] -> TcM a -- Bring into scope the /named/ wildcard binders. Remember that -- plain wildcards _ are anonymous and dealt with by HsWildCardTy --- Soe Note [The wildcard story for types] in GHC.Hs.Types +-- Soe Note [The wildcard story for types] in GHC.Hs.Type tcNamedWildCardBinders wc_names thing_inside = do { wcs <- mapM (const newWildTyVar) wc_names ; let wc_prs = wc_names `zip` wcs @@ -3390,7 +3390,7 @@ tcHsPatSigType :: UserTypeCtxt -- Used for type-checking type signatures in -- (a) patterns e.g f (x::Int) = e -- (b) RULE forall bndrs e.g. forall (x::Int). f x = x --- See Note [Pattern signature binders and scoping] in GHC.Hs.Types +-- See Note [Pattern signature binders and scoping] in GHC.Hs.Type -- -- This may emit constraints -- See Note [Recipe for checking a signature] diff --git a/compiler/GHC/Tc/Gen/Splice.hs b/compiler/GHC/Tc/Gen/Splice.hs index aa792ee6b7..8a7b1b0c7f 100644 --- a/compiler/GHC/Tc/Gen/Splice.hs +++ b/compiler/GHC/Tc/Gen/Splice.hs @@ -2128,7 +2128,7 @@ reify_for_all argf ty = do case argToForallVisFlag argf of ForallVis -> do phi' <- reifyType phi let tvs = map (() <$) tvbndrs' - -- see Note [Specificity in HsForAllTy] in GHC.Hs.Types + -- see Note [Specificity in HsForAllTy] in GHC.Hs.Type pure $ TH.ForallVisT tvs phi' ForallInvis -> do let (cxt, tau) = tcSplitPhiTy phi cxt' <- reifyCxt cxt diff --git a/compiler/GHC/Tc/Solver/Canonical.hs b/compiler/GHC/Tc/Solver/Canonical.hs index 57cf913aa4..4e828c919c 100644 --- a/compiler/GHC/Tc/Solver/Canonical.hs +++ b/compiler/GHC/Tc/Solver/Canonical.hs @@ -38,7 +38,7 @@ import GHC.Utils.Outputable import GHC.Driver.Session( DynFlags ) import GHC.Types.Name.Set import GHC.Types.Name.Reader -import GHC.Hs.Types( HsIPName(..) ) +import GHC.Hs.Type( HsIPName(..) ) import GHC.Data.Pair import GHC.Utils.Misc diff --git a/compiler/GHC/Tc/Utils/TcMType.hs b/compiler/GHC/Tc/Utils/TcMType.hs index 90598e42c4..d06307263d 100644 --- a/compiler/GHC/Tc/Utils/TcMType.hs +++ b/compiler/GHC/Tc/Utils/TcMType.hs @@ -554,7 +554,7 @@ tcInstTypeBndrs inst_tyvars id = where argf_to_spec :: VarBndr TyCoVar ArgFlag -> VarBndr TyCoVar Specificity argf_to_spec (Bndr tv Required) = Bndr tv SpecifiedSpec - -- see Note [Specificity in HsForAllTy] in GHC.Hs.Types + -- see Note [Specificity in HsForAllTy] in GHC.Hs.Type argf_to_spec (Bndr tv (Invisible s)) = Bndr tv s tcSkolDFunType :: DFunId -> TcM ([TcTyVar], TcThetaType, TcType) diff --git a/compiler/GHC/Tc/Utils/Unify.hs-boot b/compiler/GHC/Tc/Utils/Unify.hs-boot index 36f3367634..311dbf66aa 100644 --- a/compiler/GHC/Tc/Utils/Unify.hs-boot +++ b/compiler/GHC/Tc/Utils/Unify.hs-boot @@ -5,7 +5,7 @@ import GHC.Tc.Utils.TcType ( TcTauType ) import GHC.Tc.Types ( TcM ) import GHC.Tc.Types.Evidence ( TcCoercion ) import GHC.Hs.Expr ( HsExpr ) -import GHC.Hs.Types ( HsType ) +import GHC.Hs.Type ( HsType ) import GHC.Hs.Extension ( GhcRn ) -- This boot file exists only to tie the knot between diff --git a/compiler/GHC/ThToHs.hs b/compiler/GHC/ThToHs.hs index 359f8d0606..b6fb65df88 100644 --- a/compiler/GHC/ThToHs.hs +++ b/compiler/GHC/ThToHs.hs @@ -1482,7 +1482,7 @@ cvtTypeKind ty_str ty ForallVisT tvs ty | null tys' -> do { let tvs_spec = map (TH.SpecifiedSpec <$) tvs - -- see Note [Specificity in HsForAllTy] in GHC.Hs.Types + -- see Note [Specificity in HsForAllTy] in GHC.Hs.Type ; tvs_spec' <- cvtTvs tvs_spec ; ty' <- cvtType ty ; loc <- getL diff --git a/compiler/GHC/Types/Var.hs b/compiler/GHC/Types/Var.hs index e97038bf5c..8cd9a06a06 100644 --- a/compiler/GHC/Types/Var.hs +++ b/compiler/GHC/Types/Var.hs @@ -405,7 +405,7 @@ data ArgFlag = Invisible Specificity -- (<) on ArgFlag means "is less visible than" -- | Whether an 'Invisible' argument may appear in source Haskell. --- see Note [Specificity in HsForAllTy] in GHC.Hs.Types +-- see Note [Specificity in HsForAllTy] in GHC.Hs.Type data Specificity = InferredSpec -- ^ the argument may not appear in source Haskell, it is -- only inferred. |