libversion-0.1.1: Haskell binding to libversion
Safe HaskellNone
LanguageHaskell2010

Foreign.Libversion

Description

Bindings to libversion

Synopsis

Documentation

newtype VersionString Source #

newtype around ByteString that uses compareVersion to implement the Ord instance

Constructors

VersionString 

data VersionFlag Source #

Flags to tune the comparison behavior

Constructors

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 1.2foopatchset3.barpatchset4).

LowerBound

derive lowest possible version with the given prefix. For example, lower bound for 1.0 is such imaginary version ? that it's higher than any release before 1.0 and lower than any prerelease of 1.0. E.g. 0.999 < lower bound(1.0) < 1.0alpha0.

UpperBound

derive highest possible version with the given prefix. Oppisite of LowerBound.

compareVersion Source #

Arguments

:: ByteString

v1

-> ByteString

v2

-> Ordering 

Compare version strings v1 and v2

compareVersion' Source #

Arguments

:: VersionFlag

f1

-> VersionFlag

f2

-> ByteString

v1

-> ByteString

v2

-> Ordering 

Compare version strings v1 and v2 with additional flags