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

Validation.ofResult doesn't require Semigroup #496

Open
gusty opened this issue Sep 6, 2022 · 0 comments
Open

Validation.ofResult doesn't require Semigroup #496

gusty opened this issue Sep 6, 2022 · 0 comments

Comments

@gusty
Copy link
Member

gusty commented Sep 6, 2022

When converting from Result<'T, 'TError> to Validation<'TError, 'T> we need to either:

  • Make sure 'TError is a Semigroup (this simply means that the type is additive)
  • Transform to a Semigroup

I'm not sure what's the best way to go, maybe the best backward compatibility way is to add a static constraint to .ofResult

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant