Skip to content

Streamline and expand folds#59

Merged
treeowl merged 1 commit intolspitzner:masterfrom
treeowl:streamline-foldu
Dec 10, 2021
Merged

Streamline and expand folds#59
treeowl merged 1 commit intolspitzner:masterfrom
treeowl:streamline-foldu

Conversation

@treeowl
Copy link
Copy Markdown
Collaborator

@treeowl treeowl commented Dec 9, 2021

@treeowl treeowl force-pushed the streamline-foldu branch 2 times, most recently from 585a118 to 07a581d Compare December 9, 2021 03:03
@treeowl treeowl requested a review from konsumlamm December 9, 2021 03:07
Comment thread src/Data/PQueue/Internals.hs
Comment thread src/Data/PQueue/Internals/Foldable.hs Outdated
Comment thread src/Data/PQueue/Prio/Internals.hs Outdated
* As discussed in lspitzner#55, we were recursively constructing `Foldable`
  dictionaries in unordered folds (for the basic queues, though not the
  `Prio` ones). Stop doing that.

* Add strict left unordered folds and monoidal unordered folds.
@treeowl treeowl merged commit d723ff7 into lspitzner:master Dec 10, 2021
Copy link
Copy Markdown
Collaborator

@konsumlamm konsumlamm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can only repeat what I said in #46 (review): please don't just merge non-trivial changes without review.

Comment thread src/Data/PQueue/Internals.hs
Comment thread src/Data/PQueue/Max.hs
foldMapU :: Monoid m => (a -> m) -> MaxQueue a -> m
foldMapU f (MaxQ q) = Min.foldMapU (f . unDown) q

-- | /O(n)/. Unordered left fold on a priority queue.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot the note about performance.


-- | /O(n)/. Unordered strict left fold on a priority queue.
--
-- @since 1.4.2
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the only file you added @since annotations. They should be on all new (exported) functions.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right. I'll have to fix that up.

@treeowl
Copy link
Copy Markdown
Collaborator Author

treeowl commented Dec 10, 2021

I can only repeat what I said in #46 (review): please don't just merge non-trivial changes without review.

I thought I'd addressed your concerns. Let's try to keep this friendly.

@konsumlamm
Copy link
Copy Markdown
Collaborator

I thought I'd addressed your concerns. Let's try to keep this friendly.

Sorry, I didn't mean to be unfriendly.

The person raising the concerns can usually judge best whether or not they've been addressed, so I think it's useful to await a re-review. Imo, a good rule for (non-controversial) PRs would be that it needs at least one explicit approval (from someone else than the author) to get merged.

@konsumlamm konsumlamm mentioned this pull request Dec 17, 2021
konsumlamm added a commit that referenced this pull request Dec 17, 2021
Add changelog entry
Add missing `@since` annotations
Add missing performance notes
Remove unnecessary double spaces
@konsumlamm konsumlamm mentioned this pull request Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants