Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
3a34dce6
Commit
3a34dce6
authored
May 04, 2017
by
Mário Pereira
Browse files
OCaml printer: fixed some parentheses in patterns
parent
7ba519d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/mlw/ocaml_printer.ml
View file @
3a34dce6
...
...
@@ -299,11 +299,11 @@ module Print = struct
|
[]
,
[]
->
(
print_uident
info
)
fmt
rs
.
rs_name
|
[]
,
[
t
]
->
fprintf
fmt
"@[<hov 2>%a %a@]"
(
print_uident
info
)
rs
.
rs_name
(
print_expr
info
)
t
fprintf
fmt
(
protect_on
paren
"@[<hov 2>%a %a@]"
)
(
print_uident
info
)
rs
.
rs_name
(
print_expr
~
paren
:
true
info
)
t
|
[]
,
tl
->
fprintf
fmt
"@[<hov 2>%a (%a)@]"
(
print_uident
info
)
rs
.
rs_name
(
print_list
comma
(
print_expr
info
))
tl
fprintf
fmt
(
protect_on
paren
"@[<hov 2>%a (%a)@]"
)
(
print_uident
info
)
rs
.
rs_name
(
print_list
comma
(
print_expr
info
))
tl
|
pjl
,
tl
->
let
equal
fmt
()
=
fprintf
fmt
" = "
in
fprintf
fmt
"@[<hov 2>{ @[%a@] }@]"
...
...
@@ -322,9 +322,9 @@ module Print = struct
fprintf
fmt
"@[<hov 2>let %a =@ %a@]"
(
print_lident
info
)
(
pv_name
pv
)
(
print_expr
info
)
e
;
|
Lsym
(
rs
,
res
,
args
,
ef
)
->
fprintf
fmt
"@[<hov 2>let %a@[%a@] : %a@ =@ @[%a@]@]"
fprintf
fmt
"@[<hov 2>let %a
@[%a@] : %a@ =@ @[%a@]@]"
(
print_lident
info
)
rs
.
rs_name
(
print_list
_pre
space
(
print_vs_arg
info
))
args
(
print_list
space
(
print_vs_arg
info
))
args
(
print_ty
info
)
res
(
print_expr
info
)
ef
;
forget_vars
args
|
Lrec
rdef
->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment