-
Notifications
You must be signed in to change notification settings - Fork 52
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
Better node display #137
base: main
Are you sure you want to change the base?
Better node display #137
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you a lot, this looks great! Can you add some tests with some simple and more complicated expressions whose Display
output parses into the same operator tree?
How would you feel about adding a dev dependency on quickcheck? I might want to randomly generate operator trees and check that they round-trip to the same trees. |
I am totally fine with new dev dependencies. |
b56a199
to
3593b8f
Compare
It seems like propagating the precision does not work. We can either just not support floating point precision, or we fix that somehow. |
e4a8571
to
6608b16
Compare
Change the Display instance for Node. Previously it printed a simple pre-order traversal, which was sometimes ambiguous because e.g. for nested n-ary functions it wasn't clear which things were arguments.
Now, this should produce a visual that is (a) unique, and (b) can be parsed back into an equivalent Node.