Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
why3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Why3
why3
Commits
85fd313b
Commit
85fd313b
authored
6 years ago
by
Mario Pereira
Browse files
Options
Downloads
Patches
Plain Diff
OCaml printer: cosmetic
parent
64b9237d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide 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
and
print_let_def
?
(
functor_arg
=
false
)
info
fmt
=
function
|
Lvar
(
pv
,
{
e_node
=
Eany
ty
})
when
functor_arg
->
fprintf
fmt
"@[<hov 2>val %a : %a@]"
(
print_lident
info
)
(
pv_name
pv
)
(
print_ty
info
)
ty
;
(
print_lident
info
)
(
pv_name
pv
)
(
print_ty
info
)
ty
;
|
Lvar
(
pv
,
e
)
->
fprintf
fmt
"@[<hov 2>let %a =@ %a@]"
(
print_lident
info
)
(
pv_name
pv
)
(
print_expr
info
)
e
;
(
print_lident
info
)
(
pv_name
pv
)
(
print_expr
info
)
e
|
Lsym
(
rs
,
res
,
args
,
ef
)
->
fprintf
fmt
"@[<hov 2>let %a @[%a@] : %a@ =@ @[%a@]@]"
(
print_lident
info
)
rs
.
rs_name
...
...
@@ -513,11 +511,12 @@ module Print = struct
|
Eraise
(
xs
,
e_opt
)
->
print_raise
~
paren
info
xs
fmt
e_opt
|
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@]"
(
print_lident
info
)
(
pv_name
pv1
)
(
print_lident
info
)
(
pv_name
pv2
)
print_for_direction
dir
(
print_lident
info
)
(
pv_name
pv3
)
(
print_expr
info
)
e
(
print_expr
info
)
e
;
forget_pv
pv1
end
else
let
for_id
=
id_register
(
id_fresh
"for_loop_to"
)
in
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