summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Module.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Tc/Module.hs')
-rw-r--r--compiler/GHC/Tc/Module.hs16
1 files changed, 6 insertions, 10 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs
index 1d77f1b593..505f0dd627 100644
--- a/compiler/GHC/Tc/Module.hs
+++ b/compiler/GHC/Tc/Module.hs
@@ -79,7 +79,6 @@ import GHC.Tc.Gen.Default
import GHC.Tc.Utils.Env
import GHC.Tc.Gen.Rule
import GHC.Tc.Gen.Foreign
-import GHC.Tc.TyCl.Class ( ClassScopedTVEnv )
import GHC.Tc.TyCl.Instance
import GHC.Tc.Utils.TcMType
import GHC.Tc.Utils.TcType
@@ -712,7 +711,7 @@ tcRnHsBootDecls hsc_src decls
-- Typecheck type/class/instance decls
; traceTc "Tc2 (boot)" empty
- ; (tcg_env, inst_infos, _deriv_binds, _class_scoped_tv_env, _th_bndrs)
+ ; (tcg_env, inst_infos, _deriv_binds, _th_bndrs)
<- tcTyClsInstDecls tycl_decls deriv_decls val_binds
; setGblEnv tcg_env $ do {
@@ -1471,7 +1470,7 @@ tcTopSrcDecls (HsGroup { hs_tyclds = tycl_decls,
-- Source-language instances, including derivings,
-- and import the supporting declarations
traceTc "Tc3" empty ;
- (tcg_env, inst_infos, class_scoped_tv_env, th_bndrs,
+ (tcg_env, inst_infos, th_bndrs,
XValBindsLR (NValBinds deriv_binds deriv_sigs))
<- tcTyClsInstDecls tycl_decls deriv_decls val_binds ;
@@ -1514,8 +1513,7 @@ tcTopSrcDecls (HsGroup { hs_tyclds = tycl_decls,
-- Second pass over class and instance declarations,
-- now using the kind-checked decls
traceTc "Tc6" empty ;
- inst_binds <- tcInstDecls2 (tyClGroupTyClDecls tycl_decls)
- inst_infos class_scoped_tv_env ;
+ inst_binds <- tcInstDecls2 (tyClGroupTyClDecls tycl_decls) inst_infos ;
-- Foreign exports
traceTc "Tc7" empty ;
@@ -1754,7 +1752,6 @@ tcTyClsInstDecls :: [TyClGroup GhcRn]
[InstInfo GhcRn], -- Source-code instance decls to
-- process; contains all dfuns for
-- this module
- ClassScopedTVEnv, -- Class scoped type variables
ThBindEnv, -- TH binding levels
HsValBinds GhcRn) -- Supporting bindings for derived
-- instances
@@ -1762,7 +1759,7 @@ tcTyClsInstDecls :: [TyClGroup GhcRn]
tcTyClsInstDecls tycl_decls deriv_decls binds
= tcAddDataFamConPlaceholders (tycl_decls >>= group_instds) $
tcAddPatSynPlaceholders (getPatSynBinds binds) $
- do { (tcg_env, inst_info, deriv_info, class_scoped_tv_env, th_bndrs)
+ do { (tcg_env, inst_info, deriv_info, th_bndrs)
<- tcTyAndClassDecls tycl_decls ;
; setGblEnv tcg_env $ do {
-- With the @TyClDecl@s and @InstDecl@s checked we're ready to
@@ -1776,8 +1773,7 @@ tcTyClsInstDecls tycl_decls deriv_decls binds
<- tcInstDeclsDeriv deriv_info deriv_decls
; setGblEnv tcg_env' $ do {
failIfErrsM
- ; pure ( tcg_env', inst_info' ++ inst_info
- , class_scoped_tv_env, th_bndrs, val_binds )
+ ; pure ( tcg_env', inst_info' ++ inst_info, th_bndrs, val_binds )
}}}
{- *********************************************************************
@@ -2654,7 +2650,7 @@ tcRnType hsc_env flexi normalise rdr_type
; massertPpr (isEmptyBag empty_binds) (ppr empty_binds)
-- Do kind generalisation; see Note [Kind-generalise in tcRnType]
- ; kvs <- kindGeneralizeAll kind
+ ; kvs <- kindGeneralizeAll unkSkol kind
; e <- mkEmptyZonkEnv flexi
; ty <- zonkTcTypeToTypeX e ty