summaryrefslogtreecommitdiff
path: root/ocamldoc/odoc_to_text.ml
diff options
context:
space:
mode:
authorMaxence Guesdon <maxence.guesdon@inria.fr>2003-10-17 15:30:47 +0000
committerMaxence Guesdon <maxence.guesdon@inria.fr>2003-10-17 15:30:47 +0000
commit60b74b3c3ceb8334aafcef82f5b84766c20af097 (patch)
tree6a682f5f3c26120554a7dcce8c57d3542559c42e /ocamldoc/odoc_to_text.ml
parente969e8ad9fdce5a8a33946587d45b3e4c22cae90 (diff)
downloadocaml-60b74b3c3ceb8334aafcef82f5b84766c20af097.tar.gz
fix bad display of type parameters for class and class types
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5874 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_to_text.ml')
-rw-r--r--ocamldoc/odoc_to_text.ml12
1 files changed, 11 insertions, 1 deletions
diff --git a/ocamldoc/odoc_to_text.ml b/ocamldoc/odoc_to_text.ml
index 7b325bd38b..3d44e476cf 100644
--- a/ocamldoc/odoc_to_text.ml
+++ b/ocamldoc/odoc_to_text.ml
@@ -203,6 +203,11 @@ class virtual to_text =
method normal_type_list m_name sep t =
(self#relative_idents m_name (Odoc_info.string_of_type_list sep t))
+ (** Get a string for a list of class or class type type parameters
+ where all idents are relative. *)
+ method normal_class_type_param_list m_name t =
+ (self#relative_idents m_name (Odoc_info.string_of_class_type_param_list t))
+
(** @return [text] value to represent a [Types.type_expr].*)
method text_of_type_expr module_name t =
let t = List.flatten
@@ -223,6 +228,11 @@ class virtual to_text =
method text_of_type_expr_list module_name sep l =
[ Code (self#normal_type_list module_name sep l) ]
+ (** Return [text] value or the given list of [Types.type_expr],
+ as type parameters of a class of class type. *)
+ method text_of_class_type_param_expr_list module_name l =
+ [ Code (self#normal_class_type_param_list module_name l) ]
+
(** @return [text] value to represent a [Types.module_type]. *)
method text_of_module_type t =
@@ -437,7 +447,7 @@ class virtual to_text =
[] -> []
| l ->
(Code "[") ::
- (self#text_of_type_expr_list father ", " l) @
+ (self#text_of_class_type_param_expr_list father l) @
[Code "] "]
) @
(