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

Add toValidatedNel to Xor #971

Merged
merged 1 commit into from
Apr 6, 2016

Conversation

liff
Copy link
Contributor

@liff liff commented Apr 5, 2016

As a convenient shorthand for xor.toValidated.toValidatedNel.

I suppose .toValidatedNel should be the version more often used since the point of Validated is to accumulate errors?

As a convenient shorthand for xor.toValidated.toValidatedNel.
@codecov-io
Copy link

Current coverage is 90.87%

Merging #971 into master will not affect coverage as of 95f759a

@@            master    #971   diff @@
======================================
  Files          181     181       
  Stmts         2158    2159     +1
  Branches        42      42       
  Methods          0       0       
======================================
+ Hit           1961    1962     +1
  Partial          0       0       
  Missed         197     197       

Review entire Coverage Diff as of 95f759a

Powered by Codecov. Updated on successful CI builds.

@stew
Copy link
Contributor

stew commented Apr 6, 2016

👍

@adelbertc
Copy link
Contributor

Is the [AA >: A] needed here?

@liff
Copy link
Contributor Author

liff commented Apr 6, 2016

It doesn't compile without:

cats/core/src/main/scala/cats/data/Xor.scala:75: covariant type A occurs in invariant position in type => cats.data.ValidatedNel[A,B] of method toValidatedNel
  def toValidatedNel: ValidatedNel[A,B] = fold(Validated.invalidNel, Validated.valid)
      ^

Is it due to OneAnd's invariance?

@adelbertc
Copy link
Contributor

Ah yes 👍

@adelbertc adelbertc merged commit b3033e2 into typelevel:master Apr 6, 2016
@liff liff deleted the topic/xor-toValidatedNel branch April 25, 2016 12:00
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.

4 participants