Safe Haskell | None |
---|
A module for parsing, comparing, and (eventually) modifying debian version numbers. http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
- data DebianVersion
- prettyDebianVersion :: DebianVersion -> Doc
- class ParseDebianVersion a where
- parseDebianVersion :: a -> DebianVersion
- evr :: DebianVersion -> (Maybe Int, String, Maybe String)
- epoch :: DebianVersion -> Maybe Int
- version :: DebianVersion -> String
- revision :: DebianVersion -> Maybe String
- buildDebianVersion :: Maybe Int -> String -> Maybe String -> DebianVersion
- parseDV :: CharParser () (Found Int, NonNumeric, Found NonNumeric)
Documentation
data DebianVersion Source
Exported abstract because the internal representation is likely to change
class ParseDebianVersion a whereSource
evr :: DebianVersion -> (Maybe Int, String, Maybe String)Source
Split a DebianVersion into its three components: epoch, version, revision. It is not safe to use the parsed version number for this because you will lose information, such as leading zeros.
epoch :: DebianVersion -> Maybe IntSource
version :: DebianVersion -> StringSource
buildDebianVersion :: Maybe Int -> String -> Maybe String -> DebianVersionSource
parseDV :: CharParser () (Found Int, NonNumeric, Found NonNumeric)Source
Convert a string to a debian version number. May throw an exception if the string is unparsable -- but I am not sure if that can currently happen. Are there any invalid version strings? Perhaps ones with underscore, or something?