package rocq-runtime
Install
Dune Dependency
Authors
Maintainers
Sources
md5=8d522602d23e7a665631826dab9aa92b
sha512=f4f76a6a178e421c99ee7a331a2fd97a06e9c5d0168d7e60c44e3820d8e1a124370ea104ad90c7f87a9a1e9d87b2d0d7d2d387c998feeaed4a75ed04e176a4be
doc/rocq-runtime.kernel/Typeops/index.html
Module Typeops
Source
Typing functions (not yet tagged as safe)
They return unsafe judgments that are "in context" of a set of (local) universe variables (the ones that appear in the term) and associated constraints. In case of polymorphic definitions, these variables and constraints will be generalized.
When typechecking a term it may be updated to fix relevance marks. Do not discard the result.
Basic operations of the typing machine.
If j
is the judgement $
c:t $
, then assumption_of_judgement env j
returns the type $
c $
, checking that $
t $
is a sort.
Type of sorts.
Type of a bound variable.
Type of variables
type of a constant
val type_of_projection :
Environ.env ->
Names.Projection.t ->
Constr.constr ->
Constr.types ->
Sorts.relevance * Constr.types
type of an applied projection
Type of a product.
val check_cast :
Environ.env ->
Environ.unsafe_judgment ->
Constr.cast_kind ->
Environ.unsafe_type_judgment ->
unit
Type of a cast.
Type of global references.
val type_of_global_in_context :
Environ.env ->
Names.GlobRef.t ->
Constr.types * UVars.AbstractContext.t
Returns the type of the global reference, by creating a fresh instance of polymorphic references and computing their instantiated universe context. The type should not be used without pushing it's universe context in the environmnent of usage. For non-universe-polymorphic constants, it does not matter.
Miscellaneous.
val check_hyps_inclusion :
Environ.env ->
?evars:CClosure.evar_handler ->
Names.GlobRef.t ->
Constr.named_context ->
unit
Check that hyps are included in env and fails with error otherwise
Types for primitives
val type_of_prim_type :
Environ.env ->
UVars.Instance.t ->
'a CPrimitives.prim_type ->
Constr.types
val type_of_prim_or_type :
Environ.env ->
UVars.Instance.t ->
CPrimitives.op_or_type ->
Constr.types
Matches must be annotated with the indices when going from SProp to non SProp (implies 1 or 0 constructors).