-
Notifications
You must be signed in to change notification settings - Fork 4
/
opamVersionCompare.mli
40 lines (34 loc) · 2.11 KB
/
opamVersionCompare.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
(******************************************************************************)
(* This file is part of the Dose library http://www.irill.org/software/dose *)
(* *)
(* Copyright (C) 2009-2011 Pietro Abate <pietro.abate@pps.jussieu.fr> *)
(* *)
(* All rights reserved. This file is distributed under the terms of the *)
(* GNU Lesser General Public License version 2.1, with the special *)
(* exception on linking described in the file LICENSE. *)
(* *)
(* Work developed with the support of the Mancoosi Project *)
(* http://www.mancoosi.org *)
(* *)
(******************************************************************************)
(** Version comparison function used throughout. From the Dose suite. *)
(** Functions for manipulating and comparing Debian version strings.
Compliant with Debian policy version 3.9.2. and Debian developers
reference version 3.4.6 *)
(** {2 Comparing debian version strings} *)
(** The following functions compare any two strings, that is these
functions do not check whether the arguments are really legal
debian versions. If the arguments are debian version strings, then
the result is as required by debian policy. Note that two strings
may be equivalent, that is denote the same debian version, even
when they differ in syntax, as for instance "0:1.2.00" and
"1.02-0".
*)
val equal : string -> string -> bool
(** @return [true] iff the two strings define the same version. Hence,
the result may be true even when the two string differ
syntactically. *)
val compare : string -> string -> int
(** [compare x y] returns 0 if x is eqivalent to y, -1 if x is smaller
than y, and 1 if x is greater than y. This is consistent with
[Stdlib.compare]. *)