summaryrefslogtreecommitdiff
path: root/compiler/PureUtils.ml
diff options
context:
space:
mode:
authorSon Ho2022-10-27 11:52:13 +0200
committerSon HO2022-10-27 12:58:47 +0200
commitc1b2b95bf5bfdf62b004bff4a729655663519448 (patch)
treedf559d39fc5b92dc64fca7d2002cdc8e46d67715 /compiler/PureUtils.ml
parent2fb82b54b1b2380d457fb4cbe9a7320468903d81 (diff)
Move constant_value to PrimitiveValues.ml
Diffstat (limited to '')
-rw-r--r--compiler/PureUtils.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/PureUtils.ml b/compiler/PureUtils.ml
index 39f3d76a..f5756046 100644
--- a/compiler/PureUtils.ml
+++ b/compiler/PureUtils.ml
@@ -35,16 +35,16 @@ let dest_arrow_ty (ty : ty) : ty * ty =
| Arrow (arg_ty, ret_ty) -> (arg_ty, ret_ty)
| _ -> raise (Failure "Unreachable")
-let compute_constant_value_ty (cv : constant_value) : ty =
+let compute_primitive_value_ty (cv : primitive_value) : ty =
match cv with
- | V.Scalar sv -> Integer sv.V.int_ty
+ | PV.Scalar sv -> Integer sv.PV.int_ty
| Bool _ -> Bool
| Char _ -> Char
| String _ -> Str
-let mk_typed_pattern_from_constant_value (cv : constant_value) : typed_pattern =
- let ty = compute_constant_value_ty cv in
- { value = PatConcrete cv; ty }
+let mk_typed_pattern_from_primitive_value (cv : primitive_value) : typed_pattern =
+ let ty = compute_primitive_value_ty cv in
+ { value = PatConstant cv; ty }
let mk_let (monadic : bool) (lv : typed_pattern) (re : texpression)
(next_e : texpression) : texpression =