summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2016-06-19 22:31:06 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2016-08-21 00:53:21 -0700
commit896d216d47cf185d071e0388acbbaef10abada88 (patch)
tree4fc36d1049446047add9ee98718134198872697e /compiler
parentb2c5e4ce5c44a7be7c2b81c2600cae40c5b225ad (diff)
downloadhaskell-896d216d47cf185d071e0388acbbaef10abada88.tar.gz
Annotate initIfaceCheck with usage information.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ghci/Linker.hs2
-rw-r--r--compiler/iface/MkIface.hs2
-rw-r--r--compiler/main/GhcMake.hs2
-rw-r--r--compiler/main/HscMain.hs2
-rw-r--r--compiler/typecheck/TcRnMonad.hs6
5 files changed, 7 insertions, 7 deletions
diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs
index f018a2e184..251d9a8700 100644
--- a/compiler/ghci/Linker.hs
+++ b/compiler/ghci/Linker.hs
@@ -610,7 +610,7 @@ getLinkDeps hsc_env hpt pls replace_osuf span mods
= return (uniqDSetToList acc_mods, uniqDSetToList acc_pkgs)
follow_deps (mod:mods) acc_mods acc_pkgs
= do
- mb_iface <- initIfaceCheck hsc_env $
+ mb_iface <- initIfaceCheck (text "getLinkDeps") hsc_env $
loadInterface msg mod (ImportByUser False)
iface <- case mb_iface of
Maybes.Failed err -> throwGhcExceptionIO (ProgramError (showSDoc dflags err))
diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs
index edab3508d1..e78975b27f 100644
--- a/compiler/iface/MkIface.hs
+++ b/compiler/iface/MkIface.hs
@@ -952,7 +952,7 @@ checkOldIface hsc_env mod_summary source_modified maybe_iface
showPass dflags $
"Checking old interface for " ++
(showPpr dflags $ ms_mod mod_summary)
- initIfaceCheck hsc_env $
+ initIfaceCheck (text "checkOldIface") hsc_env $
check_old_iface hsc_env mod_summary source_modified maybe_iface
check_old_iface
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index 93f1cd44bb..7f7773c72d 100644
--- a/compiler/main/GhcMake.hs
+++ b/compiler/main/GhcMake.hs
@@ -1422,7 +1422,7 @@ typecheckLoop dflags hsc_env mods = do
new_hpt <-
fixIO $ \new_hpt -> do
let new_hsc_env = hsc_env{ hsc_HPT = new_hpt }
- mds <- initIfaceCheck new_hsc_env $
+ mds <- initIfaceCheck (text "typecheckLoop") new_hsc_env $
mapM (typecheckIface . hm_iface) hmis
let new_hpt = addListToHpt old_hpt
(zip mods [ hmi{ hm_details = details }
diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs
index 94ab42e28c..9e4142b05c 100644
--- a/compiler/main/HscMain.hs
+++ b/compiler/main/HscMain.hs
@@ -739,7 +739,7 @@ genModDetails :: HscEnv -> ModIface -> IO ModDetails
genModDetails hsc_env old_iface
= do
new_details <- {-# SCC "tcRnIface" #-}
- initIfaceCheck hsc_env (typecheckIface old_iface)
+ initIfaceCheck (text "genModDetails") hsc_env (typecheckIface old_iface)
dumpIfaceStats hsc_env
return new_details
diff --git a/compiler/typecheck/TcRnMonad.hs b/compiler/typecheck/TcRnMonad.hs
index e8513d39b0..2e8985209e 100644
--- a/compiler/typecheck/TcRnMonad.hs
+++ b/compiler/typecheck/TcRnMonad.hs
@@ -1619,15 +1619,15 @@ initIfaceTcRn thing_inside
; get_type_env = readTcRef (tcg_type_env_var tcg_env) }
; setEnvs (if_env, ()) thing_inside }
-initIfaceCheck :: HscEnv -> IfG a -> IO a
+initIfaceCheck :: SDoc -> HscEnv -> IfG a -> IO a
-- Used when checking the up-to-date-ness of the old Iface
-- Initialise the environment with no useful info at all
-initIfaceCheck hsc_env do_this
+initIfaceCheck doc hsc_env do_this
= do let rec_types = case hsc_type_env_var hsc_env of
Just (mod,var) -> Just (mod, readTcRef var)
Nothing -> Nothing
gbl_env = IfGblEnv {
- if_doc = text "initIfaceCheck",
+ if_doc = text "initIfaceCheck" <+> doc,
if_rec_types = rec_types
}
initTcRnIf 'i' hsc_env gbl_env () do_this