diff options
| author | Maxime Dénès | 2017-09-22 11:27:12 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2017-09-22 11:27:12 +0200 |
| commit | 95305e675a4e21f2425f2ffa9662095d864d9083 (patch) | |
| tree | b1e7804aa956ed5684754b43d8c66243376f9240 | |
| parent | 7c760b08d690922fd15c489dd63a7be534d765ab (diff) | |
| parent | dc5b8f1793c6f7104f0b4762d9887be255709ead (diff) | |
Merge PR #1074: Fix BZ#5750 (recovering ability to print the hole of a context obtained by ltac pattern-matching)
| -rw-r--r-- | pretyping/detyping.ml | 7 | ||||
| -rw-r--r-- | test-suite/bugs/closed/5750.v | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/pretyping/detyping.ml b/pretyping/detyping.ml index 1eb22cdb81..5e14307418 100644 --- a/pretyping/detyping.ml +++ b/pretyping/detyping.ml @@ -460,8 +460,11 @@ and detype_r d flags avoid env sigma t = in GVar (Id.of_string s)) | Meta n -> (* Meta in constr are not user-parsable and are mapped to Evar *) - (* using numbers to be unparsable *) - GEvar (Id.of_string ("M" ^ string_of_int n), []) + if n = Constr_matching.special_meta then + (* Using a dash to be unparsable *) + GEvar (Id.of_string_soft "CONTEXT-HOLE", []) + else + GEvar (Id.of_string_soft ("INTERNAL#" ^ string_of_int n), []) | Var id -> (try let _ = Global.lookup_named id in GRef (VarRef id, None) with Not_found -> GVar id) diff --git a/test-suite/bugs/closed/5750.v b/test-suite/bugs/closed/5750.v new file mode 100644 index 0000000000..6d0e21f5d0 --- /dev/null +++ b/test-suite/bugs/closed/5750.v @@ -0,0 +1,3 @@ +(* Check printability of the hole of the context *) +Goal 0 = 0. +match goal with |- context c [0] => idtac c end. |
