Module Retyping

type retype_error
exception RetypeError of retype_error
val get_type_of : ?⁠polyprop:bool -> ?⁠lax:bool -> Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.types
val get_type_of_constr : ?⁠polyprop:bool -> ?⁠lax:bool -> Environ.env -> ?⁠uctx:UState.t -> Constr.t -> Constr.types

No-evar version of get_type_of

val get_sort_of : ?⁠polyprop:bool -> Environ.env -> Evd.evar_map -> EConstr.types -> Sorts.t
val get_sort_family_of : ?⁠polyprop:bool -> Environ.env -> Evd.evar_map -> EConstr.types -> Sorts.family
val get_judgment_of : Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.unsafe_judgment

Makes an unsafe judgment from a constr

val type_of_global_reference_knowing_parameters : Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr array -> EConstr.types
val type_of_global_reference_knowing_conclusion : Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.types -> Evd.evar_map * EConstr.types
val sorts_of_context : Environ.env -> Evd.evar_map -> EConstr.rel_context -> Sorts.t list
val expand_projection : Environ.env -> Evd.evar_map -> Names.Projection.t -> EConstr.constr -> EConstr.constr list -> EConstr.constr
val print_retype_error : retype_error -> Pp.t
val relevance_of_term : Environ.env -> Evd.evar_map -> EConstr.constr -> Sorts.relevance
val relevance_of_type : Environ.env -> Evd.evar_map -> EConstr.types -> Sorts.relevance
val relevance_of_sort : EConstr.ESorts.t -> Sorts.relevance
val relevance_of_sort_family : Sorts.family -> Sorts.relevance