Commit 5b3a736c authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Add [Lr1.NodeSet.leq_join].

parent 44898882
......@@ -704,8 +704,19 @@ module Node = struct
let compare = (-)
module NodeSet =
module NodeSet = struct
include Set.Make(Node)
(* [union] does not guarantee physical equality between its second
argument and its result when a logical equality holds. We wrap it
so as to obtain this property. *)
let[@inline] leq_join s1 s2 =
if subset s1 s2 then s2 else union s1 s2
module NodeMap =
......@@ -34,7 +34,10 @@ type node
module Node : Set.OrderedType with type t = node
module NodeSet : Set.S with type elt = node
module NodeSet : sig
include Set.S with type elt = node
val leq_join: t -> t -> t
module NodeMap : Map.S with type key = node
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment