spago
spago copied to clipboard
Use Dhall’s automatic Unicode vs. ASCII syntax detection
I can understand as well as get behind the general community stance that the default Dhall syntax should be ASCII. However, with Dhall 1.38, we can have automatic syntax detection for reformatting. The main reason a user woulld prefer this is so that they can expect the same syntax after using commands that regenerated their spago files (i.e. spago upgrade-set
). This can lead to unnecessary git diff
s if forgotten as well as it doesn’t match a user’s default expectation when using dhall format
.
While it would be easy to change the Just ASCII
to Nothing
to get the default behavior, I believe it’s important to still make sure that the original format generation is Just ASCII
because I believe the formatter defaults to Unicode when missing, but I could be wrong (I tried looking, but it wasn’t clear what the default was so I didn’t do a PR and just swapping to Nothing
).
I’m still getting annoying diff
s that I didn’t expect as a result of running spago upgrade-set
. I hope this could be a small and quick fix.
I tried to swap the formatter to Nothing
to get Dhall's autodetection to work, but e.g. this tests fails because the autoformatter uses Unicode in there.
This is probably a bug to be fixed upstream - I'm generally ok with doing this change but I won't manage to follow up on this so I'd be happy if someone can pick this up
The new Spago is not using Dhall anymore