From 802b299f16593e95deb6cc2bd5d457444ed92fd1 Mon Sep 17 00:00:00 2001 From: simonpj Date: Fri, 21 Feb 2003 12:16:45 +0000 Subject: [PATCH] [project @ 2003-02-21 12:16:44 by simonpj] Debugging hook jiggling --- ghc/compiler/typecheck/Inst.lhs | 4 ++-- ghc/compiler/typecheck/TcRnDriver.lhs | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ghc/compiler/typecheck/Inst.lhs b/ghc/compiler/typecheck/Inst.lhs index cd189a5..7b94e17 100644 --- a/ghc/compiler/typecheck/Inst.lhs +++ b/ghc/compiler/typecheck/Inst.lhs @@ -504,11 +504,11 @@ tidyMoreInsts env insts tidyInsts :: [Inst] -> (TidyEnv, [Inst]) tidyInsts insts = tidyMoreInsts emptyTidyEnv insts -showLIE :: String -> TcM () -- Debugging +showLIE :: SDoc -> TcM () -- Debugging showLIE str = do { lie_var <- getLIEVar ; lie <- readMutVar lie_var ; - traceTc (text str <+> pprInstsInFull (lieToList lie)) } + traceTc (str <+> pprInstsInFull (lieToList lie)) } \end{code} diff --git a/ghc/compiler/typecheck/TcRnDriver.lhs b/ghc/compiler/typecheck/TcRnDriver.lhs index 95e8a9e..830dcc2 100644 --- a/ghc/compiler/typecheck/TcRnDriver.lhs +++ b/ghc/compiler/typecheck/TcRnDriver.lhs @@ -709,12 +709,16 @@ monad; it augments it and returns the new TcGblEnv. tcRnGroup :: HsGroup RdrName -> TcM ((TcGblEnv, TcLclEnv), FreeVars) -- Returns the variables free in the decls, for unused-binding reporting tcRnGroup decls - = do { -- Rename the declarations + = do { showLIE (text "start of tcRnGroup" ++ ppr decls) ; + + -- Rename the declarations (tcg_env, rn_decls, src_fvs) <- rnTopSrcDecls decls ; setGblEnv tcg_env $ do { -- Typecheck the declarations tc_envs <- tcTopSrcDecls rn_decls ; + + showLIE (text "end of tcRnGroup" ++ ppr decls) return (tc_envs, src_fvs) }} @@ -797,7 +801,7 @@ tcTopSrcDecls (cls_dm_binds, dm_ids) <- tcClassDecls2 tycl_decls ; tcExtendGlobalValEnv dm_ids $ do { inst_binds <- tcInstDecls2 inst_infos ; - showLIE "after instDecls2" ; + showLIE (text "after instDecls2") ; -- Foreign exports -- They need to be zonked, so we return them -- 1.7.10.4