Skip to content
New issue

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

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

Already on GitHub? # to your account

Miscellaneous cleanup to Xor #276

Merged
merged 1 commit into from
Apr 9, 2015

Conversation

mpilquist
Copy link
Member

  • Removes Xor#filter, as the dependency on a Monoid[A] is ad-hoc
  • Adds orElse, valueOr, and ensure methods to Xor
  • Adds Xor.fromOption
  • Miscellaneous ScalaDoc
  • Miscellaneous formatting cleanup

 - Removes `Xor#filter`, as the dependency on a `Monoid[A]` is ad-hoc
 - Adds `orElse`, `valueOr`, and `ensure` methods to `Xor`
 - Adds `Xor.fromOption`
 - Miscellaneous ScalaDoc
 - Miscellaneous formatting cleanup

Note: this should be merged after typelevel#272
@non
Copy link
Contributor

non commented Apr 9, 2015

👍

1 similar comment
@fthomas
Copy link
Member

fthomas commented Apr 9, 2015

👍

fthomas added a commit that referenced this pull request Apr 9, 2015
@fthomas fthomas merged commit f5a3e11 into typelevel:master Apr 9, 2015
ceedubs added a commit to ceedubs/cats that referenced this pull request Nov 7, 2015
I think this was leftover from copy/paste from `Xor`. It mentions that
it's useful when using `Validated` in for-comprehensions, but you can't
actually use `Validated` in for-comprehensions since it doesn't have a
`flatMap` method :).

Also, `Xor` no longer has a `filter` method. It was removed in typelevel#276
since using the monoid zero when the predicate doesn't match is rather
arbitrary and can lead to surprises. I think we should follow that
precedent for `Validated`.
@ceedubs ceedubs mentioned this pull request Nov 7, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants