Skip to content
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

An easier way to avoid elided printing of values #6002

Closed
vicuna opened this issue Apr 30, 2013 · 4 comments
Closed

An easier way to avoid elided printing of values #6002

vicuna opened this issue Apr 30, 2013 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Apr 30, 2013

Original bug ID: 6002
Reporter: @johnwhitington
Status: acknowledged (set by @damiendoligez on 2013-06-19T10:11:35Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.00.0
Category: toplevel
Tags: patch
Monitored by: @ygrek @hcarty

Bug description

A minor thing, this.

We have #print_depth and #print_length but one has to choose arbitrary values like 1000 to give to them (can't even use max_int because it's in a directive).

It would be nice to either hack the parser to allow max_int as a 'token' within integer-argumented directives, or alternatively add #print_all as a directive asking OCaml to never elide the output in any way (in other words, to ignore the values of print_length and print_depth).

File attachments

@vicuna
Copy link
Author

vicuna commented Jun 19, 2013

Comment author: @damiendoligez

I'd rather go with the "print_all" option. Even max_int does not (in theory) guarantee that everything will be printed.

Who wants to provide a patch?

@vicuna
Copy link
Author

vicuna commented Jun 19, 2013

Comment author: hnrgrgr

Here is a small patch adding a #print_all primitive.

I've also added:

#print_wide : ignore #print_length only
#print_deep : ignore #print_depth only
#print_default : do not ignore #print_length and #print_depth

I'm now looking on how to patch the documention.

@vicuna
Copy link
Author

vicuna commented Nov 11, 2013

Comment author: @johnwhitington

It just occurred to me that we don't really want an unlimited option, because then a cyclic structure would never be printed -- so we would need to account for that…

@github-actions
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant