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

PoC: Add non-empty folds #483

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

PoC: Add non-empty folds #483

wants to merge 1 commit into from

Conversation

phadej
Copy link
Contributor

@phadej phadej commented Mar 12, 2023

As Foldable1 is in base-4.18 and there is a light compatibility package, we can do this somewhat easily.

This breaks symmetry of hierarchy,as there is no NeTraversal, but it's much less useful than non-empty folds (i.e. to semigroups).

This (softly) needs a Foldable1WithIndex to be added to indexed-traversable, which I'll do some time in the future (after GHC-9.6 updates are somewhat settled).

Partly implements #34

@phadej
Copy link
Contributor Author

phadej commented May 2, 2023

Updated with a proof-of-concept of indexed folds too.

I'll leave this at this state until someone else asks for non-empty folds, but I'm probably going to release indexed-traversable-0.1.3 in near future.

As Foldable1 is in base-4.18 and there is a light
compatibility package, we can do this somewhat easily

This breaks symmetry of hierarchy,as there is no NeTraversal,
but it's much less useful than non-empty folds (i.e. to semigroups)
@phadej
Copy link
Contributor Author

phadej commented Dec 3, 2023

indexed-traversable-0.1.3 has been released (some time ago already)

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.

1 participant