Module Class
Classes and coercions.
val try_add_new_coercion_with_target : Names.GlobRef.t -> local:bool -> Decl_kinds.polymorphic -> source:Classops.cl_typ -> target:Classops.cl_typ -> unittry_add_new_coercion_with_target ref s src tgdeclaresrefas a coercion fromsrctotg
val try_add_new_coercion : Names.GlobRef.t -> local:bool -> Decl_kinds.polymorphic -> unittry_add_new_coercion ref sdeclaresref, assumed to be of type(x1:T1)...(xn:Tn)src->tg, as a coercion fromsrctotg
val try_add_new_coercion_subclass : Classops.cl_typ -> local:bool -> Decl_kinds.polymorphic -> unittry_add_new_coercion_subclass cst sexpects thatcstdenotes a transparent constant which unfolds to some classtg; it declares an identity coercion fromcsttotg, named something like"Id_cst_tg"
val try_add_new_coercion_with_source : Names.GlobRef.t -> local:bool -> Decl_kinds.polymorphic -> source:Classops.cl_typ -> unittry_add_new_coercion_with_source ref s srcdeclaresrefas a coercion fromsrctotgwhere the target is inferred from the type ofref
val try_add_new_identity_coercion : Names.Id.t -> local:bool -> Decl_kinds.polymorphic -> source:Classops.cl_typ -> target:Classops.cl_typ -> unittry_add_new_identity_coercion id s src tgenriches the environment with a new definition of nameiddeclared as an identity coercion fromsrctotg
val add_coercion_hook : Decl_kinds.polymorphic -> Lemmas.declaration_hookval add_subclass_hook : Decl_kinds.polymorphic -> Lemmas.declaration_hookval class_of_global : Names.GlobRef.t -> Classops.cl_typ