From 636fecb6ffa094dd9fde0471c59f56c741ba6200 Mon Sep 17 00:00:00 2001 From: Benjamin Canou Date: Wed, 28 Mar 2018 20:23:30 +0200 Subject: [PATCH] Utils: add Compare.Z --- src/lib_protocol_environment/sigs/v1/compare.mli | 1 + src/lib_stdlib/compare.ml | 2 ++ src/lib_stdlib/compare.mli | 1 + 3 files changed, 4 insertions(+) diff --git a/src/lib_protocol_environment/sigs/v1/compare.mli b/src/lib_protocol_environment/sigs/v1/compare.mli index 133d351f6..04934a67c 100644 --- a/src/lib_protocol_environment/sigs/v1/compare.mli +++ b/src/lib_protocol_environment/sigs/v1/compare.mli @@ -37,6 +37,7 @@ module Int64 : S with type t = int64 module Uint64 : S with type t = int64 module Float : S with type t = float module String : S with type t = string +module Z : S with type t = Z.t module List (P : COMPARABLE) : S with type t = P.t list module Option (P : COMPARABLE) : S with type t = P.t option diff --git a/src/lib_stdlib/compare.ml b/src/lib_stdlib/compare.ml index e5fe3597d..dd4062c69 100644 --- a/src/lib_stdlib/compare.ml +++ b/src/lib_stdlib/compare.ml @@ -115,3 +115,5 @@ module Uint64 = MakeUnsigned (Int64) (struct let zero = 0L end) module Float = Make (struct type t = float let compare = Pervasives.compare end) module String = Make (String) + +module Z = Make (Z) diff --git a/src/lib_stdlib/compare.mli b/src/lib_stdlib/compare.mli index 133d351f6..04934a67c 100644 --- a/src/lib_stdlib/compare.mli +++ b/src/lib_stdlib/compare.mli @@ -37,6 +37,7 @@ module Int64 : S with type t = int64 module Uint64 : S with type t = int64 module Float : S with type t = float module String : S with type t = string +module Z : S with type t = Z.t module List (P : COMPARABLE) : S with type t = P.t list module Option (P : COMPARABLE) : S with type t = P.t option