unison icon indicating copy to clipboard operation
unison copied to clipboard

Pretty-printer should take TDNR into account

Open runarorama opened this issue 3 years ago • 6 comments

The expression 0.1 + 0.2 is unambiguous because TDNR uses the expected type of + to figure out that what's meant is base.Float.+.

But when this gets pretty-printed out again, the shortest unambiguous suffix is Float.+,

So this expression renders as 0.1 Float.+ 0.2, which is terribly ugly.

It would be really nice if the pretty-printer could figure out that + is unambiguous here.

runarorama avatar Feb 09 '22 20:02 runarorama