summaryrefslogtreecommitdiff
path: root/src/toFromInterp_lib_mword.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/toFromInterp_lib_mword.ml')
-rw-r--r--src/toFromInterp_lib_mword.ml22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/toFromInterp_lib_mword.ml b/src/toFromInterp_lib_mword.ml
index d983a6ba..816ae136 100644
--- a/src/toFromInterp_lib_mword.ml
+++ b/src/toFromInterp_lib_mword.ml
@@ -104,28 +104,28 @@ let zvectorToInterpValue typq_'n typq_'ord typq_'a v =
let vectorFromInterpValue = zvectorFromInterpValue
let vectorToInterpValue = zvectorToInterpValue
+let zbitFromInterpValue v = match v with
+ | V_bit b -> b
+ | _ -> failwith "invalid interpreter value for bit"
+
+let zbitToInterpValue v = V_bit v
+
+let bitFromInterpValue = zbitFromInterpValue
+let bitToInterpValue = zbitToInterpValue
+
let zbitvectorFromInterpValue typq_'n typq_'ord v = match v with
| V_vector vs ->
assert (Big_int.of_int (List.length vs) = typq_'n);
- vs
+ List.map bitFromInterpValue vs
| _ -> failwith "invalid interpreter value for vector"
let zbitvectorToInterpValue typq_'n typq_'ord v =
assert (Big_int.of_int (List.length v) = typq_'n);
- V_vector v
+ V_vector (List.map bitToInterpValue v)
let bitvectorFromInterpValue = zvectorFromInterpValue
let bitvectorToInterpValue = zvectorToInterpValue
-let zbitFromInterpValue v = match v with
- | V_bit b -> b
- | _ -> failwith "invalid interpreter value for bit"
-
-let zbitToInterpValue v = V_bit v
-
-let bitFromInterpValue = zbitFromInterpValue
-let bitToInterpValue = zbitToInterpValue
-
let optionFromInterpValue typq_'a v = match v with
| V_ctor ("None", [v0]) -> None
| V_ctor ("Some", [v0]) -> Some (typq_'a v0)