summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Utils/TcMType.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Tc/Utils/TcMType.hs')
-rw-r--r--compiler/GHC/Tc/Utils/TcMType.hs10
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/GHC/Tc/Utils/TcMType.hs b/compiler/GHC/Tc/Utils/TcMType.hs
index 6326152797..cc8ac8f737 100644
--- a/compiler/GHC/Tc/Utils/TcMType.hs
+++ b/compiler/GHC/Tc/Utils/TcMType.hs
@@ -543,14 +543,8 @@ tcInstTypeBndrs :: ([VarBndr TyVar Specificity] -> TcM (TCvSubst, [VarBndr TcTyV
-> TcM ([(Name, VarBndr TcTyVar Specificity)], TcThetaType, TcType) -- ^ Result
-- (type vars, preds (incl equalities), rho)
tcInstTypeBndrs inst_tyvars id =
- let (tyvars, rho) = splitForAllVarBndrs (idType id)
- tyvars' = map argf_to_spec tyvars
- in tc_inst_internal inst_tyvars tyvars' rho
- 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.Type
- argf_to_spec (Bndr tv (Invisible s)) = Bndr tv s
+ let (tyvars, rho) = splitForAllTysInvis (idType id)
+ in tc_inst_internal inst_tyvars tyvars rho
tcSkolDFunType :: DFunId -> TcM ([TcTyVar], TcThetaType, TcType)
-- Instantiate a type signature with skolem constants.