summaryrefslogtreecommitdiff
path: root/tools/depend.ml
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2014-03-28 17:08:53 +0000
committerAlain Frisch <alain@frisch.fr>2014-03-28 17:08:53 +0000
commit132ff5155953920048744eee2131f7f67cf9282c (patch)
tree551fb2b0e49d05865f7c71c29b3d53efb2cbd992 /tools/depend.ml
parentf95407dd09b1749102f59997e1f0e9947eae86ef (diff)
downloadocaml-132ff5155953920048744eee2131f7f67cf9282c.tar.gz
Some preparation for record arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14505 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools/depend.ml')
-rw-r--r--tools/depend.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/depend.ml b/tools/depend.ml
index 7ff6704f70..82c2db8320 100644
--- a/tools/depend.ml
+++ b/tools/depend.ml
@@ -64,7 +64,11 @@ let add_opt add_fn bv = function
| Some x -> add_fn bv x
let add_constructor_decl bv pcd =
- List.iter (add_type bv) pcd.pcd_args; Misc.may (add_type bv) pcd.pcd_res
+ begin match pcd.pcd_args with
+ | Pcstr_tuple l -> List.iter (add_type bv) l
+ | Pcstr_record l -> List.iter (fun l -> add_type bv l.pld_type) l
+ end;
+ Misc.may (add_type bv) pcd.pcd_res
let add_type_declaration bv td =
List.iter