diff options
author | Jérémie Dimino <jeremie@dimino.org> | 2015-03-13 11:09:08 +0000 |
---|---|---|
committer | Jérémie Dimino <jeremie@dimino.org> | 2015-03-13 11:09:08 +0000 |
commit | bcc9e6adfa147592b5f85fc970f735fb4e35cec7 (patch) | |
tree | 6c2d5d20433cc102f5cb3e2d18a72b640982f653 /tools | |
parent | 9c0b6dfa983967a64a4844f507b0f3d9faa15cb5 (diff) | |
download | ocaml-bcc9e6adfa147592b5f85fc970f735fb4e35cec7.tar.gz |
Update ocamldoc and other utilities to support "type
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15923 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depend.ml | 4 | ||||
-rw-r--r-- | tools/eqparsetree.ml | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/tools/depend.ml b/tools/depend.ml index 222d08d31e..a09c156765 100644 --- a/tools/depend.ml +++ b/tools/depend.ml @@ -245,7 +245,7 @@ and add_sig_item bv item = match item.psig_desc with Psig_value vd -> add_type bv vd.pval_type; bv - | Psig_type dcls -> + | Psig_type (_, dcls) -> List.iter (add_type_declaration bv) dcls; bv | Psig_typext te -> add_type_extension bv te; bv @@ -304,7 +304,7 @@ and add_struct_item bv item = let bv = add_bindings rf bv pel in bv | Pstr_primitive vd -> add_type bv vd.pval_type; bv - | Pstr_type dcls -> + | Pstr_type (_, dcls) -> List.iter (add_type_declaration bv) dcls; bv | Pstr_typext te -> add_type_extension bv te; diff --git a/tools/eqparsetree.ml b/tools/eqparsetree.ml index 128453e0c3..c2571c3609 100644 --- a/tools/eqparsetree.ml +++ b/tools/eqparsetree.ml @@ -273,12 +273,13 @@ let rec eq_structure_item_desc : | (Pstr_primitive (a0, a1), Pstr_primitive (b0, b1)) -> (Asttypes.eq_loc eq_string (a0, b0)) && (eq_value_description (a1, b1)) - | (Pstr_type a0, Pstr_type b0) -> + | (Pstr_type (a0, a1), Pstr_type (b0, b1)) -> + (Asttypes.eq_rec_flag (a0, b0) && eq_list (fun ((a0, a1), (b0, b1)) -> (Asttypes.eq_loc eq_string (a0, b0)) && (eq_type_declaration (a1, b1))) - (a0, b0) + (a1, b1) | (Pstr_exception (a0, a1), Pstr_exception (b0, b1)) -> (Asttypes.eq_loc eq_string (a0, b0)) && (eq_exception_declaration (a1, b1)) @@ -359,12 +360,13 @@ and eq_signature_item_desc : | (Psig_value (a0, a1), Psig_value (b0, b1)) -> (Asttypes.eq_loc eq_string (a0, b0)) && (eq_value_description (a1, b1)) - | (Psig_type a0, Psig_type b0) -> + | (Psig_type (a0, a1), Psig_type (b0, b1)) -> + (Asttypes.eq_rec_flag (a0, b0) && eq_list (fun ((a0, a1), (b0, b1)) -> (Asttypes.eq_loc eq_string (a0, b0)) && (eq_type_declaration (a1, b1))) - (a0, b0) + (a1, b1) | (Psig_exception (a0, a1), Psig_exception (b0, b1)) -> (Asttypes.eq_loc eq_string (a0, b0)) && (eq_exception_declaration (a1, b1)) |