Fix discrepancy between mergeWithKey impl and docs#1025
Merged
meooow25 merged 1 commit intohaskell:masterfrom Aug 14, 2024
Merged
Fix discrepancy between mergeWithKey impl and docs#1025meooow25 merged 1 commit intohaskell:masterfrom
meooow25 merged 1 commit intohaskell:masterfrom
Conversation
treeowl
approved these changes
Aug 13, 2024
Contributor
treeowl
left a comment
There was a problem hiding this comment.
Seems reasonable. Hopefully no one is relying on the current behavior. You're also welcome to make another attempt at function removal, as far as I'm concerned.
98c03c9 to
3abd39f
Compare
Contributor
Author
I suppose this does cause a change in behavior. Updated the changelog in case someone is affected.
Personally I'm not too keen on seeing it gone. It is unsafe but can be used properly. I wish it were maybe exported from "Data.Map.Unsafe" or something like that. |
Don't call the `only2` function on empty trees. Fixed for both Map and IntMap.
3abd39f to
298ab3d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The given functions should be called only on nonempty trees.
Fixes #979.
This could alternately be fixed by changing the docs. I find it slightly better to keep the specification that the user will not receive an empty tree.