Safe Haskell | None |
---|---|
Language | Haskell2010 |
Bindings to libversion
Synopsis
- newtype VersionString = VersionString {}
- data VersionString' = VersionString' ByteString VersionFlag
- data VersionFlag
- compareVersion :: ByteString -> ByteString -> Ordering
- compareVersion' :: VersionFlag -> VersionFlag -> ByteString -> ByteString -> Ordering
Documentation
newtype VersionString Source #
newtype around ByteString
that uses compareVersion
to implement the Ord
instance
Instances
data VersionString' Source #
A wrapper around ByteString
like VersionString
but has an VersionFlag
attached.
Uses compareVersion'
to implement the Ord
instance
Instances
Eq VersionString' Source # | |
Defined in Foreign.Libversion (==) :: VersionString' -> VersionString' -> Bool # (/=) :: VersionString' -> VersionString' -> Bool # | |
Ord VersionString' Source # | |
Defined in Foreign.Libversion compare :: VersionString' -> VersionString' -> Ordering # (<) :: VersionString' -> VersionString' -> Bool # (<=) :: VersionString' -> VersionString' -> Bool # (>) :: VersionString' -> VersionString' -> Bool # (>=) :: VersionString' -> VersionString' -> Bool # max :: VersionString' -> VersionString' -> VersionString' # min :: VersionString' -> VersionString' -> VersionString' # | |
Show VersionString' Source # | |
Defined in Foreign.Libversion showsPrec :: Int -> VersionString' -> ShowS # show :: VersionString' -> String # showList :: [VersionString'] -> ShowS # |
data VersionFlag Source #
Flags to tune the comparison behavior
NoFlag | |
PIsPatch | p letter is treated as patch (post-release) instead of pre (pre-release). |
AnyIsPatch | any letter sequence is treated as post-release (useful for handling patchsets as in |
LowerBound | derive lowest possible version with the given prefix.
For example, lower bound for |
UpperBound | derive highest possible version with the given prefix. Oppisite of |
Instances
Enum VersionFlag Source # | |
Defined in Foreign.Libversion succ :: VersionFlag -> VersionFlag # pred :: VersionFlag -> VersionFlag # toEnum :: Int -> VersionFlag # fromEnum :: VersionFlag -> Int # enumFrom :: VersionFlag -> [VersionFlag] # enumFromThen :: VersionFlag -> VersionFlag -> [VersionFlag] # enumFromTo :: VersionFlag -> VersionFlag -> [VersionFlag] # enumFromThenTo :: VersionFlag -> VersionFlag -> VersionFlag -> [VersionFlag] # | |
Eq VersionFlag Source # | |
Defined in Foreign.Libversion (==) :: VersionFlag -> VersionFlag -> Bool # (/=) :: VersionFlag -> VersionFlag -> Bool # | |
Show VersionFlag Source # | |
Defined in Foreign.Libversion showsPrec :: Int -> VersionFlag -> ShowS # show :: VersionFlag -> String # showList :: [VersionFlag] -> ShowS # |
:: VersionFlag | f1 |
-> VersionFlag | f2 |
-> ByteString | v1 |
-> ByteString | v2 |
-> Ordering |
Compare version strings v1
and v2
with additional flags