diff options
Diffstat (limited to 'CabalHelper/Compile.hs')
-rw-r--r-- | CabalHelper/Compile.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CabalHelper/Compile.hs b/CabalHelper/Compile.hs index f84b2e8..2d9628c 100644 --- a/CabalHelper/Compile.hs +++ b/CabalHelper/Compile.hs @@ -167,9 +167,9 @@ compile distdir opts@Options {..} Compile {..} = do vLog opts $ "outdir: " ++ outdir vLog opts $ "exedir: " ++ exedir - let (mj, mi) = case compCabalVersion of - Left _commitid -> (1, 10000) - Right (Version (x:y:_) _) -> (x, y) + let (mj:mi:_) = case compCabalVersion of + Left _commitid -> [1, 10000] + Right (Version vs _) -> vs let ghc_opts = concat [ [ "-outputdir", outdir @@ -370,7 +370,7 @@ unpackCabalHEAD tmpdir = do let dir = tmpdir </> "cabal-head.git" url = "https://github.com/haskell/cabal.git" ExitSuccess <- rawSystem "git" [ "clone", "--depth=1", url, dir] - commit <- trim <$> readProcess "git" ["rev-parse", "HEAD"] "" + commit <- trim <$> readProcess "git" ["-C", dir, "rev-parse", "HEAD"] "" return (dir </> "Cabal", commit) errorInstallCabal :: Version -> FilePath -> a |