diff options
author | Alain Frisch <alain@frisch.fr> | 2013-03-26 08:21:29 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2013-03-26 08:21:29 +0000 |
commit | c2c5b106853909a6ed66982918aed58be53a49a3 (patch) | |
tree | 06433a12dc00ea5e9afa6efdfd4a81c682f949ae /ocamldoc/odoc_ast.ml | |
parent | 2ffa26af821985c6520ce59d3c11d1e7590dfa74 (diff) | |
download | ocaml-c2c5b106853909a6ed66982918aed58be53a49a3.tar.gz |
Align module type binding with Parsetree.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13448 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_ast.ml')
-rw-r--r-- | ocamldoc/odoc_ast.ml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ocamldoc/odoc_ast.ml b/ocamldoc/odoc_ast.ml index 292e84b352..7ea6aca92d 100644 --- a/ocamldoc/odoc_ast.ml +++ b/ocamldoc/odoc_ast.ml @@ -73,8 +73,8 @@ module Typedtree_search = (Typedtree.Tstr_module mb) ) mods - | Typedtree.Tstr_modtype (ident, _, _) -> - Hashtbl.add table (MT (Name.from_ident ident)) tt + | Typedtree.Tstr_modtype mtb -> + Hashtbl.add table (MT (Name.from_ident mtb.mtb_id)) tt | Typedtree.Tstr_exception decl -> Hashtbl.add table (E (Name.from_ident decl.cd_id)) tt | Typedtree.Tstr_exn_rebind (ident, _, _, _, _) -> @@ -126,7 +126,7 @@ module Typedtree_search = let search_module_type table name = match Hashtbl.find table (MT name) with - | (Typedtree.Tstr_modtype (_, _, module_type)) -> module_type + | (Typedtree.Tstr_modtype mtb) -> mtb | _ -> assert false let search_exception table name = @@ -1401,14 +1401,15 @@ module Analyser = with Not_found -> raise (Failure (Odoc_messages.module_type_not_found_in_typedtree complete_name)) in + let mty_type = tt_module_type.mtb_type.mty_type in let kind = Sig.analyse_module_type_kind env complete_name - modtype tt_module_type.mty_type + modtype mty_type in let mt = { mt_name = complete_name ; mt_info = comment_opt ; - mt_type = Some tt_module_type.mty_type ; + mt_type = Some mty_type ; mt_is_interface = false ; mt_file = !file_name ; mt_kind = Some kind ; @@ -1417,7 +1418,7 @@ module Analyser = in let new_env = Odoc_env.add_module_type env mt.mt_name in let new_env2 = - match tt_module_type.mty_type with + match mty_type with (* A VOIR : cela peut-il etre Tmty_ident ? dans ce cas, on n'aurait pas la signature *) Types.Mty_signature s -> Odoc_env.add_signature new_env mt.mt_name ~rel: (Name.simple mt.mt_name) s |