Commit b271eb87 authored by thomie's avatar thomie

Remove all references to Data.Version.versionTags

Avoids deprecation warnings when versionTags is deprecated in GHC 7.10
(GHC ticket #2496)
parent 7ece59b3
......@@ -157,7 +157,7 @@ emptyInstalledPackageInfo
}
noVersion :: Version
noVersion = Version{ versionBranch=[], versionTags=[] }
noVersion = Version [] []
-- -----------------------------------------------------------------------------
-- Module re-exports
......
......@@ -657,7 +657,7 @@ parseOptVersion :: ReadP r Version
parseOptVersion = parseQuoted ver <++ ver
where ver :: ReadP r Version
ver = parse <++ return noVersion
noVersion = Version{ versionBranch=[], versionTags=[] }
noVersion = Version [] []
parseTestedWithQ :: ReadP r (CompilerFlavor,VersionRange)
parseTestedWithQ = parseQuoted tw <++ tw
......
......@@ -80,7 +80,8 @@ generate pkg_descr lbi =
"catchIO = Exception.catch\n" ++
"\n"++
"\nversion :: Version"++
"\nversion = " ++ show (packageVersion pkg_descr)
"\nversion = Version " ++ show branch ++ " " ++ show tags
where Version branch tags = packageVersion pkg_descr
body
| absolute =
......
......@@ -815,8 +815,7 @@ interpretPackageDbFlags userInstall specificDBs =
extra dbs' (Just db:dbs) = extra (dbs' ++ [db]) dbs
newPackageDepsBehaviourMinVersion :: Version
newPackageDepsBehaviourMinVersion = Version { versionBranch = [1,7,1],
versionTags = [] }
newPackageDepsBehaviourMinVersion = Version [1,7,1] []
-- In older cabal versions, there was only one set of package dependencies for
-- the whole package. In this version, we can have separate dependencies per
......
......@@ -55,7 +55,7 @@ markup hpc hpcVer verbosity tixFile hpcDirs destDir excluded = do
runProgramInvocation verbosity
(markupInvocation hpc tixFile hpcDirs' destDir excluded)
where
version07 = Version { versionBranch = [0, 7], versionTags = [] }
version07 = Version [0, 7] []
(passedDirs, droppedDirs) = splitAt 1 hpcDirs
markupInvocation :: ConfiguredProgram
......
......@@ -118,7 +118,7 @@ instance Binary Version where
br <- get
tags <- get
return $ Version br tags
put v = put (versionBranch v) >> put (versionTags v)
put (Version br tags) = put br >> put tags
{-# DEPRECATED AnyVersion "Use 'anyVersion', 'foldVersionRange' or 'asVersionIntervals'" #-}
{-# DEPRECATED ThisVersion "use 'thisVersion', 'foldVersionRange' or 'asVersionIntervals'" #-}
......
......@@ -165,7 +165,7 @@ getPackageName flags = do
-- if possible.
getVersion :: InitFlags -> IO InitFlags
getVersion flags = do
let v = Just $ Version { versionBranch = [0,1,0,0], versionTags = [] }
let v = Just $ Version [0,1,0,0] []
v' <- return (flagToMaybe $ version flags)
?>> maybePrompt flags (prompt "Package version" v)
?>> return v
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment