-- interface; it will call the Finder again, but the ModLocation will be
-- cached from the first search.
hsc_env <- getTopEnv
-- interface; it will call the Finder again, but the ModLocation will be
-- cached from the first search.
hsc_env <- getTopEnv
-- The (src_imp == mi_boot iface) test checks that the already-loaded
-- interface isn't a boot iface. This can conceivably happen,
-- if an earlier import had a before we got to real imports. I think.
-- The (src_imp == mi_boot iface) test checks that the already-loaded
-- interface isn't a boot iface. This can conceivably happen,
-- if an earlier import had a before we got to real imports. I think.
-- Not found, so add an empty iface to
-- the EPS map so that we don't look again
-- Not found, so add an empty iface to
-- the EPS map so that we don't look again
modulePackageId (mi_module iface) == thisPackage dflags,
-- a home-package module...
Nothing <- mb_dep -- that we know nothing about
modulePackageId (mi_module iface) == thisPackage dflags,
-- a home-package module...
Nothing <- mb_dep -- that we know nothing about
-- uses the invariant that implicit_names and
-- implictTyThings are bijective
[(n, lookup n) | n <- implicit_names]
-- uses the invariant that implicit_names and
-- implictTyThings are bijective
[(n, lookup n) | n <- implicit_names]
else do {
; traceIf (ptext SLIT("readIFace") <+> text file_path)
; read_result <- readIface mod file_path hi_boot_file
; case read_result of
else do {
; traceIf (ptext SLIT("readIFace") <+> text file_path)
; read_result <- readIface mod file_path hi_boot_file
; case read_result of
-- | Read binary interface, and print it out
showIface :: HscEnv -> FilePath -> IO ()
showIface hsc_env filename = do
-- | Read binary interface, and print it out
showIface :: HscEnv -> FilePath -> IO ()
showIface hsc_env filename = do
= vcat [ ptext SLIT("interface")
<+> ppr (mi_module iface) <+> pp_boot
<+> ppr (mi_mod_vers iface) <+> pp_sub_vers
= vcat [ ptext SLIT("interface")
<+> ppr (mi_module iface) <+> pp_boot
<+> ppr (mi_mod_vers iface) <+> pp_sub_vers
<+> (if mi_orphan iface then ptext SLIT("[orphan module]") else empty)
<+> (if mi_finsts iface then ptext SLIT("[family instance module]") else empty)
<+> (if mi_hpc iface then ptext SLIT("[hpc]") else empty)
<+> (if mi_orphan iface then ptext SLIT("[orphan module]") else empty)
<+> (if mi_finsts iface then ptext SLIT("[family instance module]") else empty)
<+> (if mi_hpc iface then ptext SLIT("[hpc]") else empty)