Commit 2baa33b6 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Make things build with ghc-6.6.x rather than just ghc HEAD

filepath-1.0 does not export dropDrive
parent 68aad0a1
......@@ -330,6 +330,21 @@ absolutePath pkg_descr lbi copydest s =
CopyPrefix d -> substDir (package pkg_descr) lbi{prefix=d} s
CopyTo p -> p </> (dropDrive (substDir (package pkg_descr) lbi s))
#if __GLASGOW_HASKELL__ && __GLASGOW_HASKELL__ <= 606
-- Compat: this function only appears in FilePath > 1.0
-- (which at the time of writing is unreleased)
where
dropDrive :: FilePath -> FilePath
dropDrive (c:cs) | isPathSeparator c = cs
dropDrive (_:':':c:cs) | isWindows
&& isPathSeparator c = cs -- path with drive letter
dropDrive (_:':':cs) | isWindows = cs
dropDrive cs = cs
isWindows = case os of
Windows _ -> True
_ -> False
#endif
substDir :: PackageIdentifier -> LocalBuildInfo -> String -> String
substDir pkgId lbi xs = loop xs
where
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment