--- /dev/null
+type 'a t = int
+
+
+let nil = ~-1
+let null = 0
+let is_nil x = x == ~-1
+let print fmt = Format.fprintf fmt "%i"
+
+let equal (x : 'a t) (y : 'a t) = x == y
+external ibool : bool -> int = "%identity"
+let compare (x : 'a t) (y : 'a t) = ibool (y > x) - ibool (y < x)
+let hash (x : 'a t) = x land 0x7fffffff
+
+external to_int : 'a t -> int = "%identity"
+external of_int : int -> 'a t = "%identity"