Minimal support for inlined records for the texi backend.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record5@15554 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
c5ef8ad49d
commit
5a8fd350ca
|
@ -639,13 +639,16 @@ class texi =
|
|||
(String.concat ", " (List.map f l))
|
||||
|
||||
method string_of_type_args (args:constructor_args) (ret:Types.type_expr option) =
|
||||
let f = function
|
||||
| Cstr_tuple l -> Odoc_info.string_of_type_list " * " l
|
||||
| Cstr_record l -> Odoc_info.string_of_record l
|
||||
in
|
||||
match args, ret with
|
||||
| Cstr_tuple [], None -> ""
|
||||
| Cstr_tuple args, None -> " of " ^ (Odoc_info.string_of_type_list " * " args)
|
||||
| args, None -> " of " ^ (f args)
|
||||
| Cstr_tuple [], Some r -> " : " ^ (Odoc_info.string_of_type_expr r)
|
||||
| Cstr_tuple args, Some r -> " : " ^ (Odoc_info.string_of_type_list " * " args) ^
|
||||
| args, Some r -> " : " ^ (f args) ^
|
||||
" -> " ^ (Odoc_info.string_of_type_expr r)
|
||||
| Cstr_record _, _ -> assert false
|
||||
|
||||
(** Return Texinfo code for a type. *)
|
||||
method texi_of_type ty =
|
||||
|
|
Loading…
Reference in New Issue