aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Compiletime
diff options
context:
space:
mode:
Diffstat (limited to 'src/CabalHelper/Compiletime')
-rw-r--r--src/CabalHelper/Compiletime/Cabal.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/CabalHelper/Compiletime/Cabal.hs b/src/CabalHelper/Compiletime/Cabal.hs
index 0a11ba3..3ffb670 100644
--- a/src/CabalHelper/Compiletime/Cabal.hs
+++ b/src/CabalHelper/Compiletime/Cabal.hs
@@ -210,9 +210,10 @@ unpackCabalHEAD tmpdir = do
-- If the released version of cabal has 4 components but we use only three
-- theirs will always be larger than this one here. That's not really
-- critical though.
- setVersion i (versionBranch -> mj:mi:_:_:[])
- | odd mi = Just $ makeVersion $ mj:mi:[i]
- setVersion _ _ = error "unpackCabalHEAD.setVersion: Wrong version format"
+ setVersion i (versionBranch -> mj:mi:_:_:[]) =
+ Just $ makeVersion $ mj:mi:[i]
+ setVersion _ v =
+ error $ "unpackCabalHEAD.setVersion: Wrong version format" ++ show v
-- | Replace the version declaration in a cabal file
replaceVersionDecl :: (Version -> Maybe Version) -> String -> Maybe String