aboutsummaryrefslogtreecommitdiff
path: root/printing
diff options
context:
space:
mode:
authorHugo Herbelin2014-08-07 12:24:29 +0200
committerHugo Herbelin2014-08-12 13:37:07 +0200
commitc48ade3f0d6324872d292932e797ffd718ad57d9 (patch)
tree8437ef0e8f366c0df9dcef5e0189cf075739e7c4 /printing
parent519d2b0e5d6b53c2f2a02ee9b685088fd74be0f6 (diff)
A couple of fixes/improvements in -beautify, but backtracking on
change of printing format of forall (need more thinking).
Diffstat (limited to 'printing')
-rw-r--r--printing/ppconstr.ml2
-rw-r--r--printing/pptactic.ml11
-rw-r--r--printing/ppvernac.ml2
3 files changed, 8 insertions, 7 deletions
diff --git a/printing/ppconstr.ml b/printing/ppconstr.ml
index b38cfa664c..fb40e90d36 100644
--- a/printing/ppconstr.ml
+++ b/printing/ppconstr.ml
@@ -451,7 +451,7 @@ let pr pr sep inherited a =
lfix
| CProdN _ ->
let (bl,a) = extract_prod_binders a in
- hov 2 (
+ hov 0 (
hov 2 (pr_delimited_binders pr_forall spc
(pr mt ltop) bl) ++
str "," ++ pr spc ltop a),
diff --git a/printing/pptactic.ml b/printing/pptactic.ml
index 42a7e894a1..02a21ced6b 100644
--- a/printing/pptactic.ml
+++ b/printing/pptactic.ml
@@ -420,8 +420,9 @@ let pr_in_hyp_as pr_id = function
pr_in (spc () ++ pr_clear_flag clear pr_id id) ++ pr_as_ipat ipat
let pr_clauses default_is_concl pr_id = function
- | { onhyps=Some []; concl_occs=AllOccurrences }
- when (match default_is_concl with Some true -> true | _ -> false) -> mt ()
+ | { onhyps=Some []; concl_occs=occs }
+ when (match default_is_concl with Some true -> true | _ -> false) ->
+ pr_with_occurrences mt (occs,())
| { onhyps=None; concl_occs=AllOccurrences }
when (match default_is_concl with Some false -> true | _ -> false) -> mt ()
| { onhyps=None; concl_occs=NoOccurrences } ->
@@ -706,8 +707,8 @@ and pr_atom1 = function
hov 1 (str "pose" ++ pr_pose pr_constr pr_lconstr na c)
| TacLetTac (na,c,cl,b,e) ->
hov 1 ((if b then str "set" else str "remember") ++
- (if b then pr_pose pr_lconstr else pr_pose_as_style)
- pr_constr na c ++
+ (if b then pr_pose pr_constr pr_lconstr na c
+ else pr_pose_as_style pr_constr na c) ++
pr_opt (fun p -> pr_eqn_ipat p ++ spc ()) e ++
pr_clauses (Some b) pr_ident cl)
(* | TacInstantiate (n,c,ConclLocation ()) ->
@@ -853,7 +854,7 @@ let rec pr_tac inherited tac =
lfun
| TacThens (t,tl) ->
hov 1 (pr_tac (lseq,E) t ++ pr_then () ++ spc () ++
- pr_seq_body (pr_tac ltop) tl),
+ pr_seq_body (pr_opt_tactic (pr_tac ltop)) tl),
lseq
| TacThen (t1,t2) ->
hov 1 (pr_tac (lseq,E) t1 ++ pr_then () ++ spc () ++
diff --git a/printing/ppvernac.ml b/printing/ppvernac.ml
index d01e6a0288..666c0c6d3f 100644
--- a/printing/ppvernac.ml
+++ b/printing/ppvernac.ml
@@ -130,7 +130,7 @@ let pr_search a b pr_p = match a with
| SearchRewrite c -> str"SearchRewrite" ++ spc() ++ pr_p c ++ pr_in_out_modules b
| SearchAbout sl -> str"Search" ++ spc() ++ prlist_with_sep spc pr_search_about sl ++ pr_in_out_modules b
-let pr_locality local = if local then str "Local" ++ spc () else mt ()
+let pr_locality local = if local then str "Local " else mt ()
let pr_explanation (e,b,f) =
let a = match e with