summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSon Ho2021-12-03 17:51:51 +0100
committerSon Ho2021-12-03 17:51:51 +0100
commitc467e111fdbe2d7b051be2eacdbe17a8200b1489 (patch)
tree86057cd528bfe59e6578a1ce727fa429f7e624f3 /src
parentdeb37902bf8b7946f31a3b36f8c5adbaddbfb5a6 (diff)
Reorder definitions in Values.ml
Diffstat (limited to 'src')
-rw-r--r--src/Values.ml62
1 files changed, 30 insertions, 32 deletions
diff --git a/src/Values.ml b/src/Values.ml
index 87c6ec9f..804d7580 100644
--- a/src/Values.ml
+++ b/src/Values.ml
@@ -131,24 +131,6 @@ type value =
and adt_value =
(erased_region, symbolic_proj_comp, borrow_content, loan_content) g_adt_value
-and typed_value =
- ( erased_region,
- symbolic_proj_comp,
- borrow_content,
- loan_content )
- g_typed_value
-[@@deriving
- show,
- visitors
- {
- name = "iter_typed_value";
- variety = "iter";
- ancestors = [ "iter_typed_value_base" ];
- nude = true (* Don't inherit [VisitorsRuntime.iter] *);
- concrete = true;
- }]
-(** "Regular" typed value (we map variables to typed values) *)
-
and borrow_content =
| SharedBorrow of (BorrowId.id[@opaque]) (** A shared value *)
| MutBorrow of (BorrowId.id[@opaque]) * typed_value
@@ -168,7 +150,24 @@ and borrow_content =
and loan_content =
| SharedLoan of (BorrowId.set_t[@opaque]) * typed_value
| MutLoan of (BorrowId.id[@opaque])
-[@@deriving show]
+
+and typed_value =
+ ( erased_region,
+ symbolic_proj_comp,
+ borrow_content,
+ loan_content )
+ g_typed_value
+[@@deriving
+ show,
+ visitors
+ {
+ name = "iter_typed_value";
+ variety = "iter";
+ ancestors = [ "iter_typed_value_base" ];
+ nude = true (* Don't inherit [VisitorsRuntime.iter] *);
+ concrete = true;
+ }]
+(** "Regular" typed value (we map variables to typed values) *)
type abstract_shared_borrows =
| AsbSet of BorrowId.set_t
@@ -210,18 +209,6 @@ type avalue = (region, aproj, aborrow_content, aloan_content) g_value
and aadt_value = (region, aproj, aborrow_content, aloan_content) g_adt_value
-and typed_avalue = (region, aproj, aborrow_content, aloan_content) g_typed_value
-[@@deriving
- show,
- visitors
- {
- name = "iter_typed_avalue";
- variety = "iter";
- ancestors = [ "iter_typed_avalue_base" ];
- nude = true (* Don't inherit [VisitorsRuntime.iter] *);
- concrete = true;
- }]
-
and aloan_content =
| AMutLoan of (BorrowId.id[@opaque]) * typed_avalue
| ASharedLoan of (BorrowId.set_t[@opaque]) * typed_value * typed_avalue
@@ -239,7 +226,18 @@ and aborrow_content =
| AIgnoredMutBorrow of typed_avalue
| AEndedIgnoredMutLoan of { given_back : typed_avalue; child : typed_avalue }
| AIgnoredSharedBorrow of abstract_shared_borrows
-[@@deriving show]
+
+and typed_avalue = (region, aproj, aborrow_content, aloan_content) g_typed_value
+[@@deriving
+ show,
+ visitors
+ {
+ name = "iter_typed_avalue";
+ variety = "iter";
+ ancestors = [ "iter_typed_avalue_base" ];
+ nude = true (* Don't inherit [VisitorsRuntime.iter] *);
+ concrete = true;
+ }]
type abs = {
abs_id : AbstractionId.id;