X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FFinder.lhs;h=ac0eff8e2b0e11b91aa1cb5a4d5647f650b5003b;hb=9d0c8f842e35dde3d570580cf62a32779f66a6de;hp=7587bb30eb12010c80215de3fd9db4e406d7e4dd;hpb=ef03a76a01e538ccae5239dce00c583e9da17984;p=ghc-hetmet.git diff --git a/compiler/main/Finder.lhs b/compiler/main/Finder.lhs index 7587bb3..ac0eff8 100644 --- a/compiler/main/Finder.lhs +++ b/compiler/main/Finder.lhs @@ -535,17 +535,20 @@ findObjectLinkable mod obj_fn obj_time = do cannotFindModule :: DynFlags -> ModuleName -> FindResult -> SDoc cannotFindModule = cantFindErr (sLit "Could not find module") + (sLit "Ambiguous module name") cannotFindInterface :: DynFlags -> ModuleName -> FindResult -> SDoc cannotFindInterface = cantFindErr (sLit "Failed to load interface for") + (sLit "Ambiguous interface for") -cantFindErr :: LitString -> DynFlags -> ModuleName -> FindResult -> SDoc -cantFindErr cannot_find _dflags mod_name (FoundMultiple pkgs) - = hang (ptext cannot_find <+> quotes (ppr mod_name) <> colon) 2 ( +cantFindErr :: LitString -> LitString -> DynFlags -> ModuleName -> FindResult + -> SDoc +cantFindErr _ multiple_found _ mod_name (FoundMultiple pkgs) + = hang (ptext multiple_found <+> quotes (ppr mod_name) <> colon) 2 ( sep [ptext (sLit "it was found in multiple packages:"), hsep (map (text.packageIdString) pkgs)] ) -cantFindErr cannot_find dflags mod_name find_result +cantFindErr cannot_find _ dflags mod_name find_result = hang (ptext cannot_find <+> quotes (ppr mod_name) <> colon) 2 more_info where