New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pretty printer line break unexpected #7913
Comments
Comment author: @Octachron This is the maximum indentation feature in action (cf. http://caml.inria.fr/pub/docs/manual-ocaml/libref/Format.html#1_Maximumindentationlimit): boxes opened beyond the current value of the maximum indentation are rejected to the left. Your specific issue can be fixed by increasing this maximum indentation with let () = |
Comment author: ramsdell0 Thank you for your quick reply. The snippet of code I submitted was I ask that goal for responding to this bug report be to change the (** {1:breaks Break hints} *) (** The pretty printer will split a line at a location specified by a ... (** {1 Maximum indentation limit} *) val pp_set_max_indent : formatter -> int -> unit If [d] is greater or equal than the current margin, it is ignored, ... To insure that a pretty printer splits lines only under the See also {!pp_set_geometry}. |
Comment author: @Octachron I agree that the documentation should be updated. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Original bug ID: 7913
Reporter: ramsdell0
Assigned to: @Octachron
Status: assigned (set by @Octachron on 2019-02-18T08:45:19Z)
Resolution: open
Priority: normal
Severity: minor
Platform: x86_64
OS: Mac OS
OS Version: Mojave
Version: 4.07.1
Category: documentation
Related to: #7804
Monitored by: @nojb
Bug description
The enclosed program shows a case in which a line of text is broken in an unexpected place. The pretty printer only allows line breaks after commas, but the program breaks a line after an open parenthesis.
The output of the enclosed program is:
$ ./ppterm
pred(a12(x1, y1), a1234(x1, y1), a1234(x1, y1), a1234(x1, y1), a1234(
x1, y1), a1234(x1, y1))
Steps to reproduce
$ ocamlc -o ppterm ppterm.ml
$ ./ppterm
File attachments
The text was updated successfully, but these errors were encountered: