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

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


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

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

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

commit a4cfa04b698aad140b23b43f7b97dcb152f8e743
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Sep 10 10:39:08 2017 -0400

    Debug


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

a4cfa04b698aad140b23b43f7b97dcb152f8e743
 compiler/typecheck/TcTyClsDecls.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs
index 30dd15e..79034d9 100644
--- a/compiler/typecheck/TcTyClsDecls.hs
+++ b/compiler/typecheck/TcTyClsDecls.hs
@@ -2522,7 +2522,8 @@ 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 = expectJust "checkValidDataCon" $
+                      tv_index = pprTrace "checkValidDataCon" (ppr eq_tv $$ ppr univ_tvs) $
+                                 expectJust "checkValidDataCon" $
                                  elemIndex eq_tv univ_tvs
                       tc_bndr  = tc_bndrs `getNth` tv_index
                   in



More information about the ghc-commits mailing list