change or-pattern printing to use spaces instead of cuts

(A p1 | B p2 | C p3) instead of (A p1|B p2|C p3)
master
Gabriel Scherer 2020-11-03 16:29:06 +01:00
parent bdcd9baa03
commit 89d6a2094b
3 changed files with 3 additions and 3 deletions

View File

@ -416,7 +416,7 @@ and pattern_or ctxt f x =
| [] -> assert false
| [x] -> pattern1 ctxt f x
| orpats ->
pp f "@[<hov0>%a@]" (list ~sep:"@,|" (pattern1 ctxt)) orpats
pp f "@[<hov0>%a@]" (list ~sep:"@ | " (pattern1 ctxt)) orpats
and pattern1 ctxt (f:Format.formatter) (x:pattern) : unit =
let rec pattern_list_helper f = function

View File

@ -78,7 +78,7 @@
]
]
let rec fib = function | 0|1 -> 1 | n -> (fib (n - 1)) + (fib (n - 2))
let rec fib = function | 0 | 1 -> 1 | n -> (fib (n - 1)) + (fib (n - 2))
[
structure_item (test_locations.ml[17,534+0]..test_locations.ml[19,572+34])
Tstr_value Rec

View File

@ -78,7 +78,7 @@
]
]
let rec fib = function | 0|1 -> 1 | n -> (fib (n - 1)) + (fib (n - 2))
let rec fib = function | 0 | 1 -> 1 | n -> (fib (n - 1)) + (fib (n - 2))
[
structure_item
Tstr_value Rec