aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2017-10-25 18:05:18 +0200
committerDaniel Gröber <dxld@darkboxed.org>2017-10-25 18:05:18 +0200
commitb6ebb3588358ee1bbd4b2cc114aa6650d14baaff (patch)
tree2e6611094399e67b5cf362ae1c705a0c0048dc65 /src/CabalHelper
parentba7707ad2b78b2e0438b1f1267b98249b41e0002 (diff)
Fix compilation error on GHC 7.{4,6,8}
Diffstat (limited to 'src/CabalHelper')
-rw-r--r--src/CabalHelper/Runtime/Main.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/CabalHelper/Runtime/Main.hs b/src/CabalHelper/Runtime/Main.hs
index 4ef8763..2030023 100644
--- a/src/CabalHelper/Runtime/Main.hs
+++ b/src/CabalHelper/Runtime/Main.hs
@@ -587,16 +587,18 @@ renderGhcOptions' :: LocalBuildInfo
-> Verbosity
-> GhcOptions
-> IO [String]
-renderGhcOptions' lbi _v opts = do
#if !CH_MIN_VERSION_Cabal(1,20,0)
+renderGhcOptions' lbi v opts = do
-- CPP < 1.20
(ghcProg, _) <- requireProgram v ghcProgram (withPrograms lbi)
let Just ghcVer = programVersion ghcProg
return $ renderGhcOptions ghcVer opts
#elif CH_MIN_VERSION_Cabal(1,20,0) && !CH_MIN_VERSION_Cabal(1,24,0)
+renderGhcOptions' lbi _v opts = do
-- CPP >= 1.20 && < 1.24
return $ renderGhcOptions (compiler lbi) opts
#else
+renderGhcOptions' lbi _v opts = do
-- CPP >= 1.24
return $ renderGhcOptions (compiler lbi) (hostPlatform lbi) opts
#endif