aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping/glob_ops.ml
diff options
context:
space:
mode:
authorGravatar Siddharth Bhat <siddu.druid@gmail.com>2018-06-27 22:03:25 +0200
committerGravatar Siddharth Bhat <siddu.druid@gmail.com>2018-07-17 13:14:44 +0200
commit1300da19d13f7e46cf3a4b0b3396604ffc44a6d5 (patch)
tree577f1c1b6dbc64382a7623d77bc6e6756ed45a96 /pretyping/glob_ops.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 'pretyping/glob_ops.ml')
-rw-r--r--pretyping/glob_ops.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/pretyping/glob_ops.ml b/pretyping/glob_ops.ml
index 4dfa789ba..9ed0090ed 100644
--- a/pretyping/glob_ops.ml
+++ b/pretyping/glob_ops.ml
@@ -562,7 +562,11 @@ let rec glob_constr_of_cases_pattern_aux isclosed x = DAst.map_with_loc (fun ?lo
| PatVar (Name id) when not isclosed ->
GVar id
| PatVar Anonymous when not isclosed ->
- GHole (Evar_kinds.QuestionMark (Define false,Anonymous),Namegen.IntroAnonymous,None)
+ GHole (Evar_kinds.QuestionMark {
+ Evar_kinds.qm_obligation=Define false;
+ Evar_kinds.qm_name=Anonymous;
+ Evar_kinds.qm_record_field=None;
+ },Namegen.IntroAnonymous,None)
| _ -> raise Not_found
) x