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

Remove AA >: A constraint from XorT.orElse #725

Merged
merged 2 commits into from
Dec 9, 2015

Conversation

ceedubs
Copy link
Contributor

@ceedubs ceedubs commented Dec 8, 2015

No description provided.

@codecov-io
Copy link

Current coverage is 85.75%

Merging #725 into master will increase coverage by +0.17% as of 43ffe19

@@            master    #725   diff @@
======================================
  Files          162     162       
  Stmts         2247    2247       
  Branches        74      74       
  Methods          0       0       
======================================
+ Hit           1923    1927     +4
  Partial          0       0       
+ Missed         324     320     -4

Review entire Coverage Diff as of 43ffe19

Powered by Codecov. Updated on successful CI builds.

@adelbertc
Copy link
Contributor

👍

@@ -29,11 +29,11 @@ final case class XorT[F[_], A, B](value: F[A Xor B]) {
}
}

def orElse[AA >: A, BB >: B](default: => XorT[F, AA, BB])(implicit F: Monad[F]): XorT[F, AA, BB] = {
def orElse[AA, BB >: B](default: => XorT[F, AA, BB])(implicit F: Monad[F]): XorT[F, AA, BB] = {
XorT(F.flatMap(value) { xor =>
xor match {
case Xor.Left(_) => default.value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are not using xor after match I think we can just remove xor => xor match { ... }.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet another good catch. I pushed an update.

@fthomas
Copy link
Member

fthomas commented Dec 9, 2015

👍

fthomas added a commit that referenced this pull request Dec 9, 2015
Remove AA >: A constraint from XorT.orElse
@fthomas fthomas merged commit 32fa9e2 into typelevel:master Dec 9, 2015
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