summaryrefslogtreecommitdiffstats
path: root/theories/util.v
diff options
context:
space:
mode:
Diffstat (limited to 'theories/util.v')
-rw-r--r--theories/util.v12
1 files changed, 12 insertions, 0 deletions
diff --git a/theories/util.v b/theories/util.v
new file mode 100644
index 0000000..c718622
--- /dev/null
+++ b/theories/util.v
@@ -0,0 +1,12 @@
1From iris.heap_lang Require Import notation.
2
3Definition loc_to_val (ℓ : loc) : val := #ℓ.
4Definition val_opt_hl (mv : option val) : val :=
5 match mv with
6 | None => NONEV
7 | Some v => SOMEV v
8 end.
9Definition loc_opt_hl : option loc → val :=
10 val_opt_hl ∘ fmap loc_to_val.
11Arguments loc_to_val _ / : assert.
12Arguments loc_opt_hl !_ / : assert.