X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FLinker.lhs;h=5d01b9a71fb2164facbfa3ba249aa2b2d7445649;hb=ae6bd0bc7488bd26e93f8f9cbe3d04ed2d96d1b6;hp=459fbd9e908c48431b468241805f70b7869ace8a;hpb=c735a21acf3e478df36f630cf224dcb3755db485;p=ghc-hetmet.git diff --git a/compiler/ghci/Linker.lhs b/compiler/ghci/Linker.lhs index 459fbd9..5d01b9a 100644 --- a/compiler/ghci/Linker.lhs +++ b/compiler/ghci/Linker.lhs @@ -456,21 +456,20 @@ preloadLib dflags lib_paths framework_paths lib_spec where preloadFailed :: String -> [String] -> LibrarySpec -> IO () preloadFailed sys_errmsg paths spec - = do maybePutStr dflags - ("failed.\nDynamic linker error message was:\n " - ++ sys_errmsg ++ "\nWhilst trying to load: " - ++ showLS spec ++ "\nDirectories to search are:\n" - ++ unlines (map (" "++) paths) ) - give_up + = do maybePutStr dflags "failed.\n" + ghcError $ + CmdLineError ( + "user specified .o/.so/.DLL could not be loaded (" + ++ sys_errmsg ++ ")\nWhilst trying to load: " + ++ showLS spec ++ "\nAdditional directories searched:" + ++ (if null paths then " (none)" else + (concat (intersperse "\n" (map (" "++) paths))))) -- Not interested in the paths in the static case. preload_static _paths name = do b <- doesFileExist name if not b then return False else loadObj name >> return True - - give_up = ghcError $ - CmdLineError "user specified .o/.so/.DLL could not be loaded." \end{code}