Two equal priority queues with keys can compare as unequal
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 17
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Two equal queues may compare as unequal, since duplicate keys are allowed and the `Eq` implementation takes only care of comparing the keys in order.
**Example:**
```hs
ghci> import qualified Data.PQueue.Min as PMin
ghci> PMin.fromAscList [(1, 'a'), (1, 'b')] == PMin.fromAscList [(1, 'b'), (1, 'a')]
False
```
This should be documented, as I don't think this can be fixed without making the implementation significantly slower.
Contributor guide
No contributing guide indexed for this repository
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 by reading the Eq implementation for keyed priority queues and reproduce the GHCi example from the issue. Document that equal-priority entries with duplicate keys may compare unequal because equality compares keys in order, and confirm the documentation accurately describes the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- data
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100