upool.mli 387 Bytes
Newer Older
1 2 3 4 5 6
type 'a typed_int
external int: 'a typed_int -> int = "%identity"

module type S = sig
  type token
  type value
7
  include Custom.T with type t = token typed_int
8 9 10 11 12 13 14 15 16 17
  exception Not_unique of value * value

  val dummy: t
  val mk: value -> t
  val get: t -> value

  val extract: unit -> value list
  val intract: value list -> unit
end

18
module Make(X : Custom.T) : S with type value = X.t