Skip to content

Fix Haskell/Rust IR JSON encoding inconsistencies - #120

Open
georgefst wants to merge 3 commits into
mainfrom
serialisation-fixes
Open

Fix Haskell/Rust IR JSON encoding inconsistencies#120
georgefst wants to merge 3 commits into
mainfrom
serialisation-fixes

Conversation

@georgefst

Copy link
Copy Markdown
Collaborator

Discovered via #116.

We add `tagSingleConstructors` to our default settings. This ensures that the likes of `IndexMethod` are encoded like other enums, instead of producing an empty JSON list. These types are often likely to grow other constructors eventually, so this is better for forwards-compatibility.
There's not much point using tags for plain enums, i.e. where no constructor carries data.
@georgefst
georgefst marked this pull request as ready for review August 7, 2026 15:35
@georgefst
georgefst requested review from incipit0 and olynch August 7, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant