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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nils Fitinghoff
why3
Commits
0872cdf7
Commit
0872cdf7
authored
6 years ago
by
nilfit
Browse files
Options
Downloads
Patches
Plain Diff
don't box built-in types
parent
9f07b0cc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mlw/rust_printer.ml
+9
-1
9 additions, 1 deletion
src/mlw/rust_printer.ml
with
9 additions
and
1 deletion
src/mlw/rust_printer.ml
+
9
−
1
View file @
0872cdf7
...
@@ -465,6 +465,10 @@ module MLToRust = struct
...
@@ -465,6 +465,10 @@ module MLToRust = struct
def
=
def
def
=
def
}
}
let
id_of_mlty
t
=
match
t
with
|
Tapp
(
id
,
_
)
->
id
|
_
->
raise
(
TODO
"mlty is not Tapp"
)
let
box_typedefs
(
itl
:
its_defn
list
)
box_fields
box_enum
:
Sid
.
t
*
Sbe
.
t
=
let
box_typedefs
(
itl
:
its_defn
list
)
box_fields
box_enum
:
Sid
.
t
*
Sbe
.
t
=
(* TODO box only fields that are necessary *)
(* TODO box only fields that are necessary *)
...
@@ -486,7 +490,11 @@ module MLToRust = struct
...
@@ -486,7 +490,11 @@ module MLToRust = struct
(* in *)
(* in *)
(* TODO see if something from itl is reachable through the ty *)
(* TODO see if something from itl is reachable through the ty *)
let
needs_box
ty
=
true
in
let
needs_box
ty
=
let
id
=
id_of_mlty
ty
in
let
is_ts
ts
=
id_equal
ts
.
ts_name
id
in
not
(
is_ts
ts_int
||
is_ts
ts_real
||
is_ts
ts_bool
)
in
let
box
its
=
let
box
its
=
(
match
its
.
its_def
with
(
match
its
.
its_def
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