diff options
author | Son Ho | 2021-11-29 23:20:02 +0100 |
---|---|---|
committer | Son Ho | 2021-11-29 23:20:02 +0100 |
commit | 3952c51d7e63b754642ef2e1ea8b64d4aceccdc6 (patch) | |
tree | 1e1b01516a5a2f44a09fac6ba37526efe6810a70 /src/Expressions.ml | |
parent | 46c0648948caa9f57cdd7e8561470e598eb814ab (diff) |
Start deriving formatters for debugging
Diffstat (limited to 'src/Expressions.ml')
-rw-r--r-- | src/Expressions.ml | 11 |
1 files changed, 7 insertions, 4 deletions
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 |