You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we modify the pretty-printer (or at least the dhall format and dhall freeze commands) to unicode-escape unprintable characters? Perhaps this could be switched by an option?
I have some text containing unprintable characters that I want to be visible in the source code, so I use the escaping (e.g. "\u007f"). Unfortunately dhall format replaces it with the unprintable character verbatim.
It would be great if the original form (escaped/unescaped) could be preserved, but that is perhaps too much to ask for.
The text was updated successfully, but these errors were encountered:
Changing the rules for Text/show would need a backward incompatible change to the standard. Moreover, the escaping would probably become slower (the list of unprintable Unicode characters is not fixed, so we'd have to use a Unicode character class instead of a range comparison). Therefore, I think it would be preferable to add separate escaping rules for the formatter and keep Text/show as it is.
On the other hand keeping the formatter in sync with Text/show also has its merits. So I think adding an option (defaulting to the current behaviour, to keep things backward compatible) that would affect the pretty-printer is the way to go.
Can we modify the pretty-printer (or at least the
dhall format
anddhall freeze
commands) to unicode-escape unprintable characters? Perhaps this could be switched by an option?I have some text containing unprintable characters that I want to be visible in the source code, so I use the escaping (e.g.
"\u007f"
). Unfortunatelydhall format
replaces it with the unprintable character verbatim.It would be great if the original form (escaped/unescaped) could be preserved, but that is perhaps too much to ask for.
The text was updated successfully, but these errors were encountered: