Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #30.
This is a breaking change to the CLI interface (cc @Magellol). The new structure is:
The flattening needs testing more robustly. I forged ahead given the bulk of the rest of the PR won't be affected by any changes in the flattening algorithm.
The JSON output is currently not prettified due to this issue in what would have been the natural choice. As-is using the linked library would cause the keys to be output as "umessage" and "ubackend" per the field names. We could workaround this by changing them in
Translation
andUnparsedTranslation
but that feels hacky. Not sure on the right path forward.The flattening stuff in the compiler is quite verbose. I'm planning to experiment with lenses soon to help with the general verbosity around working with these nested sum types. There may also be an optimisation we could make somewhere to the core data structures (parameterising streams?), but I suspect that'll be a lot more complex to solve.