aboutsummaryrefslogtreecommitdiff
path: root/CabalHelper
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2015-09-07 04:28:58 +0200
committerDaniel Gröber <dxld@darkboxed.org>2015-09-07 04:28:58 +0200
commit3f50a4df4fc951f8876cc38c093471451cee2b88 (patch)
tree4e1de1ffc6f1a88feab7c4b7118c2d1c4b3ec774 /CabalHelper
parent097b9fc93f90b86c48e95b142f111c6fe0d8bde2 (diff)
Fix exe caching when using --with-cabal-pkg-db
Diffstat (limited to 'CabalHelper')
-rw-r--r--CabalHelper/Compile.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/CabalHelper/Compile.hs b/CabalHelper/Compile.hs
index 4d14dce..0de69b8 100644
--- a/CabalHelper/Compile.hs
+++ b/CabalHelper/Compile.hs
@@ -69,7 +69,10 @@ compileHelper opts cabalVer projdir distdir = withHelperSources $ \chdir -> do
, cachedCabalPkg chdir
, MaybeT (Just <$> compilePrivatePkgDb chdir)
]
- mdb -> compileWithPkg chdir mdb cabalVer
+ mdb ->
+ run [ Right <$> MaybeT (cachedExe cabalVer)
+ , liftIO $ compileWithPkg chdir mdb cabalVer
+ ]
where
run actions = fromJust <$> runMaybeT (msum actions)