mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 09:53:36 +00:00
Estimated hours taken: 1.5
Branches: main
library/pprint.m:
Clean up this file a bit, to make future merges with the
mode-constraints branch easier.
Add special casing for variables and sparse bitsets, since these can be
useful.
Group predicates and functions logically.
Put the casting predicates and the *_to_doc functions for the special
cases in the same order as the special case tests in to_doc itself.
Shorten excessively long dividing lines.
tests/hard_coded/pprint_test.{m,exp}:
A new test case to test the new additions to to_doc.
tests/hard_coded/Mmakefile:
Enable the new test case.
12 lines
160 B
Plaintext
12 lines
160 B
Plaintext
1
|
|
2
|
|
[5, 6]
|
|
["five", "six", "seven"]
|
|
[1, 2]
|
|
sparse_bitset([42])
|
|
sparse_bitset([42, 84])
|
|
map([41 -> 42])
|
|
map([41 -> 42, 82 -> 83])
|
|
array([1, 2, 3])
|
|
{7, 8, "abc"}
|