ref: b7256500baeeddc3108d73b98dc12c4ad00b4544
dir: /lib/Data/Version.hs/
module Data.Version(
Version(..),
showVersion,
makeVersion
) where
data Version = Version { versionBranch :: [Int] }
deriving (Show, Eq, Ord)
showVersion :: Version -> String
showVersion (Version b) = intercalate "." (map show b)
{-
parseVersion :: ReadP Version
parseVersion = do branch <- sepBy1 (fmap read (munch1 isDigit)) (char '.')
pure Version{versionBranch=branch}
-}
makeVersion :: [Int] -> Version
makeVersion b = Version b