package semver

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Simple semantic versioning module

type t = int * int * int

Semantic version consisting of major/minor/patch components

type version_part = [
  1. | `Major
    (*

    First part of version

    *)
  2. | `Minor
    (*

    Second part of version

    *)
  3. | `Patch
    (*

    Third part of version

    *)
]

Part labels

val compare : t -> t -> int

Compare two versions

val equal : t -> t -> bool

Return whether two versions are equal

val succ : version_part -> t -> t

succ vpart v increments vpart component in v

val pred : version_part -> t -> t

pred vpart v decrements vpart component in v

val of_string : string -> t option

Parse a semantic version from a string

val to_string : t -> string

Convert a semantic version to a string

module Query : sig ... end
val query : Query.t -> t list -> t option
val query_str : string -> t list -> t option
OCaml

Innovation. Community. Security.