aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2003-09-10 09:24:03 +0000
committerherbelin2003-09-10 09:24:03 +0000
commit3a75fd264cd80d75af7aab25ffd9626a285c6b14 (patch)
tree8d034c289a76965ea4b3f54d044a329acc62bc2f
parentc98685e33d3da21aed9d24b07b3071fd14be583c (diff)
Pretty-pretting fix
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4340 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--translate/ppconstrnew.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/translate/ppconstrnew.ml b/translate/ppconstrnew.ml
index c30c07c3a6..438c1cc050 100644
--- a/translate/ppconstrnew.ml
+++ b/translate/ppconstrnew.ml
@@ -390,7 +390,9 @@ let rec pr inherited a =
let (strm,prec) = match a with
| CRef r -> pr_reference r, latom
| CFix (_,id,fix) ->
- hov 0 (str "fix " ++ pr_recursive (pr_fixdecl pr) (snd id) fix),
+ let p = hov 0 (str"fix " ++ pr_recursive (pr_fixdecl pr) (snd id) fix) in
+ (if List.length fix = 1 & prec_less (fst inherited) ltop
+ then str"(" ++ p ++ str")" else p),
lfix
| CCoFix (_,id,cofix) ->
hov 0 (str "cofix " ++ pr_recursive (pr_cofixdecl pr) (snd id) cofix),