aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Compiletime
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-02-14 00:01:31 +0100
committerDaniel Gröber <dxld@darkboxed.org>2019-02-14 01:05:09 +0100
commit698170143d5a86cf13a1ff7816439eb90a1e4c99 (patch)
tree232f40415b76ccfa886aa9f4a627dfb92071fc35 /src/CabalHelper/Compiletime
parent861d247efaca37279c55a14f7f2d4d3fb15767a1 (diff)
Fix empty package-db being interpreted as "existing"
Diffstat (limited to 'src/CabalHelper/Compiletime')
-rw-r--r--src/CabalHelper/Compiletime/Program/GHC.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/CabalHelper/Compiletime/Program/GHC.hs b/src/CabalHelper/Compiletime/Program/GHC.hs
index 97b04ed..644c6ec 100644
--- a/src/CabalHelper/Compiletime/Program/GHC.hs
+++ b/src/CabalHelper/Compiletime/Program/GHC.hs
@@ -124,6 +124,7 @@ cabalVersionExistsInPkgDb cabalVer db@(PackageDbDir db_path) = do
return $
case (cabalVer, vers) of
(CabalVersion ver, _) -> ver `elem` vers
+ (CabalHEAD _, []) -> False
(CabalHEAD _, [_headver]) -> True
(CabalHEAD _, _) ->
error $ msg ++ db_path)