lspitzner / lspitzner/pqueue

Two equal priority queues with keys can compare as unequal

Open
#78 28 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.