1. camlspotter
  2. ocamlspot

Source

ocamlspot / treeset.ml

Diff from to

File treeset.ml

   val compare : t -> t 
     -> [`Left | `Right | `Includes | `Included | `Same | `Overwrap]
   val split : t -> by:t -> (t * t) option
+  val format : Format.formatter -> t -> unit
 end
 
 module Make(Ord : OrderedType) = struct
       | `Left -> -1
       | `Right -> 1
       | _ -> 0
+    let format ppf = function
+      | Node (e, _) -> Ord.format ppf e
   end
   
   and NodeSet : Xset.S with type elt = 
   let add_elem elem t = add_node (Node (elem, empty)) t  
 
   let rec find_path_contains_aux path node t =
+(*
+    Format.eprintf "FIND: %a in @[%a@]@."
+      (fun ppf node -> match node with Node (e, _) -> Ord.format ppf e) node
+      NodeSet.unsafe_dump t;
+*)
     match unsafe_find node t with
     | None -> path
     | Some (Node (elem', t')) ->