Open byorgey opened 3 years ago
Nah, copy-pasting is easy enough no matter whether we use ASCII or arbitrary Unicode. Actually, now I am thinking that I like the default of printing things using nice-looking syntax, but we should add a flag to use only ASCII. This is related to #250 --- doing the switch would probably help here.
We could actually do this pretty easily even without doing #250 --- just add a flag to the read-only context for pretty-printing and use it to select ASCII-only concrete syntax (instead of just using the first thing in the list).
One original idea I had was to annotate each terminal with its ASCII equivalent, and select which to use at rendering time. But note that doesn't allow prettyprinter
to take the different widths into account. So I think this does just need to look like a flag to the prettyprinter so that it selects which concrete syntax to use.
Perhaps the default should be to pretty-print everything using ASCII syntax --- for ease of copy-pasting --- but with an extension to enable pretty-printing with Unicode syntax?