Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Handling of queries.
val infer :
Common.Pos.popt ->
Core.Term.problem ->
Core.Term.ctxt ->
Core.Term.term ->
Core.Term.term * Core.Term.term
infer pos p c t
returns a couple (t',a)
where a
is the type of t
in context c
and under constraints of problem p
; and t'
is the refinement of t
. Note that p
gets modified. Context c
must well sorted.
Fatal
if t
cannot be typed.
val check :
Common.Pos.popt ->
Core.Term.problem ->
Core.Term.ctxt ->
Core.Term.term ->
Core.Term.term ->
Core.Term.term
check pos p c t a
checks that the term t
has type a
in context c
and under the constraints of p
, and returns t
refined. Context c
must be well-sorted. Note that p
is modified.
Fatal
if t
is not of type a
.
val check_sort :
Common.Pos.popt ->
Core.Term.problem ->
Core.Term.ctxt ->
Core.Term.term ->
Core.Term.term * Core.Term.term
check_sort pos p c t
checks that the term t
has type Type
or Kind
in context c
and under the constraints of p
. Context c
must be well sorted.
Fatal
if t
cannot be typed by a sort (Type or Kind).
val handle :
Core.Sig_state.t ->
Proof.proof_state option ->
Parsing.Syntax.p_query ->
result
handle_query ss ps q