Actually, the type of "+'a t" is not exported in Map.S, therefore it cannot be used directly, even when including the module (or I am mistaking the include semantics).
I've recently tried to extend the Map in the standard library with extra functionality. This is what I've tried doing:In a file my_map.ml:module type S =siginclude Map.Sval find_lt: key -> 'a t -> 'aval find_gt: key -> 'a t -> 'aendmodule Make(Ord: Map.OrderedType) = structinclude Map.Make(Ord)let find_almost move_f x n =let rec loop lastval n =match n, lastval with| Empty, None -> raise Not_found| Empty, Some i -> i| Node(l, v, d, r, _) ->let c = Ord.compare x v inlet lastval', next = move_f c lastval l d r inloop lastval' nextin loop None nlet move_lt c lastval l d r =if c <= 0 then lastval, l else Some d, rlet move_gt c lastval l d r =if c < 0 then Some d, l else lastval, rlet find_gt x n = find_almost move_gt x nlet find_lt x n = find_almost move_lt x nendCan anyone tell me why the compiler complained about Empty being an unbound constructor when it's declared in Map.Make, which I include?ThanksYotam