diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-09-13 19:20:09 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-09-18 10:20:34 -0400 |
commit | 55b48cc29edace56bf2d1c8465f56c0cd90580bc (patch) | |
tree | 80d61b2ad102f8a7b641ec9c7cc87a4e0b0c17c5 | |
parent | a4cfa04b698aad140b23b43f7b97dcb152f8e743 (diff) | |
download | haskell-wip/rae-kind-gadts.tar.gz |
Debugwip/rae-kind-gadts
-rw-r--r-- | compiler/typecheck/TcHsType.hs | 3 | ||||
-rw-r--r-- | compiler/typecheck/TcTyClsDecls.hs | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs index 4fd561e65c..52ebcf5dfd 100644 --- a/compiler/typecheck/TcHsType.hs +++ b/compiler/typecheck/TcHsType.hs @@ -1680,7 +1680,8 @@ kindGeneralize :: TcType -> TcM [KindVar] -- In the latter case the type is closed, so it has no free -- type variables. So in both cases, all the free vars are kind vars kindGeneralize kind_or_type - = do { kvs <- zonkTcTypeAndFV kind_or_type + = --pprTrace "kindGeneralize" (ppr kind_or_type) $ + do { kvs <- zonkTcTypeAndFV kind_or_type ; let dvs = DV { dv_kvs = kvs, dv_tvs = emptyDVarSet } ; gbl_tvs <- tcGetGlobalTyCoVars -- Already zonked ; quantifyTyVars gbl_tvs dvs } diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs index 79034d9adb..1f435d2e16 100644 --- a/compiler/typecheck/TcTyClsDecls.hs +++ b/compiler/typecheck/TcTyClsDecls.hs @@ -2512,7 +2512,8 @@ checkValidDataCon dflags existential_ok tc con (badExistential con) ; typeintype <- xoptM LangExt.TypeInType - ; let invisible_gadt_eq_specs = filter is_invisible_eq_spec (dataConEqSpec con) + ; let invisible_gadt_eq_specs = pprTrace "checkValidDataCon2" (ppr (dataConEqSpec con) $$ ppr (dataConExTyVars con) $$ ppr univ_tvs $$ ppr tc_bndrs) + $ filter is_invisible_eq_spec (dataConEqSpec con) univ_tvs = dataConUnivTyVars con tc_bndrs = tyConBinders tc @@ -2522,7 +2523,7 @@ checkValidDataCon dflags existential_ok tc con -- See Note [Wrong visibility for GADTs], though. is_invisible_eq_spec eq_spec = let eq_tv = eqSpecTyVar eq_spec - tv_index = pprTrace "checkValidDataCon" (ppr eq_tv $$ ppr univ_tvs) $ + tv_index = pprTrace "checkValidDataCon" (ppr con $$ ppr eq_tv $$ ppr univ_tvs) $ expectJust "checkValidDataCon" $ elemIndex eq_tv univ_tvs tc_bndr = tc_bndrs `getNth` tv_index |