Module IR.Subtype

The Smallfoot Intermediate Language: Subtypes

module F = Stdlib.Format
type t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
val hash_normalize : t -> t
val hash_normalize_opt : t option -> t option
val hash_normalize_list : t list -> t list
val pp : F.formatter -> t -> unit
val exact : t
val subtypes_cast : t

denotes the current type and any subtypes

val subtypes_instof : t
val is_known_subtype : Tenv.t -> Typ.Name.t -> Typ.Name.t -> bool

is_known_subtype tenv c1 c2 returns true if there is enough information in tenv to prove that c1 is a subtype of c2. Note that not (is_known_subtype tenv c1 c2) == true does not imply that is_known_not_subtype tenv c1 c2 == true

val is_instof : t -> bool