From c7eef63e8a33d7811ba9f242b5762dde55366526 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Wed, 4 May 2016 20:43:12 +0200 Subject: Fix Cabal-1.24.0.0 --- CabalHelper/Main.hs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'CabalHelper/Main.hs') diff --git a/CabalHelper/Main.hs b/CabalHelper/Main.hs index 2170d30..f35ed3f 100644 --- a/CabalHelper/Main.hs +++ b/CabalHelper/Main.hs @@ -14,7 +14,7 @@ -- You should have received a copy of the GNU Affero General Public License -- along with this program. If not, see . -{-# LANGUAGE CPP, BangPatterns, RecordWildCards #-} +{-# LANGUAGE CPP, BangPatterns, RecordWildCards, RankNTypes #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} import Distribution.Simple.Utils (cabalVersion) import Distribution.Simple.Configure @@ -441,11 +441,19 @@ nubPackageFlags opts = opts nubPackageFlags opts = opts { ghcOptPackages = nub $ ghcOptPackages opts } #endif +renderGhcOptions' :: LocalBuildInfo + -> Verbosity + -> GhcOptions + -> IO [String] renderGhcOptions' lbi v opts = do #if CABAL_MAJOR == 1 && CABAL_MINOR < 20 (ghcProg, _) <- requireProgram v ghcProgram (withPrograms lbi) let Just ghcVer = programVersion ghcProg return $ renderGhcOptions ghcVer opts -#else +#elif CABAL_MAJOR == 1 && CABAL_MINOR >= 22 && CABAL_MINOR < 24 +-- && CABAL_MINOR < 24 return $ renderGhcOptions (compiler lbi) opts +#elif CABAL_MAJOR == 1 && CABAL_MINOR >= 24 +-- CABAL_MAJOR == 1 && CABAL_MINOR >= 24 + return $ renderGhcOptions (compiler lbi) (hostPlatform lbi) opts #endif -- cgit v1.2.3