mlabs-haskell / mlabs-haskell/lambda-buffers
JSon instances for Map/Set require Ord constraint
Open
Nobody has claimed this yet.
bug
codegen
- Dominant language
- Haskell
- Stars
- 32
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
sum X = Y | Z
derive Json X
record Test = {
test : Map X Integer
}
derive Json Test
The generated code will break because X doesn't have Ord.
See #224
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in runtimes/haskell/lbr-prelude/src/LambdaBuffers/Runtime/Prelude/Json.hs around line 140, and compare the behavior with issue #224. Reproduce the schema using Map X Integer and derive Json, then inspect the generated Haskell code. Done means the example compiles without requiring an Ord constraint on X.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100