Skip to content

Commit 3866ec1

Browse files
JNC4strub
authored andcommitted
Fix spurious line breaks in pretty-printing of qualified module paths
Remove the `@,` (break hint) from the format string in `pp_msymbol` when printing multi-component module paths. The break hint allowed the formatter to insert line breaks between namespace components, causing output like `G.\nRO.get(x)` or `module Alias = G.\nRO.` instead of the correct `G.RO.get(x)` and `module Alias = G.RO.` Fixes #696.
1 parent 73bb1f6 commit 3866ec1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ecPrinting.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ let rec pp_msymbol (fmt : Format.formatter) (mx : msymbol) =
510510
Format.fprintf fmt "@[<hov 2>%s(@,%a)@]" x (pp_list ",@ " pp_msymbol) args
511511

512512
| mx1 :: mx ->
513-
Format.fprintf fmt "%a.@,%a" pp_msymbol [mx1] pp_msymbol mx
513+
Format.fprintf fmt "%a.%a" pp_msymbol [mx1] pp_msymbol mx
514514

515515
(* -------------------------------------------------------------------- *)
516516
let pp_topmod ppe fmt p =

0 commit comments

Comments
 (0)