The `Solo` instance is incorrect
Open
- Dominant language
- Haskell
- Stars
- 1.3k
- Forks
- 336
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 4
Description
`Solo` is the canonical 1-element tuple type.
However, the implementation added in PR https://github.com/haskell/aeson/pull/891 treat it as any other normal 1-element type, which is incorrect.
This becomes problematic when you have code that wants to seriaize/deserialize generically over tuples of various arities:
- (10, 20, 30) <-> "[10, 20, 30]"
- (10, 20) <-> "[10, 20]"
- Solo 10 <-> "10" ❗❗❗
- () <-> "[]"
Contributor guide
Assessment
This issue has not been assessed yet.