Commit beb9b0c2 authored by POTTIER Francois's avatar POTTIER Francois

Print pairs without parentheses.

(The previous code could lead to double pairs of parentheses.)
Cosmetic changes in the printer.
parent 2e8bb630
...@@ -5,9 +5,6 @@ open F ...@@ -5,9 +5,6 @@ open F
let arrow = let arrow =
string "->" string "->"
let backslash =
string "\\"
let doublebackslash = let doublebackslash =
string "\\\\" string "\\\\"
...@@ -69,7 +66,7 @@ and term1 t = ...@@ -69,7 +66,7 @@ and term1 t =
and term2 t = and term2 t =
match t with match t with
| TePair (t1, t2) -> | TePair (t1, t2) ->
group (lparen ^^ term1 t1 ^^ comma ^/^ term2 t2 ^^ rparen) group (term1 t1 ^^ comma ^/^ term2 t2)
| _ -> | _ ->
term1 t term1 t
...@@ -77,8 +74,8 @@ and term3 t = ...@@ -77,8 +74,8 @@ and term3 t =
match t with match t with
| TeAbs (x, ty, t) -> | TeAbs (x, ty, t) ->
block block
(backslash ^^ string "(" ^^ string x ^^ spacecolon) (backslash ^^ lparen ^^ string x ^^ spacecolon)
(break 1 ^^ typ ty ^^ string ")") (break 1 ^^ typ ty ^^ rparen)
(break 1 ^^ dot) (break 1 ^^ dot)
^/^ ^/^
term3 t term3 t
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment