summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2015-07-21 16:51:51 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2015-07-22 13:04:04 -0700
commit0b12aca09efd4c151a8c2682b7534bda9bdc99ad (patch)
treef8620d05c2285898ff35b03e218caf6e27fc36cc /compiler/iface
parentcf57f8f9e9a649d7ffdfe0be09e503f6ed468a5d (diff)
downloadhaskell-0b12aca09efd4c151a8c2682b7534bda9bdc99ad.tar.gz
Switch from recording IsBootInterface to recording full HscSource.
Note: ModIface format change is BC, no need to recompile. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/LoadIface.hs7
-rw-r--r--compiler/iface/MkIface.hs12
2 files changed, 10 insertions, 9 deletions
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs
index 5250c4f0fa..ad813578c4 100644
--- a/compiler/iface/LoadIface.hs
+++ b/compiler/iface/LoadIface.hs
@@ -911,7 +911,7 @@ pprModIface :: ModIface -> SDoc
-- Show a ModIface
pprModIface iface
= vcat [ ptext (sLit "interface")
- <+> ppr (mi_module iface) <+> pp_boot
+ <+> ppr (mi_module iface) <+> pp_hsc_src (mi_hsc_src iface)
<+> (if mi_orphan iface then ptext (sLit "[orphan module]") else Outputable.empty)
<+> (if mi_finsts iface then ptext (sLit "[family instance module]") else Outputable.empty)
<+> (if mi_hpc iface then ptext (sLit "[hpc]") else Outputable.empty)
@@ -940,8 +940,9 @@ pprModIface iface
, pprTrustPkg (mi_trust_pkg iface)
]
where
- pp_boot | mi_boot iface = ptext (sLit "[boot]")
- | otherwise = Outputable.empty
+ pp_hsc_src HsBootFile = ptext (sLit "[boot]")
+ pp_hsc_src HsigFile = ptext (sLit "[hsig]")
+ pp_hsc_src HsSrcFile = Outputable.empty
{-
When printing export lists, we print like this:
diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs
index a493da988d..753c81a8a0 100644
--- a/compiler/iface/MkIface.hs
+++ b/compiler/iface/MkIface.hs
@@ -142,7 +142,7 @@ mkIface :: HscEnv
mkIface hsc_env maybe_old_fingerprint mod_details
ModGuts{ mg_module = this_mod,
- mg_boot = is_boot,
+ mg_hsc_src = hsc_src,
mg_used_names = used_names,
mg_used_th = used_th,
mg_deps = deps,
@@ -156,7 +156,7 @@ mkIface hsc_env maybe_old_fingerprint mod_details
mg_dependent_files = dependent_files
}
= mkIface_ hsc_env maybe_old_fingerprint
- this_mod is_boot used_names used_th deps rdr_env fix_env
+ this_mod hsc_src used_names used_th deps rdr_env fix_env
warns hpc_info dir_imp_mods self_trust dependent_files
safe_mode mod_details
@@ -187,7 +187,7 @@ mkIfaceTc hsc_env maybe_old_fingerprint safe_mode mod_details
used_th <- readIORef tc_splice_used
dep_files <- (readIORef dependent_files)
mkIface_ hsc_env maybe_old_fingerprint
- this_mod (hsc_src == HsBootFile) used_names
+ this_mod hsc_src used_names
used_th deps rdr_env
fix_env warns hpc_info (imp_mods imports)
(imp_trust_own_pkg imports) dep_files safe_mode mod_details
@@ -231,7 +231,7 @@ mkDependencies
-- sort to get into canonical order
-- NB. remember to use lexicographic ordering
-mkIface_ :: HscEnv -> Maybe Fingerprint -> Module -> IsBootInterface
+mkIface_ :: HscEnv -> Maybe Fingerprint -> Module -> HscSource
-> NameSet -> Bool -> Dependencies -> GlobalRdrEnv
-> NameEnv FixItem -> Warnings -> HpcInfo
-> ImportedMods -> Bool
@@ -240,7 +240,7 @@ mkIface_ :: HscEnv -> Maybe Fingerprint -> Module -> IsBootInterface
-> ModDetails
-> IO (Messages, Maybe (ModIface, Bool))
mkIface_ hsc_env maybe_old_fingerprint
- this_mod is_boot used_names used_th deps rdr_env fix_env src_warns
+ this_mod hsc_src used_names used_th deps rdr_env fix_env src_warns
hpc_info dir_imp_mods pkg_trust_req dependent_files safe_mode
ModDetails{ md_insts = insts,
md_fam_insts = fam_insts,
@@ -281,7 +281,7 @@ mkIface_ hsc_env maybe_old_fingerprint
intermediate_iface = ModIface {
mi_module = this_mod,
mi_sig_of = sig_of,
- mi_boot = is_boot,
+ mi_hsc_src = hsc_src,
mi_deps = deps,
mi_usages = usages,
mi_exports = mkIfaceExports exports,