summaryrefslogtreecommitdiff
path: root/compiler/iface/LoadIface.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/iface/LoadIface.hs')
-rw-r--r--compiler/iface/LoadIface.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs
index 75f2b6a24d..0890e20cff 100644
--- a/compiler/iface/LoadIface.hs
+++ b/compiler/iface/LoadIface.hs
@@ -870,6 +870,7 @@ readIface :: InstalledModule -> FilePath
readIface wanted_mod file_path
= do { res <- tryMostM $
readBinIface CheckHiWay QuietBinIFaceReading file_path
+ ; dflags <- getDynFlags
; case res of
Right iface
-- Same deal
@@ -878,7 +879,7 @@ readIface wanted_mod file_path
| otherwise -> return (Failed err)
where
actual_mod = mi_module iface
- err = hiModuleNameMismatchWarn wanted_mod actual_mod
+ err = hiModuleNameMismatchWarn dflags wanted_mod actual_mod
Left exn -> return (Failed (text (showException exn)))
}
@@ -973,7 +974,8 @@ showIface hsc_env filename = do
iface <- initTcRnIf 's' hsc_env () () $
readBinIface IgnoreHiWay TraceBinIFaceReading filename
let dflags = hsc_dflags hsc_env
- log_action dflags dflags NoReason SevDump noSrcSpan defaultDumpStyle (pprModIface iface)
+ log_action dflags dflags NoReason SevDump noSrcSpan
+ (defaultDumpStyle dflags) (pprModIface iface)
-- Show a ModIface but don't display details; suitable for ModIfaces stored in
-- the EPT.
@@ -1128,11 +1130,11 @@ badIfaceFile file err
= vcat [text "Bad interface file:" <+> text file,
nest 4 err]
-hiModuleNameMismatchWarn :: InstalledModule -> Module -> MsgDoc
-hiModuleNameMismatchWarn requested_mod read_mod =
+hiModuleNameMismatchWarn :: DynFlags -> InstalledModule -> Module -> MsgDoc
+hiModuleNameMismatchWarn dflags requested_mod read_mod =
-- ToDo: This will fail to have enough qualification when the package IDs
-- are the same
- withPprStyle (mkUserStyle alwaysQualify AllTheWay) $
+ withPprStyle (mkUserStyle dflags alwaysQualify AllTheWay) $
-- we want the Modules below to be qualified with package names,
-- so reset the PrintUnqualified setting.
hsep [ text "Something is amiss; requested module "