summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pretty_print_common.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pretty_print_common.ml b/src/pretty_print_common.ml
index 70f5b749..02cc3574 100644
--- a/src/pretty_print_common.ml
+++ b/src/pretty_print_common.ml
@@ -212,7 +212,7 @@ let doc_typ, doc_atomic_typ, doc_nexp, doc_nexp_constraint =
and atomic_nexp_typ ((Nexp_aux(n,_)) as ne) = match n with
| Nexp_var v -> doc_var v
| Nexp_id i -> braces (doc_id i)
- | Nexp_constant i -> doc_int i
+ | Nexp_constant i -> if i < 0 then parens(doc_int i) else doc_int i
| Nexp_neg _ | Nexp_exp _ | Nexp_times _ | Nexp_sum _ | Nexp_minus _->
group (parens (nexp ne))