summaryrefslogtreecommitdiff
path: root/compiler/PureUtils.ml
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/PureUtils.ml')
-rw-r--r--compiler/PureUtils.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/PureUtils.ml b/compiler/PureUtils.ml
index a60bcd78..e86d2a78 100644
--- a/compiler/PureUtils.ml
+++ b/compiler/PureUtils.ml
@@ -57,6 +57,8 @@ let compute_primitive_value_ty (cv : primitive_value) : ty =
| Char _ -> Char
| String _ -> Str
+let var_get_id (v : var) : VarId.id = v.id
+
let mk_typed_pattern_from_primitive_value (cv : primitive_value) : typed_pattern
=
let ty = compute_primitive_value_ty cv in
@@ -73,6 +75,10 @@ let mk_tag (msg : string) (next_e : texpression) : texpression =
let ty = next_e.ty in
{ e; ty }
+let mk_mplace (var_id : E.VarId.id) (name : string option)
+ (projection : mprojection) : mplace =
+ { var_id; name; projection }
+
(** Type substitution *)
let ty_substitute (tsubst : TypeVarId.id -> ty) (ty : ty) : ty =
let obj =