Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
aeac20ca
Commit
aeac20ca
authored
Feb 18, 2020
by
David Bühler
Committed by
Andre Maroneze
Apr 06, 2020
Browse files
[Eva] Fixes structure for ocaml 4.05.
parent
2df5337b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/value/utils/structure.ml
View file @
aeac20ca
...
...
@@ -139,7 +139,8 @@ module Open
open
Shape
let
rec
mem
:
type
a
.
'
v
Shape
.
key
->
a
structure
->
bool
=
fun
key
->
function
|
Unit
|
Void
->
false
|
Unit
->
false
|
Void
->
false
|
Leaf
(
k
,
_
)
->
Shape
.
equal
key
k
|
Node
(
left
,
right
)
->
mem
key
left
||
mem
key
right
|
Option
(
s
,
_
)
->
mem
key
s
...
...
@@ -154,7 +155,8 @@ module Open
let
lift_get
f
(
Get
(
key
,
get
))
=
Get
(
key
,
fun
t
->
get
(
f
t
))
let
rec
compute_getters
:
type
a
.
a
structure
->
(
a
getter
)
KMap
.
t
=
function
|
Unit
|
Void
->
KMap
.
empty
|
Unit
->
KMap
.
empty
|
Void
->
KMap
.
empty
|
Leaf
(
key
,
_
)
->
KMap
.
singleton
key
(
Get
(
key
,
fun
(
t
:
a
)
->
t
))
|
Node
(
left
,
right
)
->
let
l
=
compute_getters
left
and
r
=
compute_getters
right
in
...
...
@@ -180,7 +182,8 @@ module Open
let
lift_set
f
(
Set
(
key
,
set
))
=
Set
(
key
,
fun
v
b
->
f
(
fun
a
->
set
v
a
)
b
)
let
rec
compute_setters
:
type
a
.
a
structure
->
(
a
setter
)
KMap
.
t
=
function
|
Unit
|
Void
->
KMap
.
empty
|
Unit
->
KMap
.
empty
|
Void
->
KMap
.
empty
|
Leaf
(
key
,
_
)
->
KMap
.
singleton
key
(
Set
(
key
,
fun
v
_t
->
v
))
|
Node
(
left
,
right
)
->
let
l
=
compute_setters
left
and
r
=
compute_setters
right
in
...
...
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