type t = Type_hierarchy.path [@@deriving equal] let rec base (t : t) : t = match Type_hierarchy.super t with | None -> (* [t] is a base type *) t | Some t' -> base t' (** [a] is a (strict) supertype of [b] *) let is_super t ~super ~strict = Type_hierarchy.is_prefix super ~prefix:t && (* strict → t ≠ super *) ((not strict) || not ([%equal: t] t super)) let polarity = Type_hierarchy.polarity