Skip to content

Commit

Permalink
Merge pull request #9427 from Octachron/ocamldoc_list_syntax
Browse files Browse the repository at this point in the history
ocamldoc: fix the printing of (::)
  • Loading branch information
Octachron committed Sep 8, 2020
2 parents 6db41e4 + 1393a37 commit 9f804a2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changes
Expand Up @@ -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)

Expand Down
8 changes: 7 additions & 1 deletion ocamldoc/odoc_sig.ml
Expand Up @@ -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
Expand Down

0 comments on commit 9f804a2

Please sign in to comment.