Open weaversa opened 9 years ago
Cryptol-1 used to have a function called format
which allowed users to program any sort of pretty printing, including vertical/horizontal layouts, padding, spaces/0-filling, left/right flushing etc. in a type-safe manner. It wasn't the easiest function to use, but I do believe it had provisions for coding all of the use-cases you have above in rather a concise way. Maybe time to bring that back from the dead!
Marked as low-hanging to request a 20% effort that gives us 80% of the Yak shave.
One easy-to-implement feature would be to add a :set
option for pretty-printing width; tweaking it might help to put line breaks in more desirable places.
Another thing we could do is write a library of pretty-printing combinators in Cryptol that could do fancy formatting. (I guess this would be similar to what Cryptol-1's format
was?)
A 20% effort might be just to tweak the line-breaking and indentation heuristics to make things line up vertically more often.
Another older request ---
It'd be useful to display lists of records (or tuples) in tabular form
It'd be nice to have a mode that displays lists of lists as matrices
It'd be nice to have a mode where lists of booleans are displayed so, and not turned into words: