From 7b7187ab30c945f7929299833a92ee01737519a6 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Mon, 3 Mar 2014 03:42:49 +0100 Subject: Goptions do not rely anymore on generic equality. --- library/goptions.ml | 6 +++++- library/goptions.mli | 1 + pretyping/classops.ml | 1 + pretyping/detyping.ml | 1 + pretyping/detyping.mli | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/library/goptions.ml b/library/goptions.ml index 7ceac2f6a..8402abd34 100644 --- a/library/goptions.ml +++ b/library/goptions.ml @@ -43,6 +43,7 @@ module MakeTable = (A : sig type t type key + val compare : t -> t -> int val table : (string * key table_of_A) list ref val encode : key -> t val subst : substitution -> t -> t @@ -63,7 +64,7 @@ module MakeTable = if String.List.mem_assoc nick !A.table then error "Sorry, this table name is already used." - module MySet = Set.Make (struct type t = A.t let compare = compare end) + module MySet = Set.Make (struct type t = A.t let compare = A.compare end) let t = if A.synchronous @@ -135,6 +136,7 @@ module StringConvert = functor (A : StringConvertArg) -> struct type t = string type key = string + let compare = String.compare let table = string_table let encode x = x let subst _ x = x @@ -155,6 +157,7 @@ let get_ref_table k = String.List.assoc (nickname k) !ref_table module type RefConvertArg = sig type t + val compare : t -> t -> int val encode : reference -> t val subst : substitution -> t -> t val printer : t -> std_ppcmds @@ -168,6 +171,7 @@ module RefConvert = functor (A : RefConvertArg) -> struct type t = A.t type key = reference + let compare = A.compare let table = ref_table let encode = A.encode let subst = A.subst diff --git a/library/goptions.mli b/library/goptions.mli index 1fa63899b..6f23cf5ea 100644 --- a/library/goptions.mli +++ b/library/goptions.mli @@ -89,6 +89,7 @@ module MakeRefTable : functor (A : sig type t + val compare : t -> t -> int val encode : reference -> t val subst : substitution -> t -> t val printer : t -> std_ppcmds diff --git a/pretyping/classops.ml b/pretyping/classops.ml index 3fe3b3ff2..58265208b 100644 --- a/pretyping/classops.ml +++ b/pretyping/classops.ml @@ -510,6 +510,7 @@ let coercion_of_reference r = module CoercionPrinting = struct type t = coe_typ + let compare = RefOrdered.compare let encode = coercion_of_reference let subst = subst_coe_typ let printer x = pr_global_env Id.Set.empty x diff --git a/pretyping/detyping.ml b/pretyping/detyping.ml index c59110124..66cd73e5d 100644 --- a/pretyping/detyping.ml +++ b/pretyping/detyping.ml @@ -71,6 +71,7 @@ module PrintingInductiveMake = end) -> struct type t = inductive + let compare = ind_ord let encode = Test.encode let subst subst (kn, ints as obj) = let kn' = subst_ind subst kn in diff --git a/pretyping/detyping.mli b/pretyping/detyping.mli index 97c636af7..8a10b7ed5 100644 --- a/pretyping/detyping.mli +++ b/pretyping/detyping.mli @@ -72,6 +72,7 @@ module PrintingInductiveMake : end) -> sig type t = Names.inductive + val compare : t -> t -> int val encode : Libnames.reference -> Names.inductive val subst : substitution -> t -> t val printer : t -> Pp.std_ppcmds -- cgit v1.2.3