diff --git a/Distribution/Compat/FilePath.hs b/Distribution/Compat/FilePath.hs index 881b80875f4..0fc3b94540b 100644 --- a/Distribution/Compat/FilePath.hs +++ b/Distribution/Compat/FilePath.hs @@ -351,15 +351,22 @@ commonParent paths@(p:ps) = -- | The function splits the given string to substrings -- using the 'searchPathSeparator'. parseSearchPath :: String -> [FilePath] -parseSearchPath path = split searchPathSeparator path +parseSearchPath path = split path where - split :: Char -> String -> [String] - split c s = - case rest of - [] -> [chunk] - _:rest' -> chunk : split c rest' + split :: String -> [String] + split s = + case rest' of + [] -> [chunk] + _:rest -> chunk : split rest where - (chunk, rest) = break (==c) s + chunk = + case chunk' of +#ifdef mingw32_HOST_OS + ('\"':xs@(_:_)) | last xs == '\"' -> init xs +#endif + _ -> chunk' + + (chunk', rest') = break (==searchPathSeparator) s -- | The function concatenates the given paths to form a -- single string where the paths are separated with 'searchPathSeparator'. diff --git a/package.conf.in b/package.conf.in index d6f3c1d83a3..ce13a1ef507 100644 --- a/package.conf.in +++ b/package.conf.in @@ -18,10 +18,11 @@ exposed-modules: Distribution.PackageDescription, Distribution.ParseUtils, Distribution.PreProcess, + Distribution.PreProcess.Unlit, + Distribution.Program, Distribution.Setup, Distribution.Simple, Distribution.Version, - Distribution.PreProcess.Unlit, Distribution.Simple.Build, Distribution.Simple.Configure, Distribution.Simple.GHCPackageConfig,