Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
124
Issues
124
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
1ec65bb9
Commit
1ec65bb9
authored
Mar 26, 2019
by
Sylvain Dailler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove invalid usage of Opt.map
parent
10306ad1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
src/transform/ind_itp.ml
src/transform/ind_itp.ml
+9
-7
No files found.
src/transform/ind_itp.ml
View file @
1ec65bb9
...
...
@@ -76,13 +76,15 @@ let revert ?tr g d : Term.term =
|
Ddata
_
->
raise
(
Arg_trans
"revert: cannot revert type"
)
|
Dparam
ls
->
(
try
let
attrs
=
Opt
.
map2
(
fun
tr
ls
->
tr
ls
)
tr
(
Some
ls
)
in
let
attrs
=
match
tr
with
|
None
->
None
|
Some
tr
->
Some
(
tr
ls
)
in
let
new_ident
=
Ident
.
id_fresh
?
attrs
ls
.
ls_name
.
Ident
.
id_string
in
let
new_var
=
Term
.
create_vsymbol
new_ident
(
Opt
.
get
ls
.
Term
.
ls_value
)
in
let
g
=
t_replace
(
t_app_infer
ls
[]
)
(
t_var
new_var
)
g
in
t_forall_close
[
new_var
]
[]
g
with
|
_
->
raise
(
Arg_trans
(
"revert: cannot revert:"
^
ls
.
ls_name
.
Ident
.
id_string
)))
|
e
->
raise
(
Arg_trans
(
"revert: cannot revert:"
^
ls
.
ls_name
.
Ident
.
id_string
)))
(* TODO extend this *)
|
Dlogic
_
->
raise
(
Arg_trans
"revert: cannot revert logic decls"
)
...
...
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