diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-04-27 07:35:59 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-04-27 07:35:59 -0400 |
commit | 0e6213b7c363e1624c35921629c338dfee215353 (patch) | |
tree | 9419cd55c53f38da8c5958df4e698a3e10962a05 | |
parent | 56de35fede259cc08e14e6818b407d0fc2096436 (diff) |
Omit unnecessary parens around arrows in pretty-printing
-rw-r--r-- | src/elab_print.sml | 2 | ||||
-rw-r--r-- | tests/pprint.ur | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/elab_print.sml b/src/elab_print.sml index c25576ba..37669312 100644 --- a/src/elab_print.sml +++ b/src/elab_print.sml @@ -87,7 +87,7 @@ fun p_explicitness e = fun p_con' par env (c, _) = case c of - TFun (t1, t2) => parenIf true (box [p_con' true env t1, + TFun (t1, t2) => parenIf par (box [p_con' true env t1, space, string "->", space, diff --git a/tests/pprint.ur b/tests/pprint.ur new file mode 100644 index 00000000..5d4f7f04 --- /dev/null +++ b/tests/pprint.ur @@ -0,0 +1,4 @@ +fun isNone [a] (x : option a) = + case x of + None => True + | Some _ => False |