diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2016-01-17 21:26:48 +0100 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2016-01-17 21:29:57 +0100 |
commit | 1cbb658fcbde206c281cfbc117101af47356b2e5 (patch) | |
tree | 22876ec108ef9fb7b10da64eeea51133679cee11 /CabalHelper/GuessGhc.hs | |
parent | c1b8fa2c397355076323c97c976b7d2cfd46504c (diff) |
Fix GHC 8.0 errors
Diffstat (limited to 'CabalHelper/GuessGhc.hs')
-rw-r--r-- | CabalHelper/GuessGhc.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/CabalHelper/GuessGhc.hs b/CabalHelper/GuessGhc.hs index 0827456..8b0ebce 100644 --- a/CabalHelper/GuessGhc.hs +++ b/CabalHelper/GuessGhc.hs @@ -49,11 +49,11 @@ guessToolFromGhcPath toolname ghcPath path = ghcPath dir = takeDirectory path versionSuffix = takeVersionSuffix (dropExeExtension path) - guessNormal = dir </> toolname <.> exeExtension + guessNormal = dir </> toolname <.> exeExtension' guessGhcVersioned = dir </> (toolname ++ "-ghc" ++ versionSuffix) - <.> exeExtension + <.> exeExtension' guessVersioned = dir </> (toolname ++ versionSuffix) - <.> exeExtension + <.> exeExtension' guesses | null versionSuffix = [guessNormal] | otherwise = [guessGhcVersioned, guessVersioned, @@ -70,7 +70,7 @@ guessToolFromGhcPath toolname ghcPath dropExeExtension :: FilePath -> FilePath dropExeExtension filepath = case splitExtension filepath of - (filepath', extension) | extension == exeExtension -> filepath' + (filepath', extension) | extension == exeExtension' -> filepath' | otherwise -> filepath -- | @takeWhileEndLE p@ is equivalent to @reverse . takeWhile p . reverse@, but @@ -81,3 +81,6 @@ takeWhileEndLE p = fst . foldr go ([], False) go x (rest, done) | not done && p x = (x:rest, False) | otherwise = (rest, True) + +exeExtension' :: FilePath +exeExtension' = Distribution.Simple.BuildPaths.exeExtension |