From 45d278c6376b55399671e4e87fd59e75f33c354b Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 2 Jun 2007 19:56:51 +0000 Subject: [PATCH] Copy more of base's hacks into installPackage; *sigh* --- libraries/installPackage.hs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/libraries/installPackage.hs b/libraries/installPackage.hs index f4fdfa7..d42bf8c 100644 --- a/libraries/installPackage.hs +++ b/libraries/installPackage.hs @@ -42,12 +42,24 @@ doit pref ghcpkg verbosity = pdFile <- defaultPackageDesc verbosity pd <- readPackageDescription verbosity pdFile lbi <- getPersistBuildConfig - let -- XXX This is an almighty hack, shadowing the base Setup.hs hack + let -- XXX These are almighty hacks, shadowing the base + -- Setup.hs hacks + extraExtraLibs = if pkgName (package pd) == "base" + then ["wsock32", "msvcrt", "kernel32", + "user32", "shell32"] + else [] lib' = case library pd of Just lib -> - lib { - exposedModules = filter (("GHC.Prim" /=)) - $ exposedModules lib + let ems = filter (("GHC.Prim" /=)) + $ exposedModules lib + lib_bi = libBuildInfo lib + lib_bi' = lib_bi { + extraLibs = extraExtraLibs + ++ extraLibs lib_bi + } + in lib { + exposedModules = ems, + libBuildInfo = lib_bi' } Nothing -> error "Expected a library, but none found" -- 1.7.10.4