From 3952c51d7e63b754642ef2e1ea8b64d4aceccdc6 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Mon, 29 Nov 2021 23:20:02 +0100 Subject: Start deriving formatters for debugging --- src/Expressions.ml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Expressions.ml') diff --git a/src/Expressions.ml b/src/Expressions.ml index 7ae6ab01..20431f18 100644 --- a/src/Expressions.ml +++ b/src/Expressions.ml @@ -6,20 +6,22 @@ open Values type field_proj_kind = | ProjAdt of TypeDefId.id * VariantId.id option | ProjTuple of int +[@@deriving show] (* arity of the tuple *) type projection_elem = | Deref | DerefBox | Field of field_proj_kind * FieldId.id +[@@deriving show] -type projection = projection_elem list +type projection = projection_elem list [@@deriving show] -type place = { var_id : VarId.id; projection : projection } +type place = { var_id : VarId.id; projection : projection } [@@deriving show] -type borrow_kind = Shared | Mut | TwoPhaseMut +type borrow_kind = Shared | Mut | TwoPhaseMut [@@deriving show] -type unop = Not | Neg +type unop = Not | Neg [@@deriving show] (** A binary operation @@ -45,6 +47,7 @@ type binop = | Mul | Shl | Shr +[@@deriving show] (** Constant value for an operand -- cgit v1.2.3