aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Compiletime/Compile.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/CabalHelper/Compiletime/Compile.hs')
-rw-r--r--src/CabalHelper/Compiletime/Compile.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CabalHelper/Compiletime/Compile.hs b/src/CabalHelper/Compiletime/Compile.hs
index e468c1b..e5d7dcd 100644
--- a/src/CabalHelper/Compiletime/Compile.hs
+++ b/src/CabalHelper/Compiletime/Compile.hs
@@ -112,7 +112,7 @@ compileHelper'
=> CompHelperEnv' UnpackedCabalVersion
-> IO (Either ExitCode FilePath)
compileHelper' CompHelperEnv {..} = do
- ghcVer <- ghcVersion
+ ghcVer <- GhcVersion <$> getGhcVersion
Just (prepare, comp) <- case cheCabalVer of
cabalVer@CabalHEAD {} -> runMaybeT $ msum $ map (\f -> f ghcVer cabalVer)
[ compileWithCabalV2GhcEnv'
@@ -217,7 +217,7 @@ compileHelper' CompHelperEnv {..} = do
compileWithCabalV2GhcEnv' :: Env => GhcVersion -> UnpackedCabalVersion -> MaybeT IO (IO (), Compile)
compileWithCabalV2GhcEnv' ghcVer cabalVer = do
_ <- maybe mzero pure cheDistV2 -- bail if this isn't a v2-build project
- CabalInstallVersion instVer <- liftIO cabalInstallVersion
+ instVer <- liftIO getCabalInstallVersion
guard $ instVer >= (Version [2,4,1,0] [])
-- ^ didn't test with older versions
guard $ ghcVer >= (GhcVersion (Version [8,0] []))