summaryrefslogtreecommitdiff
path: root/src/pretty_print.ml
diff options
context:
space:
mode:
authorChristopher Pulte2015-10-20 14:28:24 +0100
committerChristopher Pulte2015-10-20 14:28:24 +0100
commit117e58ac3da5d79dab16988b693cdd0908c0bb48 (patch)
treee75c66f2d6ede16924a02f555e34159f6a197f4a /src/pretty_print.ml
parent602adb432b158efa403959454328bc58bddca61b (diff)
fix a-normalisation bug
Diffstat (limited to 'src/pretty_print.ml')
-rw-r--r--src/pretty_print.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pretty_print.ml b/src/pretty_print.ml
index 3ffc67b7..9b5173c3 100644
--- a/src/pretty_print.ml
+++ b/src/pretty_print.ml
@@ -1340,9 +1340,10 @@ let doc_exp_ocaml, doc_let_ocaml =
string "if" ^^ space ^^ string "to_bool" ^^ parens (exp c) ^/^
string "then" ^^ space ^^ (exp t)
| E_if(c,t,e) ->
+ parens (
string "if" ^^ space ^^ string "to_bool" ^^ parens (exp c) ^/^
string "then" ^^ space ^^ group (exp t) ^/^
- string "else" ^^ space ^^ group (exp e)
+ string "else" ^^ space ^^ group (exp e))
| E_for(id,exp1,exp2,exp3,(Ord_aux(order,_)),exp4) ->
let var= doc_id_ocaml id in
let (compare,next) = if order = Ord_inc then string "<=",string "+" else string ">=",string "-" in