Skip to content

Commit

Permalink
remove eta-expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed May 8, 2024
1 parent b6307be commit 06e5553
Show file tree
Hide file tree
Showing 14 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/CorecursiveList.scala
Expand Up @@ -144,7 +144,7 @@ object CorecursiveList extends CorecursiveListInstances {
orElse ff.step(sf).flatMap(st => bstep(fa.init, just(st))))
}
CorecursiveList((fa.init, Empty(): Maybe[(ff.S, A => B)])
)((bstep _).tupled)
)(bstep.tupled)
}

override def bind[A, B](fa: CorecursiveList[A])(f: A => CorecursiveList[B]) = {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/Cozip.scala
Expand Up @@ -61,6 +61,6 @@ trait IsomorphismCozip[F[_], G[_]] extends Cozip[F] {
def iso: F <~> G

def cozip[A, B](x: F[A \/ B]): (F[A] \/ F[B]) =
G.cozip(iso.to(x)).bimap(iso.from.apply _, iso.from.apply _)
G.cozip(iso.to(x)).bimap(iso.from.apply, iso.from.apply)
////
}
10 changes: 5 additions & 5 deletions core/src/main/scala/scalaz/FingerTree.scala
Expand Up @@ -485,7 +485,7 @@ sealed abstract class FingerTree[V, A](implicit measurer: Reducer[A, V]) {
(v, pr, m, sf) => {
//F.ap(traverseFinger(sf)(f))(F.ap(m.traverseTree(n => traverseNode(n)(f)))(F.map(traverseFinger(pr)(f))(pr => mkDeep(pr)_)))
//the implementation below seems most efficient. The straightforward implementation using F.map3 leads to an explosion of traverseTree calls
val fmap2 = F.apply2(traverseFinger(pr)(f), m.traverseTree(n => traverseNode(n)(f)))((a,b) => mkDeep(a)(b)_)
val fmap2 = F.apply2(traverseFinger(pr)(f), m.traverseTree(n => traverseNode(n)(f)))((a,b) => mkDeep(a)(b))
F.ap(traverseFinger(sf)(f))(fmap2)
})
}
Expand All @@ -494,7 +494,7 @@ sealed abstract class FingerTree[V, A](implicit measurer: Reducer[A, V]) {
def mkNode(x: B)(y: B)(z: B): Node[V2, B] = node3(x, y, z)
node.fold((v, a, b) => F.apply2(f(a), f(b))((x, y) => node2(x, y)),
(v, a, b, c) => {
F.ap(f(c))(F.ap(f(b))(F.map(f(a))(x => mkNode(x)_)))
F.ap(f(c))(F.ap(f(b))(F.map(f(a))(x => mkNode(x))))
}
)
}
Expand All @@ -505,9 +505,9 @@ sealed abstract class FingerTree[V, A](implicit measurer: Reducer[A, V]) {
def mkFour(w: B)(x: B)(y: B)(z: B): Finger[V2, B] = four(w, x, y, z)
digit match {
case One(v, a) => F.map(f(a))(x => one(x))
case Two(v, a, b) => F.ap(f(b))(F.map(f(a))(x => mkTwo(x)_))
case Three(v, a, b, c) => F.ap(f(c))(F.ap(f(b))(F.map(f(a))(x => mkThree(x)_)))
case Four(v, a, b, c, d) => F.ap(f(d))(F.ap(f(c))(F.ap(f(b))(F.map(f(a))(x => mkFour(x)_))))
case Two(v, a, b) => F.ap(f(b))(F.map(f(a))(x => mkTwo(x)))
case Three(v, a, b, c) => F.ap(f(c))(F.ap(f(b))(F.map(f(a))(x => mkThree(x))))
case Four(v, a, b, c, d) => F.ap(f(d))(F.ap(f(c))(F.ap(f(b))(F.map(f(a))(x => mkFour(x)))))
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/IStream.scala
Expand Up @@ -197,7 +197,7 @@ object IStream {
}
}

loop _
loop

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJS, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJS, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootNative, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootNative, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJS, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJS, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootNative, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootNative, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJS, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJS, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootNative, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootNative, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJS, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJS, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootNative, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootNative, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJS, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJS, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootNative, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootNative, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJS, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJS, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootNative, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootNative, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJS, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJS, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootNative, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootNative, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (21, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (11, 2, rootJVM)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJS, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJS, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootNative, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootNative, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (3, rootJVM, 8)

method loop is eta-expanded even though scalaz.Equal[scalaz.IStream[A]] does not have the @FunctionalInterface annotation.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.

Check warning on line 200 in core/src/main/scala/scalaz/IStream.scala

View workflow job for this annotation

GitHub Actions / test (2, rootJVM, 8)

Eta-expansion to expected type scalaz.Equal[scalaz.IStream[A]], which is not a function type but is SAM-convertible to (scalaz.IStream[A], scalaz.IStream[A]) => Boolean.
}

}
8 changes: 4 additions & 4 deletions core/src/main/scala/scalaz/Isomorphism.scala
Expand Up @@ -60,8 +60,8 @@ sealed abstract class Isomorphisms {
GF: Arr[G, F] <~< (G ~~> F)
): F[A, B] <=> G[A, B] =
new (F[A, B] <=> G[A, B]){
def from = GF(self.from).apply _
def to = FG(self.to).apply _
def from = GF(self.from).apply
def to = FG(self.to).apply
}

