6 let is_nil x = x == ~-1
7 let print fmt = Format.fprintf fmt "%i"
9 let equal (x : 'a t) (y : 'a t) = x == y
10 external ibool : bool -> int = "%identity"
11 let compare (x : 'a t) (y : 'a t) = ibool (y > x) - ibool (y < x)
12 let hash (x : 'a t) = x land 0x7fffffff
14 external to_int : 'a t -> int = "%identity"
15 external of_int : int -> 'a t = "%identity"