Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and export set intersection utilities #1040

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

meooow25
Copy link
Contributor

  • Update Set.intersections to use Foldable1 and be lazier
  • Mark definitions INLINABLE for specialization
  • Add Intersection and intersections for IntSet
  • Add property tests

Fixes #1038

* Update Set.intersections to be lazier
* Mark definitions INLINABLE for specialization
* Add matching Intersection and intersections for IntSet
* Add property tests
@meooow25 meooow25 merged commit dc98ae7 into haskell:master Sep 22, 2024
11 checks passed
@meooow25 meooow25 deleted the set-intersections branch September 22, 2024 02:21
@meooow25
Copy link
Contributor Author

meooow25 commented Oct 4, 2024

@treeowl what is our stance on conditional exports?
intersections is exported here if Foldable1 is available in base.

Is this controversial?

If so, I will change it to use NonEmpty. But this means a future breaking change of switching to Foldable1.

@meooow25
Copy link
Contributor Author

meooow25 commented Oct 9, 2024

Looks like this would be in violation of the PVP FAQ: https://pvp.haskell.org/faq/#what-implications-does-the-pvp-have-for-conditional-apis

I will make the change to use NonEmpty.

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.

Export Set intersections and Intersection
1 participant