diff options
author | Maxence Guesdon <maxence.guesdon@inria.fr> | 2004-04-02 15:10:58 +0000 |
---|---|---|
committer | Maxence Guesdon <maxence.guesdon@inria.fr> | 2004-04-02 15:10:58 +0000 |
commit | 1ac475fbbedbe4183693cad50331e8c2ab951e7a (patch) | |
tree | f8693cbffb572b8984e9efcfa03ea496bc058af2 /ocamldoc/odoc_to_text.ml | |
parent | 496cbf99ad46fbcc03403028506455efd73036d0 (diff) |
add the kind to module parameters (the way the parameter was build in the parsetree), use this in html and latex generation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6185 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_to_text.ml')
-rw-r--r-- | ocamldoc/odoc_to_text.ml | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/ocamldoc/odoc_to_text.ml b/ocamldoc/odoc_to_text.ml index d24de81cc..426432a65 100644 --- a/ocamldoc/odoc_to_text.ml +++ b/ocamldoc/odoc_to_text.ml @@ -519,25 +519,24 @@ class virtual to_text = [Code ((if with_def_syntax then " : " else "")^ Odoc_messages.struct_end^" ")] - | Module_functor (_, k) -> + | Module_functor (p, k) -> (if with_def_syntax then [Code " : "] else []) @ [Code "functor ... "] @ [Code " -> "] @ (self#text_of_module_kind ~with_def_syntax: false k) - (** Return html code for a [module_type_kind]. *) + (** Return html code for a [module_type_kind].*) method text_of_module_type_kind ?(with_def_syntax=true) tk = match tk with | Module_type_struct _ -> [Code ((if with_def_syntax then " = " else "")^Odoc_messages.sig_end)] - | Module_type_functor (params, k) -> - let f p = - [Code ("("^p.mp_name^" : ")] @ - (self#text_of_module_type p.mp_type) @ + | Module_type_functor (p, k) -> + let t1 = + [Code ("("^p.mp_name^" : ")] @ + (self#text_of_module_type_kind p.mp_kind) @ [Code ") -> "] in - let t1 = List.flatten (List.map f params) in let t2 = self#text_of_module_type_kind ~with_def_syntax: false k in (if with_def_syntax then [Code " = "] else []) @ t1 @ t2 |