aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper
diff options
context:
space:
mode:
Diffstat (limited to 'src/CabalHelper')
-rw-r--r--src/CabalHelper/Runtime/Main.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/CabalHelper/Runtime/Main.hs b/src/CabalHelper/Runtime/Main.hs
index e6d7a22..6e013a1 100644
--- a/src/CabalHelper/Runtime/Main.hs
+++ b/src/CabalHelper/Runtime/Main.hs
@@ -377,10 +377,15 @@ main = do
return $ Just $ ChResponsePkgDbs $ map pkgDb $ withPackageDB lbi
"entrypoints":[] -> do
+#if CH_MIN_VERSION_Cabal(2,0,0)
includeDirMap <- recursiveDepInfo lbi v distdir
eps <- componentsMap lbi v distdir $ \c clbi _bi -> do
let (_,_,seps) = recursiveIncludeDirs includeDirMap (componentUnitId clbi)
return seps
+#else
+ eps <- componentsMap lbi v distdir $ \c _clbi _bi ->
+ return $ componentEntrypoints c
+#endif
-- MUST append Setup component at the end otherwise CabalHelper gets
-- confused
let eps' = eps ++ [(ChSetupHsName, ChSetupEntrypoint)]
@@ -459,7 +464,9 @@ componentsMap lbi _v _distdir f = do
componentOptions' (lbi, v, distdir) inplaceFlag flags rf f = do
let pd = localPkgDescr lbi
+#if CH_MIN_VERSION_Cabal(2,0,0)
includeDirMap <- recursiveDepInfo lbi v distdir
+#endif
componentsMap lbi v distdir $ \c clbi bi ->
let