lspitzner / pqueue

Haskell priority queue package
Other
15 stars 13 forks source link

Improve RULES situation #45

Closed treeowl closed 2 years ago

treeowl commented 2 years ago

Add staging to make rules more likely to work out properly and get rid of rule/inline warnings.

Fixes #4

treeowl commented 2 years ago

I see you've added Data.PQueue.Min.foldlAsc', that should be added to the changelog. Is there any reason you didn't add foldrAsc', foldlDesc' etc? I don't see any obvious reason why foldlAsc' should be special.

For min-queues, the natural/efficient order-respecting folds are foldrAsc, foldlAsc', foldlDesc, and foldrDesc'. I'm not convinced we want the wonky ones we already have (foldlAsc and foldrDesc) let alone any new ones. But you're right; I should deal with that all in a separate PR.