diff options
Diffstat (limited to 'ocamldoc/odoc_dep.ml')
-rw-r--r-- | ocamldoc/odoc_dep.ml | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/ocamldoc/odoc_dep.ml b/ocamldoc/odoc_dep.ml index f2934ee3e..b0393fe86 100644 --- a/ocamldoc/odoc_dep.ml +++ b/ocamldoc/odoc_dep.ml @@ -147,33 +147,31 @@ let type_deps t = l := s2 :: !l ; s2 in + let ty t = + let s = Odoc_print.string_of_type_expr t in + ignore (Str.global_substitute re f s) + in (match t.T.ty_kind with T.Type_abstract -> () | T.Type_variant cl -> List.iter (fun c -> - List.iter - (fun e -> - let s = Odoc_print.string_of_type_expr e in - ignore (Str.global_substitute re f s) - ) - c.T.vc_args + match c.T.vc_args with + | T.Cstr_tuple l -> List.iter ty l + | T.Cstr_record l -> List.iter (fun r -> ty r.T.rf_type) l ) cl | T.Type_record rl -> - List.iter - (fun r -> - let s = Odoc_print.string_of_type_expr r.T.rf_type in - ignore (Str.global_substitute re f s) - ) - rl + List.iter (fun r -> ty r.T.rf_type) rl + | T.Type_open -> () ); (match t.T.ty_manifest with None -> () - | Some e -> - let s = Odoc_print.string_of_type_expr e in - ignore (Str.global_substitute re f s) + | Some (T.Object_type fields) -> + List.iter (fun r -> ty r.T.of_type) fields + | Some (T.Other e) -> + ty e ); !l |