X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fiface%2FLoadIface.lhs;h=ecba1d62828f83fa3059cdf3ae8d5de0c83eb464;hb=26637fd8651f55fd424f3f6190220335ab5b80e9;hp=8bcf987c999cea089c051089c705b625529a37b3;hpb=61d2625ae2e6a4cdae2ffc92df828905e81c24cc;p=ghc-hetmet.git diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs index 8bcf987..ecba1d6 100644 --- a/compiler/iface/LoadIface.lhs +++ b/compiler/iface/LoadIface.lhs @@ -48,7 +48,7 @@ import SrcLoc ( importedSrcLoc ) import Maybes ( MaybeErr(..) ) import ErrUtils ( Message ) import Finder ( findImportedModule, findExactModule, - FindResult(..), cantFindError ) + FindResult(..), cannotFindInterface ) import UniqFM import Outputable import BinIface ( readBinIface ) @@ -81,14 +81,11 @@ loadSrcInterface doc mod want_boot = do Found _ mod -> do mb_iface <- initIfaceTcRn $ loadInterface doc mod (ImportByUser want_boot) case mb_iface of - Failed err -> failWithTc (elaborate err) + Failed err -> failWithTc err Succeeded iface -> return iface err -> let dflags = hsc_dflags hsc_env in - failWithTc (elaborate (cantFindError dflags mod err)) - where - elaborate err = hang (ptext SLIT("Failed to load interface for") <+> - quotes (ppr mod) <> colon) 4 err + failWithTc (cannotFindInterface dflags mod err) -- | Load interfaces for a collection of orphan modules. loadOrphanModules :: [Module] -> TcM () @@ -315,7 +312,8 @@ loadDecl ignore_prags mod (_version, decl) -- imported name, to fix the module correctly in the cache mk_new_bndr mod mb_parent occ = newGlobalBinder mod occ mb_parent - (importedSrcLoc (showSDoc (pprModule mod))) + (importedSrcLoc (showSDoc (ppr (moduleName mod)))) + -- ToDo: qualify with the package name if necessary doc = ptext SLIT("Declaration for") <+> ppr (ifName decl) @@ -419,7 +417,8 @@ findAndReadIface doc_str mod hi_boot_file Failed err -> do { traceIf (ptext SLIT("...not found")) ; dflags <- getDOpts - ; returnM (Failed (cantFindError dflags (moduleName mod) err)) } ; + ; returnM (Failed (cannotFindInterface dflags + (moduleName mod) err)) } ; Succeeded file_path -> do