sig type t val compare : t -> t -> int val weight : t -> int end