aboutsummaryrefslogtreecommitdiffhomepage
path: root/engine/evar_kinds.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2018-07-19 14:50:17 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2018-07-19 14:50:17 +0200
commitfc1da651e93c08b281dc224dbbd0284390240a47 (patch)
tree183c80e219362de80306c9cd3d42d9e4617fabb8 /engine/evar_kinds.ml
parent6b99def0765b4b88773c3c9c272552035a7da3d1 (diff)
parent83afcfd21be0084b2eff33ffd9e2d8b785679d4a (diff)
Merge PR #7941: Extend QuestionMark to produce a better error message in case of missing record field
Diffstat (limited to 'engine/evar_kinds.ml')
-rw-r--r--engine/evar_kinds.ml17
1 files changed, 16 insertions, 1 deletions
diff --git a/engine/evar_kinds.ml b/engine/evar_kinds.ml
index 12e2fda8e..ea1e57254 100644
--- a/engine/evar_kinds.ml
+++ b/engine/evar_kinds.ml
@@ -21,12 +21,27 @@ type matching_var_kind = FirstOrderPatVar of Id.t | SecondOrderPatVar of Id.t
type subevar_kind = Domain | Codomain | Body
+(* maybe this should be a Projection.t *)
+type record_field = { fieldname : Constant.t; recordname : Names.inductive }
+
+type question_mark = {
+ qm_obligation: obligation_definition_status;
+ qm_name: Name.t;
+ qm_record_field: record_field option;
+}
+
+let default_question_mark = {
+ qm_obligation=Define true;
+ qm_name=Anonymous;
+ qm_record_field=None;
+}
+
type t =
| ImplicitArg of GlobRef.t * (int * Id.t option)
* bool (** Force inference *)
| BinderType of Name.t
| NamedHole of Id.t (* coming from some ?[id] syntax *)
- | QuestionMark of obligation_definition_status * Name.t
+ | QuestionMark of question_mark
| CasesType of bool (* true = a subterm of the type *)
| InternalHole
| TomatchTypeParameter of inductive * int