aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Herbelin2016-11-20 17:58:07 +0100
committerMaxime Dénès2016-12-02 15:21:37 +0100
commit4e551415f20ad696c319b32b349e4499c2505388 (patch)
tree77263535913a744b141a1644cfbfbf55a2c33130
parent17c3f8e2d339e5b6f60c89ad17e578d786d2b9ca (diff)
Protect printing of ltac's "context [...]" from possible collision
with user-level notations by inserting spaces.
-rw-r--r--printing/pptactic.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/printing/pptactic.ml b/printing/pptactic.ml
index 4b86381b49..fedc62f44f 100644
--- a/printing/pptactic.ml
+++ b/printing/pptactic.ml
@@ -219,7 +219,7 @@ module Make
| ConstrContext ((_,id),c) ->
hov 0
(keyword "context" ++ spc () ++ pr_id id ++ spc () ++
- str "[" ++ prlc c ++ str "]")
+ str "[ " ++ prlc c ++ str " ]")
| ConstrTypeOf c ->
hov 1 (keyword "type of" ++ spc() ++ prc c)
| ConstrTerm c when test c ->
@@ -676,9 +676,9 @@ module Make
| Subterm (b,None,a) ->
(** ppedrot: we don't make difference between [appcontext] and [context]
anymore, and the interpretation is governed by a flag instead. *)
- keyword "context" ++ str" [" ++ pr_pat a ++ str "]"
+ keyword "context" ++ str" [ " ++ pr_pat a ++ str " ]"
| Subterm (b,Some id,a) ->
- keyword "context" ++ spc () ++ pr_id id ++ str "[" ++ pr_pat a ++ str "]"
+ keyword "context" ++ spc () ++ pr_id id ++ str "[ " ++ pr_pat a ++ str " ]"
let pr_match_hyps pr_pat = function
| Hyp (nal,mp) ->