ocamldoc: fix printing of (::)

master
octachron 2020-04-06 15:51:55 +02:00 committed by Florian Angeletti
parent 961aaf5d1c
commit 1393a37509
2 changed files with 10 additions and 1 deletions

View File

@ -373,6 +373,9 @@ Working version
- #8747, #9709: incorrect principality warning on functional updates of records
(Jacques Garrigue, report and review by Thomas Refis)
- #9421, #9427: fix printing of (::) in ocamldoc
(Florian Angeletti, report by Yawar Amin, review by Damien Doligez)
- #9469: Better backtraces for lazy values
(Leo White, review by Nicolás Ojeda Bär)

View File

@ -388,8 +388,14 @@ module Analyser =
| Cstr_record l ->
Cstr_record (List.map (get_field env name_comment_list) l)
in
let vc_name = match constructor_name with
| "::" ->
(* The only infix constructor is always printed (::) *)
"(::)"
| s -> s
in
{
vc_name = constructor_name ;
vc_name;
vc_args;
vc_ret = Option.map (Odoc_env.subst_type env) ret_type;
vc_text = comment_opt