Merge pull request #9427 from Octachron/ocamldoc_list_syntax

ocamldoc: fix the printing of (::)
master
Florian Angeletti 2020-09-08 17:32:17 +02:00 committed by GitHub
commit 9f804a25d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -382,6 +382,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