[commit: ghc] wip/rae-kind-gadts: Debug (55b48cc)

git at git.haskell.org git at git.haskell.org
Mon Sep 18 14:21:18 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/rae-kind-gadts
Link       : http://ghc.haskell.org/trac/ghc/changeset/55b48cc29edace56bf2d1c8465f56c0cd90580bc/ghc

>---------------------------------------------------------------

commit 55b48cc29edace56bf2d1c8465f56c0cd90580bc
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Wed Sep 13 19:20:09 2017 -0400

    Debug


>---------------------------------------------------------------

55b48cc29edace56bf2d1c8465f56c0cd90580bc
 compiler/typecheck/TcHsType.hs     | 3 ++-
 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 4fd561e..52ebcf5 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 79034d9..1f435d2 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



More information about the ghc-commits mailing list