Skip to content

Commit

Permalink
I really don't think there is a cyclic dependency dotty...
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWSpence committed Feb 24, 2022
1 parent a02f41e commit 19b3338
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions core/src/main/scala/cats/data/Chain.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
package cats
package data

import Chain._
import Chain.{
empty,
fromSeq,
nil,
one,
sentinel,
traverseFilterViaChain,
traverseViaChain,
Append,
ChainIterator,
ChainReverseIterator,
Empty,
NonEmpty,
Singleton,
Wrap
}
import cats.kernel.instances.StaticMethods
import cats.kernel.compat.scalaVersionSpecific._

Expand Down Expand Up @@ -1031,7 +1046,7 @@ sealed abstract private[data] class ChainInstances extends ChainInstances1 {

def empty[A]: Chain[A] = Chain.nil
def combineK[A](c: Chain[A], c2: Chain[A]): Chain[A] = Chain.concat(c, c2)
override def fromIterableOnce[A](as: IterableOnce[A]): Chain[A] = Chain.fromSeq(as.iterator.toSeq)
override def fromIterableOnce[A](xs: IterableOnce[A]): Chain[A] = Chain.fromSeq(xs.iterator.toSeq)
def pure[A](a: A): Chain[A] = Chain.one(a)
def flatMap[A, B](fa: Chain[A])(f: A => Chain[B]): Chain[B] =
fa.flatMap(f)
Expand Down
2 changes: 1 addition & 1 deletion laws/src/main/scala/cats/laws/SemigroupKLaws.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trait SemigroupKLaws[F[_]] {
def repeat1K[A](a: F[A]): IsEq[F[A]] =
F.combineNK(a, 1) <-> a

def repeat2[A](a: F[A]): IsEq[F[A]] =
def repeat2K[A](a: F[A]): IsEq[F[A]] =
F.combineNK(a, 2) <-> F.combineK(a, a)

def combineAllOptionK[A](xs: Vector[F[A]]): IsEq[Option[F[A]]] =
Expand Down

0 comments on commit 19b3338

Please sign in to comment.