Closed justinwoo closed 6 years ago
Necroposting here, I realized that the actual Dhall Record type is a insertion order preserving hashmap, which I find to be quite undesirable, especially for working with the actual output JSON for some purposes, especially diffing (can't always only look at Dhall diffs, unfortunately).
If this is really so important to some users, could we reach some compromise in some way like adding optional flags here, and maybe revisiting how the insertion order information is preserved and worked with?
I'm totally fine with adding an option to sort keys
Sorry, I realized upon revisiting this that I was talking about record fields in dhall files through dhall-haskell. The lack of reordering of fields in Dhall records really bothers me, but isn't an issue with dhall-json (since it has already been fixed here)
Should I open a new issue there? Since it seems like most of the issue was about changing of formatting overall and I don't see anything that suggests defining a function to preserve ordering of information isn't the thing you should do anyway
Go ahead and open a new issue there
Right now the records output will output whatever order the record was constructed. There should probably be some aeson-pretty options for this?
Nobody should use the observed insertion order anyways