summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2022-12-04 21:50:40 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-01-05 23:01:55 -0500
commit9e077999eb3d09af6f31eb92233d4d757ece75f8 (patch)
tree295211c6306683eb4c41455bf9900f8fc3038267 /compiler/GHC/Tc
parent22bb89989fc0a907ef6b8f6ae99aa8907f67e438 (diff)
downloadhaskell-9e077999eb3d09af6f31eb92233d4d757ece75f8.tar.gz
HsToken in TypeArg (#19623)
Updates the haddock submodule.
Diffstat (limited to 'compiler/GHC/Tc')
-rw-r--r--compiler/GHC/Tc/Gen/HsType.hs16
-rw-r--r--compiler/GHC/Tc/Gen/Sig.hs2
-rw-r--r--compiler/GHC/Tc/TyCl.hs2
3 files changed, 10 insertions, 10 deletions
diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs
index a0a2a51cee..0ea0412339 100644
--- a/compiler/GHC/Tc/Gen/HsType.hs
+++ b/compiler/GHC/Tc/Gen/HsType.hs
@@ -1517,11 +1517,11 @@ splitHsAppTys hs_ty
is_app _ = False
go :: LHsType GhcRn
- -> [HsArg (LHsType GhcRn) (LHsKind GhcRn)]
+ -> [HsArg GhcRn (LHsType GhcRn) (LHsKind GhcRn)]
-> (LHsType GhcRn,
- [HsArg (LHsType GhcRn) (LHsKind GhcRn)]) -- AZ temp
+ [HsArg GhcRn (LHsType GhcRn) (LHsKind GhcRn)]) -- AZ temp
go (L _ (HsAppTy _ f a)) as = go f (HsValArg a : as)
- go (L _ (HsAppKindTy l ty k)) as = go ty (HsTypeArg l k : as)
+ go (L _ (HsAppKindTy _ ty at k)) as = go ty (HsTypeArg at k : as)
go (L sp (HsParTy _ f)) as = go f (HsArgPar (locA sp) : as)
go (L _ (HsOpTy _ prom l op@(L sp _) r)) as
= ( L (na2la sp) (HsTyVar noAnn prom op)
@@ -1698,7 +1698,7 @@ tcInferTyApps_nosat mode orig_hs_ty fun orig_hs_args
substed_fun_ki = substTy subst fun_ki
hs_ty = appTypeToArg orig_hs_ty (take (n-1) orig_hs_args)
- n_initial_val_args :: [HsArg tm ty] -> Arity
+ n_initial_val_args :: [HsArg p tm ty] -> Arity
-- Count how many leading HsValArgs we have
n_initial_val_args (HsValArg {} : args) = 1 + n_initial_val_args args
n_initial_val_args (HsArgPar {} : args) = n_initial_val_args args
@@ -1890,10 +1890,10 @@ unsaturated arguments: see #11246. Hence doing this in tcInferApps.
appTypeToArg :: LHsType GhcRn -> [LHsTypeArg GhcRn] -> LHsType GhcRn
appTypeToArg f [] = f
-appTypeToArg f (HsValArg arg : args) = appTypeToArg (mkHsAppTy f arg) args
-appTypeToArg f (HsArgPar _ : args) = appTypeToArg f args
-appTypeToArg f (HsTypeArg l arg : args)
- = appTypeToArg (mkHsAppKindTy l f arg) args
+appTypeToArg f (HsValArg arg : args) = appTypeToArg (mkHsAppTy f arg) args
+appTypeToArg f (HsArgPar _ : args) = appTypeToArg f args
+appTypeToArg f (HsTypeArg at arg : args)
+ = appTypeToArg (mkHsAppKindTy f at arg) args
{- *********************************************************************
diff --git a/compiler/GHC/Tc/Gen/Sig.hs b/compiler/GHC/Tc/Gen/Sig.hs
index 0c74bd54f6..77d61941fc 100644
--- a/compiler/GHC/Tc/Gen/Sig.hs
+++ b/compiler/GHC/Tc/Gen/Sig.hs
@@ -299,7 +299,7 @@ no_anon_wc_ty lty = go lty
go (L _ ty) = case ty of
HsWildCardTy _ -> False
HsAppTy _ ty1 ty2 -> go ty1 && go ty2
- HsAppKindTy _ ty ki -> go ty && go ki
+ HsAppKindTy _ ty _ ki -> go ty && go ki
HsFunTy _ w ty1 ty2 -> go ty1 && go ty2 && go (arrowToHsType w)
HsListTy _ ty -> go ty
HsTupleTy _ _ tys -> gos tys
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs
index 32c64b6c7f..19b19e36c7 100644
--- a/compiler/GHC/Tc/TyCl.hs
+++ b/compiler/GHC/Tc/TyCl.hs
@@ -3045,7 +3045,7 @@ tcTyFamInstEqn fam_tc mb_clsinfo
(map (const Nominal) qtvs)
(locA loc)) }
-checkTyFamInstEqn :: TcTyCon -> Name -> [HsArg tm ty] -> TcM ()
+checkTyFamInstEqn :: TcTyCon -> Name -> [HsArg p tm ty] -> TcM ()
checkTyFamInstEqn tc_fam_tc eqn_tc_name hs_pats =
do { -- Ensure that each equation's type constructor is for the right
-- type family. E.g. barf on