summaryrefslogtreecommitdiff
path: root/compiler/Pure.ml
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/Pure.ml')
-rw-r--r--compiler/Pure.ml24
1 files changed, 18 insertions, 6 deletions
diff --git a/compiler/Pure.ml b/compiler/Pure.ml
index f7445575..2ff8c272 100644
--- a/compiler/Pure.ml
+++ b/compiler/Pure.ml
@@ -1,4 +1,5 @@
open Identifiers
+open Meta
module T = Types
module V = Values
module E = Expressions
@@ -351,8 +352,19 @@ and trait_instance_id =
polymorphic = false;
}]
-type field = { field_name : string option; field_ty : ty } [@@deriving show]
-type variant = { variant_name : string; fields : field list } [@@deriving show]
+type field = {
+ field_name : string option;
+ field_ty : ty;
+ item_meta : item_meta;
+}
+[@@deriving show]
+
+type variant = {
+ variant_name : string;
+ fields : field list;
+ item_meta : item_meta;
+}
+[@@deriving show]
type type_decl_kind = Struct of field list | Enum of variant list | Opaque
[@@deriving show]
@@ -393,7 +405,7 @@ type type_decl = {
the name used at extraction time will be derived from the
llbc_name.
*)
- span : span;
+ item_meta : item_meta;
generics : generic_params;
llbc_generics : Types.generic_params;
(** We use the LLBC generics to generate "pretty" names, for instance
@@ -1086,7 +1098,7 @@ type backend_attributes = {
type fun_decl = {
def_id : FunDeclId.id;
is_local : bool;
- span : span;
+ item_meta : item_meta;
kind : item_kind;
backend_attributes : backend_attributes;
num_loops : int;
@@ -1133,7 +1145,7 @@ type trait_decl = {
is_local : bool;
llbc_name : llbc_name;
name : string;
- span : span;
+ item_meta : item_meta;
generics : generic_params;
llbc_generics : Types.generic_params;
(** We use the LLBC generics to generate "pretty" names, for instance
@@ -1156,7 +1168,7 @@ type trait_impl = {
is_local : bool;
llbc_name : llbc_name;
name : string;
- span : span;
+ item_meta : item_meta;
impl_trait : trait_decl_ref;
llbc_impl_trait : Types.trait_decl_ref;
(** Same remark as for {!field:llbc_generics}. *)