def unlift1[A](implicit
Expand Down Expand Up @@ -191,8 +191,8 @@ trait IsomorphismAssociative[F[_, _], G[_, _]] extends Associative[F] {
def iso: F <~~> G

override def reassociateLeft[A, B, C](f: F[A, F[B, C]]): F[F[A, B], C] =
iso.from(G.leftMap(G.reassociateLeft(G.rightMap(iso.to(f))(iso.to.apply _)))(iso.from.apply _))
iso.from(G.leftMap(G.reassociateLeft(G.rightMap(iso.to(f))(iso.to.apply)))(iso.from.apply))

override def reassociateRight[A, B, C](f: F[F[A, B], C]): F[A, F[B, C]] =
iso.from(G.rightMap(G.reassociateRight(G.leftMap(iso.to(f))(iso.to.apply _)))(iso.from.apply _))
iso.from(G.rightMap(G.reassociateRight(G.leftMap(iso.to(f))(iso.to.apply)))(iso.from.apply))
}
2 changes: 1 addition & 1 deletion example/src/main/scala/scalaz/example/ApplyUsage.scala
Expand Up @@ -75,7 +75,7 @@ object ApplyUsage {

def add8(a: Int, b: Int, c: Int, d: Int, e: Int, f: Int, g: Int, h: Int) = a+b+c+d+e+f+g+h
val someOf8Options = (1.some |@| 2.some |@| 3.some |@| 4.some |@|
5.some |@| 6.some |@| 7.some |@| 8.some)(add8 _)
5.some |@| 6.some |@| 7.some |@| 8.some)(add8)
assert(someOf8Options === 36.some)

// the applicative builder created by |@| also has a "tupled" method
Expand Down
Expand Up @@ -138,9 +138,9 @@ object ContravariantCoyonedaUsage {
// type of that list of sort key functions and indexes is:

val untypedSortKeys: List[(String => java.io.Serializable, Int)] =
List((caseInsensitively _, 0),
(parseDate _, 1),
(parseCommaNum _, 2))
List((caseInsensitively, 0),
(parseDate, 1),
(parseCommaNum, 2))

// The problem is that the return type for each sort key is different,
// and is an absolutely essential part of the sort process. Check
Expand Down
4 changes: 2 additions & 2 deletions example/src/main/scala/scalaz/example/StateTUsage.scala
Expand Up @@ -82,7 +82,7 @@ object LaunchburyInterpreter {
// Substitute new variable names in
// e.g. sub(map("x" -> "y"), Var("x")) => Var("y")
private def sub(m: IMap[String, String])(e: Expr): Expr = {
val subExpr = sub(m) _
val subExpr = sub(m)
def subName(n: String) : String = m lookup n getOrElse n
e match {
case Lambda(z, e2) => Lambda(subName(z), subExpr(e2))
Expand Down Expand Up @@ -113,7 +113,7 @@ object LaunchburyInterpreter {
// IList[((originalVar, Expr), freshVar)]
newBindings = bs.toIList.zip(fs)
// sub(Map(originalVar -> freshVar))
subs = sub( newBindings.map(tpl => tpl.copy(_1 = tpl._1._1)).toMap ) _
subs = sub( newBindings.map(tpl => tpl.copy(_1 = tpl._1._1)).toMap )
// List[freshVar, Expr] - change to map when dolio's done
bs2 = newBindings.map(tpl => tpl.copy(_1 = tpl._2, _2 = tpl._1._2)).toIList
e3 <- freshen( subs(e2) )
Expand Down
Expand Up @@ -489,7 +489,7 @@ object ScalazArbitrary {
)(deep[V, A](_, _, _))
}
}
Gen.sized(fingerTree[A] _)
Gen.sized(fingerTree[A])
}

implicit def IndSeqArbibrary[A: Arbitrary]: Arbitrary[IndSeq[A]] = Functor[Arbitrary].map(arb[List[A]])(IndSeq.fromSeq)
Expand Down

0 comments on commit 06e5553

Please sign in to comment.