summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSon Ho2021-12-03 14:41:42 +0100
committerSon Ho2021-12-03 14:41:42 +0100
commit975b8a067bf6ff69256896f0b2cf7085c9ad142a (patch)
tree644ce8bc875aa307d0b29b43cdc46d1f2394b2c8 /src
parent3562ff88d2c65d018b473fc2fb07359f95e6b2f9 (diff)
Make minor cleanup
Diffstat (limited to '')
-rw-r--r--src/Print.ml5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Print.ml b/src/Print.ml
index 9863507e..27b5538d 100644
--- a/src/Print.ml
+++ b/src/Print.ml
@@ -222,9 +222,6 @@ module Values = struct
match v.value with
| Concrete cv -> constant_value_to_string cv
| Adt av -> (
- let is_tuple =
- match v.ty with T.Adt (T.Tuple, _, _) -> true | _ -> false
- in
let field_values =
List.map (g_typed_value_to_string fmt gfmt) av.field_values
in
@@ -233,6 +230,7 @@ module Values = struct
(* Tuple *)
"(" ^ String.concat ", " field_values ^ ")"
| T.Adt (T.AdtId def_id, _, _) ->
+ (* "Regular" ADT *)
let adt_ident =
match av.variant_id with
| Some vid -> fmt.adt_variant_to_string def_id vid
@@ -254,6 +252,7 @@ module Values = struct
adt_ident ^ " { " ^ field_values ^ " }"
else adt_ident
| T.Adt (T.Assumed aty, _, _) -> (
+ (* Assumed type *)
match (aty, field_values) with
| Box, [ bv ] -> "@Box(" ^ bv ^ ")"
| _ -> failwith "Inconsistent value")