diff options
author | Alain Frisch <alain@frisch.fr> | 2014-10-14 15:51:30 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2014-10-14 15:51:30 +0000 |
commit | e3ad818fb5f8ddc7b477779a6da69ccac0f00f4f (patch) | |
tree | 9016f709d251804278be1a75f518787aa571904b /ocamldoc/odoc_ast.ml | |
parent | a4e637ea622cf33b4c0870a98c6b1db0090f8e38 (diff) | |
parent | 8da19ea098b270230a9f1e1d252350bd69cbf8ee (diff) |
Reintegrate-merge constructors_with_record5 branch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15556 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_ast.ml')
-rw-r--r-- | ocamldoc/odoc_ast.ml | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/ocamldoc/odoc_ast.ml b/ocamldoc/odoc_ast.ml index 358a71a51..ce71070ef 100644 --- a/ocamldoc/odoc_ast.ml +++ b/ocamldoc/odoc_ast.ml @@ -1316,10 +1316,14 @@ module Analyser = let new_xt = match tt_ext.ext_kind with Text_decl(args, ret_type) -> + let xt_args = + match args with + | Cstr_tuple l -> Cstr_tuple (List.map (fun ctyp -> Odoc_env.subst_type new_env ctyp.ctyp_type) l) + | Cstr_record _ -> assert false + in { xt_name = complete_name; - xt_args = - List.map (fun ctyp -> Odoc_env.subst_type new_env ctyp.ctyp_type) args; + xt_args; xt_ret = may_map (fun ctyp -> Odoc_env.subst_type new_env ctyp.ctyp_type) ret_type; xt_type_extension = new_te; @@ -1330,7 +1334,7 @@ module Analyser = | Text_rebind(path, _) -> { xt_name = complete_name; - xt_args = []; + xt_args = Cstr_tuple []; xt_ret = None; xt_type_extension = new_te; xt_alias = @@ -1373,13 +1377,15 @@ module Analyser = Text_decl(tt_args, tt_ret_type) -> let loc_start = loc.Location.loc_start.Lexing.pos_cnum in let loc_end = loc.Location.loc_end.Lexing.pos_cnum in + let ex_args = + match tt_args with + | Cstr_tuple l -> Cstr_tuple (List.map (fun c -> Odoc_env.subst_type env c.ctyp_type) l) + | Cstr_record l -> assert false (* TODO *) + in { ex_name = complete_name ; ex_info = comment_opt ; - ex_args = - List.map - (fun ctyp -> Odoc_env.subst_type new_env ctyp.ctyp_type) - tt_args; + ex_args; ex_ret = Misc.may_map (fun ctyp -> Odoc_env.subst_type new_env ctyp.ctyp_type) @@ -1398,7 +1404,7 @@ module Analyser = { ex_name = complete_name ; ex_info = comment_opt ; - ex_args = [] ; + ex_args = Cstr_tuple [] ; ex_ret = None ; ex_alias = Some { ea_name = |