summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcTyClsDecls.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-07-09 17:27:47 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2018-07-10 09:28:43 +0100
commit03d726837ad3a73133fee26de86dd57544f2d757 (patch)
treedae3785431c0f350b4e5d196c4489843f6f6bfaf /compiler/typecheck/TcTyClsDecls.hs
parentaedbf7f1c402ecbcb5ff192d5fb4dd6dd4771bf8 (diff)
downloadhaskell-03d726837ad3a73133fee26de86dd57544f2d757.tar.gz
More tc-tracing
And I added some HasDebugCallStack constraints to tcExpectedKind and related functions too.
Diffstat (limited to 'compiler/typecheck/TcTyClsDecls.hs')
-rw-r--r--compiler/typecheck/TcTyClsDecls.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs
index a1c3d43f2a..f212fdd5bb 100644
--- a/compiler/typecheck/TcTyClsDecls.hs
+++ b/compiler/typecheck/TcTyClsDecls.hs
@@ -1563,17 +1563,17 @@ kcFamTyPats :: TcTyCon
kcFamTyPats tc_fam_tc tv_names arg_pats kind_checker
= discardResult $
kcImplicitTKBndrs tv_names $
- do { let loc = nameSrcSpan name
- lhs_fun = L loc (HsTyVar noExt NotPromoted (L loc name))
- -- lhs_fun is for error messages only
- no_fun = pprPanic "kcFamTyPats" (ppr name)
+ do { let name = tyConName tc_fam_tc
+ loc = nameSrcSpan name
+ lhs_fun = L loc (HsTyVar noExt NotPromoted (L loc name))
+ -- lhs_fun is for error messages only
+ no_fun = pprPanic "kcFamTyPats" (ppr name)
fun_kind = tyConKind tc_fam_tc
; (_, _, res_kind_out) <- tcInferApps typeLevelMode Nothing lhs_fun no_fun
fun_kind arg_pats
+ ; traceTc "kcFamTyPats" (vcat [ ppr tc_fam_tc, ppr arg_pats, ppr res_kind_out ])
; kind_checker res_kind_out }
- where
- name = tyConName tc_fam_tc
tcFamTyPats :: TyCon
-> Maybe ClsInstInfo
@@ -1628,6 +1628,8 @@ tcFamTyPats fam_tc mb_clsinfo
<- tcInferApps typeLevelMode mb_kind_env
lhs_fun fun_ty fun_kind arg_pats
+ ; traceTc "tcFamTyPats 1" (vcat [ ppr fam_tc, ppr arg_pats, ppr res_kind_out ])
+
; stuff <- kind_checker res_kind_out
; return (args, stuff) }