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

Reducer[C,M] requries Monoid[M] when Semigroup[M] would suffice #1038

Closed
gwils opened this issue Nov 6, 2015 · 2 comments
Closed

Reducer[C,M] requries Monoid[M] when Semigroup[M] would suffice #1038

gwils opened this issue Nov 6, 2015 · 2 comments
Assignees

Comments

@gwils
Copy link

gwils commented Nov 6, 2015

The Monoid[M] constraint on Reducer[C,M] is too tight. Semigroup[M] is enough.
Reducer[C,M] should be changed to only require Semigroup[M].

I assume scalaz.Reducer is based on https://hackage.haskell.org/package/monoids/docs/Data-Monoid-Reducer.html
but that has been deprecated by https://hackage.haskell.org/package/reducers/docs/Data-Semigroup-Reducer.html

@aryairani
Copy link
Contributor

I think PRs get more attention than Issues do.

@S11001001 S11001001 self-assigned this Apr 5, 2017
@S11001001
Copy link
Member

Our Reducer couples with Generator, for which the zero is required. A semigroup-Reducer would probably require a semigroup-Generator to match.

It might be worth revisiting this in the context of Foldable/Foldable1 in general, which could use more user-controllable ways of delivering elements, but that would be a larger redesign.

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

No branches or pull requests

3 participants