Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
why3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nils Fitinghoff
why3
Commits
85fd313b
Commit
85fd313b
authored
6 years ago
by
Mário Pereira
Browse files
Options
Downloads
Patches
Plain Diff
OCaml printer: cosmetic
parent
64b9237d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mlw/ocaml_printer.ml
+5
-6
5 additions, 6 deletions
src/mlw/ocaml_printer.ml
with
5 additions
and
6 deletions
src/mlw/ocaml_printer.ml
+
5
−
6
View file @
85fd313b
...
@@ -391,12 +391,10 @@ module Print = struct
...
@@ -391,12 +391,10 @@ module Print = struct
and
print_let_def
?
(
functor_arg
=
false
)
info
fmt
=
function
and
print_let_def
?
(
functor_arg
=
false
)
info
fmt
=
function
|
Lvar
(
pv
,
{
e_node
=
Eany
ty
})
when
functor_arg
->
|
Lvar
(
pv
,
{
e_node
=
Eany
ty
})
when
functor_arg
->
fprintf
fmt
"@[<hov 2>val %a : %a@]"
fprintf
fmt
"@[<hov 2>val %a : %a@]"
(
print_lident
info
)
(
pv_name
pv
)
(
print_lident
info
)
(
pv_name
pv
)
(
print_ty
info
)
ty
;
(
print_ty
info
)
ty
;
|
Lvar
(
pv
,
e
)
->
|
Lvar
(
pv
,
e
)
->
fprintf
fmt
"@[<hov 2>let %a =@ %a@]"
fprintf
fmt
"@[<hov 2>let %a =@ %a@]"
(
print_lident
info
)
(
pv_name
pv
)
(
print_lident
info
)
(
pv_name
pv
)
(
print_expr
info
)
e
(
print_expr
info
)
e
;
|
Lsym
(
rs
,
res
,
args
,
ef
)
->
|
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_lident
info
)
rs
.
rs_name
...
@@ -513,11 +511,12 @@ module Print = struct
...
@@ -513,11 +511,12 @@ module Print = struct
|
Eraise
(
xs
,
e_opt
)
->
|
Eraise
(
xs
,
e_opt
)
->
print_raise
~
paren
info
xs
fmt
e_opt
print_raise
~
paren
info
xs
fmt
e_opt
|
Efor
(
pv1
,
pv2
,
dir
,
pv3
,
e
)
->
|
Efor
(
pv1
,
pv2
,
dir
,
pv3
,
e
)
->
if
is_mapped_to_int
info
pv1
.
pv_ity
then
if
is_mapped_to_int
info
pv1
.
pv_ity
then
begin
fprintf
fmt
"@[<hov 2>for %a = %a %a %a do@ @[%a@]@ done@]"
fprintf
fmt
"@[<hov 2>for %a = %a %a %a do@ @[%a@]@ done@]"
(
print_lident
info
)
(
pv_name
pv1
)
(
print_lident
info
)
(
pv_name
pv2
)
(
print_lident
info
)
(
pv_name
pv1
)
(
print_lident
info
)
(
pv_name
pv2
)
print_for_direction
dir
(
print_lident
info
)
(
pv_name
pv3
)
print_for_direction
dir
(
print_lident
info
)
(
pv_name
pv3
)
(
print_expr
info
)
e
(
print_expr
info
)
e
;
forget_pv
pv1
end
else
else
let
for_id
=
id_register
(
id_fresh
"for_loop_to"
)
in
let
for_id
=
id_register
(
id_fresh
"for_loop_to"
)
in
let
cmp
,
op
=
match
dir
with
let
cmp
,
op
=
match
dir
with
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment