aboutsummaryrefslogtreecommitdiff
path: root/engine/evar_kinds.ml
diff options
context:
space:
mode:
authorSiddharth Bhat2018-06-27 22:03:25 +0200
committerSiddharth Bhat2018-07-17 13:14:44 +0200
commit1300da19d13f7e46cf3a4b0b3396604ffc44a6d5 (patch)
tree577f1c1b6dbc64382a7623d77bc6e6756ed45a96 /engine/evar_kinds.ml
parentb799252775563b4f46f5ea39cbfc469759e7a296 (diff)
Change QuestionMark for better record field missing error message.
While we were adding a new field into `QuestionMark`, we decided to go ahead and refactor the constructor to hold an actual record. This record now holds the name, obligations, and whether the evar represents a missing record field. This is used to provide better error messages on missing record fields.
Diffstat (limited to 'engine/evar_kinds.ml')
-rw-r--r--engine/evar_kinds.ml11
1 files changed, 10 insertions, 1 deletions
diff --git a/engine/evar_kinds.ml b/engine/evar_kinds.ml
index 12e2fda8e2..bedfd0cbbd 100644
--- a/engine/evar_kinds.ml
+++ b/engine/evar_kinds.ml
@@ -21,12 +21,21 @@ 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;
+}
+
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