summaryrefslogtreecommitdiff
path: root/compiler/PureUtils.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--compiler/PureUtils.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/PureUtils.ml b/compiler/PureUtils.ml
index ff379bf5..1ab3439c 100644
--- a/compiler/PureUtils.ml
+++ b/compiler/PureUtils.ml
@@ -456,3 +456,9 @@ let mk_result_return_pattern (v : typed_pattern) : typed_pattern =
let opt_unmeta_mplace (e : texpression) : mplace option * texpression =
match e.e with Meta (MPlace mp, e) -> (Some mp, e) | _ -> (None, e)
+
+let mk_state_var (vid : VarId.id) : var =
+ { id = vid; basename = Some ConstStrings.state_basename; ty = mk_state_ty }
+
+let mk_state_texpression (vid : VarId.id) : texpression =
+ { e = Var vid; ty = mk_state_ty }