Skip to content

Commit

Permalink
Merge pull request #937 from alexandru/master
Browse files Browse the repository at this point in the history
Issue #934 - Make Eval covariant
  • Loading branch information
non committed May 30, 2016
2 parents 3c7dfd0 + 2a001af commit 9e41d8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/scala/cats/Eval.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import cats.syntax.all._
* Eval instance -- this can defeat the trampolining and lead to stack
* overflows.
*/
sealed abstract class Eval[A] extends Serializable { self =>
sealed abstract class Eval[+A] extends Serializable { self =>

/**
* Evaluate the computation and return an A value.
Expand Down Expand Up @@ -279,7 +279,7 @@ object Eval extends EvalInstances {
cc.start().asInstanceOf[L],
cc.run.asInstanceOf[C] :: c.run.asInstanceOf[C] :: fs)
case xx =>
loop(c.run(xx.value).asInstanceOf[L], fs)
loop(c.run(xx.value), fs)
}
case x =>
fs match {
Expand Down Expand Up @@ -350,7 +350,7 @@ trait EvalMonoid[A] extends Monoid[Eval[A]] with EvalSemigroup[A] {
trait EvalGroup[A] extends Group[Eval[A]] with EvalMonoid[A] {
implicit def algebra: Group[A]
def inverse(lx: Eval[A]): Eval[A] =
lx.map(_.inverse)
lx.map(_.inverse())
override def remove(lx: Eval[A], ly: Eval[A]): Eval[A] =
for { x <- lx; y <- ly } yield x |-| y
}

0 comments on commit 9e41d8f

Please sign in to comment.