Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006002OCamltoplevelpublic2013-04-30 15:332017-03-01 17:00
Assigned To 
PlatformOSOS Version
Product Version4.00.0 
Target VersionFixed in Version 
Summary0006002: An easier way to avoid elided printing of values
DescriptionA 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).
Attached Filesdiff file icon print_all.diff [^] (6,294 bytes) 2013-06-19 16:02 [Show Content]

- Relationships

-  Notes
doligez (administrator)
2013-06-19 12:11

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?
hnrgrgr (developer)
2013-06-19 16:02

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.
johnwhitington (reporter)
2013-11-11 13:41

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…

- Issue History
Date Modified Username Field Change
2013-04-30 15:33 johnwhitington New Issue
2013-06-19 12:11 doligez Note Added: 0009559
2013-06-19 12:11 doligez Status new => acknowledged
2013-06-19 16:02 hnrgrgr Note Added: 0009565
2013-06-19 16:02 hnrgrgr File Added: print_all.diff
2013-11-11 13:41 johnwhitington Note Added: 0010615
2013-12-16 15:55 doligez Tag Attached: patch
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-01 17:00 doligez Category -OCaml general => toplevel

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker