aboutsummaryrefslogtreecommitdiff
path: root/CabalHelper/Main.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2016-02-14 13:20:53 +0100
committerDaniel Gröber <dxld@darkboxed.org>2016-02-14 13:20:53 +0100
commitc2d116272b448342629e6beb73fe7a464e2245d3 (patch)
tree116fea7cbe25a365267e64560e13ae85bc4bb5e1 /CabalHelper/Main.hs
parent3dcff567d383ced5ca3704a0ad5bc28de3fadd6f (diff)
Cabal 1.24 readiness (GHC 8)
Diffstat (limited to 'CabalHelper/Main.hs')
-rw-r--r--CabalHelper/Main.hs15
1 files changed, 8 insertions, 7 deletions
diff --git a/CabalHelper/Main.hs b/CabalHelper/Main.hs
index 2244859..2170d30 100644
--- a/CabalHelper/Main.hs
+++ b/CabalHelper/Main.hs
@@ -48,10 +48,10 @@ import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..),
externalPackageDeps,
withComponentsLBI,
withLibLBI)
-#if CABAL_MAJOR == 1 && CABAL_MINOR <= 22
+#if CABAL_MAJOR == 1 && CABAL_MINOR >= 23
+import Distribution.Simple.LocalBuildInfo (localUnitId)
+#elif CABAL_MAJOR == 1 && CABAL_MINOR <= 22
import Distribution.Simple.LocalBuildInfo (inplacePackageId)
-#else
-import Distribution.Simple.LocalBuildInfo (localComponentId)
#endif
import Distribution.Simple.GHC (componentGhcOptions)
@@ -413,7 +413,7 @@ removeInplaceDeps v lbi pd clbi = let
liboutdir = componentOutDir lbi (CLib lib)
libopts = (componentGhcOptions normal lbi libbi libclbi liboutdir) {
ghcOptPackageDBs = []
-#if CABAL_MAJOR == 1 && CABAL_MINOR > 22
+#if CABAL_MAJOR == 1 && CABAL_MINOR > 22 && CABAL_MINOR < 23
, ghcOptComponentId = NoFlag
#endif
}
@@ -426,10 +426,11 @@ removeInplaceDeps v lbi pd clbi = let
where
isInplaceDep :: (InstalledPackageId, PackageId) -> Bool
-#if CABAL_MAJOR == 1 && CABAL_MINOR <= 22
+#if CABAL_MAJOR == 1 && CABAL_MINOR >= 23
+ isInplaceDep (ipid, pid) = localUnitId lbi == ipid
+#elif CABAL_MAJOR == 1 && CABAL_MINOR <= 22
isInplaceDep (ipid, pid) = inplacePackageId pid == ipid
-#else
- isInplaceDep (ipid, pid) = localComponentId lbi == ipid
+
#endif