summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2013-03-06 13:51:18 +0000
committerAlain Frisch <alain@frisch.fr>2013-03-06 13:51:18 +0000
commit97c5f1a2530d0de9b1ee9f0088a550ceefbcde59 (patch)
treeed7615eb84147dc8bb730ee264cabd222ee62eb0 /tools
parentcb3b398308cb1225e22e7eaac58a8394ac4ae085 (diff)
downloadocaml-97c5f1a2530d0de9b1ee9f0088a550ceefbcde59.tar.gz
Attributes on label in record type declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13361 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools')
-rw-r--r--tools/depend.ml2
-rw-r--r--tools/untypeast.ml6
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/depend.ml b/tools/depend.ml
index 0063b19c8a..9274459b28 100644
--- a/tools/depend.ml
+++ b/tools/depend.ml
@@ -79,7 +79,7 @@ let add_type_declaration bv td =
| Ptype_variant cstrs ->
List.iter (fun pcd -> List.iter (add_type bv) pcd.pcd_args; Misc.may (add_type bv) pcd.pcd_res) cstrs
| Ptype_record lbls ->
- List.iter (fun (l, mut, ty, _) -> add_type bv ty) lbls in
+ List.iter (fun pld -> add_type bv pld.pld_type) lbls in
add_tkind td.ptype_kind
let rec add_class_type bv cty =
diff --git a/tools/untypeast.ml b/tools/untypeast.ml
index 2bf164af29..0f6cac1ce3 100644
--- a/tools/untypeast.ml
+++ b/tools/untypeast.ml
@@ -125,7 +125,11 @@ and untype_type_declaration name decl =
{pcd_name = name; pcd_args = List.map untype_core_type cts; pcd_res = None; pcd_loc = loc; pcd_attributes = []}) list)
| Ttype_record list ->
Ptype_record (List.map (fun (_s, name, mut, ct, loc) ->
- (name, mut, untype_core_type ct, loc)
+ {pld_name=name;
+ pld_mutable=mut;
+ pld_type=untype_core_type ct;
+ pld_loc=loc;
+ pld_attributes=[]}
) list)
);
ptype_private = decl.typ_private;