ligo/src/lib_stdlib/compare.mli

43 lines
1.5 KiB
OCaml
Raw Normal View History

2017-11-14 03:32:46 +04:00
(**************************************************************************)
(* *)
2018-02-06 00:17:03 +04:00
(* Copyright (c) 2014 - 2018. *)
2017-11-14 03:32:46 +04:00
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
2016-09-08 21:13:10 +04:00
2018-02-13 20:30:25 +04:00
module type COMPARABLE = sig
type t
val compare : t -> t -> int
end
2016-09-08 21:13:10 +04:00
module type S = sig
type t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val (>=) : t -> t -> bool
val (>) : t -> t -> bool
val compare : t -> t -> int
2018-02-13 20:30:25 +04:00
val equal : t -> t -> bool
2016-09-08 21:13:10 +04:00
val max : t -> t -> t
val min : t -> t -> t
end
2018-02-13 20:30:25 +04:00
module Make (P : COMPARABLE) : S with type t := P.t
2016-09-08 21:13:10 +04:00
module Char : S with type t = char
module Bool : S with type t = bool
module Int : S with type t = int
module Int32 : S with type t = int32
2016-11-17 17:56:27 +04:00
module Uint32 : S with type t = int32
2016-09-08 21:13:10 +04:00
module Int64 : S with type t = int64
2016-11-17 17:56:27 +04:00
module Uint64 : S with type t = int64
2016-09-08 21:13:10 +04:00
module Float : S with type t = float
module String : S with type t = string
2018-02-13 20:30:25 +04:00
module List (P : COMPARABLE) : S with type t = P.t list
module Option (P : COMPARABLE) : S with type t = P.t option