type bag = string [@@deriving eq, ord, show] type contents = (bag * int) list [@@deriving eq, ord, show] type rule = bag * contents [@@deriving eq, ord, show] type rules = rule list [@@deriving eq, ord, show]