diff options
| author | John Ericson <John.Ericson@Obsidian.Systems> | 2019-05-31 19:33:33 -0400 |
|---|---|---|
| committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-06-19 22:16:16 -0400 |
| commit | d406a16ac22e6ad02da0d2c75212614eda09d2cb (patch) | |
| tree | 21490fb5f60bb5fe5d8e540e4f95b0c49a58fb17 /compiler/main/SysTools | |
| parent | a298b96e624155e1860ff009951cb21be43b99d4 (diff) | |
| download | haskell-d406a16ac22e6ad02da0d2c75212614eda09d2cb.tar.gz | |
ghc-pkg needs settings file to un-hardcode target platform
This matches GHC itself getting the target platform from there.
Diffstat (limited to 'compiler/main/SysTools')
| -rw-r--r-- | compiler/main/SysTools/BaseDir.hs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/compiler/main/SysTools/BaseDir.hs b/compiler/main/SysTools/BaseDir.hs index 1293d1898a..f67d2def6d 100644 --- a/compiler/main/SysTools/BaseDir.hs +++ b/compiler/main/SysTools/BaseDir.hs @@ -27,7 +27,6 @@ import Panic import System.Environment (lookupEnv) import System.FilePath -import Data.List -- Windows #if defined(mingw32_HOST_OS) @@ -76,10 +75,6 @@ $topdir/../../{mingw, perl}/. -} --- | Expand occurrences of the @$topdir@ interpolation in a string. -expandTopDir :: FilePath -> String -> String -expandTopDir = expandPathVar "topdir" - -- | Expand occurrences of the @$tooldir@ interpolation in a string -- on Windows, leave the string untouched otherwise. expandToolDir :: Maybe FilePath -> String -> String @@ -90,17 +85,6 @@ expandToolDir Nothing _ = panic "Could not determine $tooldir" expandToolDir _ s = s #endif --- | @expandPathVar var value str@ --- --- replaces occurences of variable @$var@ with @value@ in str. -expandPathVar :: String -> FilePath -> String -> String -expandPathVar var value str - | Just str' <- stripPrefix ('$':var) str - , null str' || isPathSeparator (head str') - = value ++ expandPathVar var value str' -expandPathVar var value (x:xs) = x : expandPathVar var value xs -expandPathVar _ _ [] = [] - -- | Returns a Unix-format path pointing to TopDir. findTopDir :: Maybe String -- Maybe TopDir path (without the '-B' prefix). -> IO String -- TopDir (in Unix format '/' separated) |
