summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Print.ml10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Print.ml b/src/Print.ml
index 7c1ef79a..db0b325a 100644
--- a/src/Print.ml
+++ b/src/Print.ml
@@ -274,6 +274,16 @@ module Values = struct
(* Assumed type *)
match (aty, field_values) with
| Box, [ bv ] -> "@Box(" ^ bv ^ ")"
+ | Option, _ ->
+ if av.variant_id = Some T.option_some_id then
+ "@Option::Some("
+ ^ Collections.List.to_cons_nil field_values
+ ^ ")"
+ else if av.variant_id = Some T.option_none_id then (
+ assert (field_values = []);
+ "@Option::None")
+ else failwith "Unreachable"
+ | Vec, _ -> "@Vec[" ^ String.concat ", " field_values ^ "]"
| _ -> failwith "Inconsistent value")
| _ -> failwith "Inconsistent typed value")
| Bottom -> "⊥ : " ^ PT.ty_to_string ty_fmt v.ty