More accurate Set and Map size warnings
Open
docs
Map
Set
- Dominant language
- Haskell
- Stars
- 355
- Forks
- 194
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 4
Description
`Set` and `Map` documentation carry warnings that say
> The size of the set must not exceed `maxBound::Int`. Violation of this condition is not detected and if the size limit is exceeded, its behaviour is undefined.
However, we multiple sizes by `delta = 3` without caring about overflow when balancing, which means we get violated invariants earlier than that.
I doubt anyone will be running into this in practice, but the limit should be document as ``maxBound `div` 3`` perhaps. Or less, in case there are other potentially troublesome operations I missed.
Contributor guide
Assessment
This issue has not been assessed yet.