X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FPackages.lhs;h=bdb8cf724a522d69c2fd0c2a00f2a3f2f53e8f78;hb=d787ad2f38cf4ee5564b30ebf0ccf2ccd8ccd38b;hp=86b4693a55f341878bc5dd93dddc9691588066cf;hpb=5bb65738e2b135fd1f81dd06e4731f7446d96393;p=ghc-hetmet.git diff --git a/compiler/main/Packages.lhs b/compiler/main/Packages.lhs index 86b4693..bdb8cf7 100644 --- a/compiler/main/Packages.lhs +++ b/compiler/main/Packages.lhs @@ -51,8 +51,6 @@ import Outputable import System.Environment ( getEnv ) import Distribution.InstalledPackageInfo hiding (depends) import Distribution.Package hiding (depends, PackageId) -import Distribution.Text -import Distribution.Version import FastString import ErrUtils ( debugTraceMsg, putMsg, Message ) import Exception @@ -267,8 +265,8 @@ mungePackagePaths top_dir ps = map munge_pkg ps munge_paths = map munge_path munge_path p - | Just p' <- maybePrefixMatch "$topdir" p = top_dir ++ p' - | Just p' <- maybePrefixMatch "$httptopdir" p = toHttpPath top_dir ++ p' + | Just p' <- stripPrefix "$topdir" p = top_dir ++ p' + | Just p' <- stripPrefix "$httptopdir" p = toHttpPath top_dir ++ p' | otherwise = p toHttpPath p = "file:///" ++ p