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

Support cross-compiling build with 2.13.0-M5 #759

Merged
merged 41 commits into from
Mar 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
95f41a8
compat code for ScalaOrderingWrapper and ArrayBuilder.make
erikerlandson Feb 27, 2019
e94e694
add scala-2.13 and scala-pre-2.13 as conditional source dirs
erikerlandson Feb 27, 2019
85913cd
add scala-collection-compat dependency
erikerlandson Feb 27, 2019
53c18c2
guard -Ywarn-unused-import flag
erikerlandson Feb 27, 2019
258346d
cross compile ArrayBuilder.make calls
erikerlandson Feb 27, 2019
862f28b
insert ScalaOrderingWrapperCompat
erikerlandson Feb 28, 2019
91112b8
CanBuildFrom -> Factory
erikerlandson Feb 28, 2019
89d3246
Traversable -> Iterable
erikerlandson Feb 28, 2019
d3563d1
add toMap call to fix MapView returns
erikerlandson Mar 1, 2019
63f84b4
fix some 2.13 compiles issues in Dist
erikerlandson Mar 1, 2019
6ff2288
code tweaks for 2.13 compat
erikerlandson Mar 1, 2019
c4217c3
compat layer for SeqLike
erikerlandson Mar 2, 2019
b58eb69
change imports to compat layer for SeqLike
erikerlandson Mar 2, 2019
91507ba
compat layer for IterableLike
erikerlandson Mar 2, 2019
bf770cd
use compat layer for IterableLike
erikerlandson Mar 2, 2019
0f56610
TraversableLike -> IterableLike
erikerlandson Mar 2, 2019
53fe5e3
toSeq call to satisfy 2.13
erikerlandson Mar 3, 2019
23b6a12
cross compile DataSets example for 2.13
erikerlandson Mar 3, 2019
19dbc47
parallel sequence shim
erikerlandson Mar 3, 2019
399b020
more compat layer for 2.13 crossbuilding
erikerlandson Mar 3, 2019
533a544
tweaks for 2.13 cross compiling
erikerlandson Mar 3, 2019
8e34c0e
This is commented out because I haven't figured out how to cross comp…
erikerlandson Mar 3, 2019
d04cfcd
take out JS testing to see if JVM tests run in CI
erikerlandson Mar 3, 2019
78e9d31
comment out some tests that aren't compiling or inf-looping
erikerlandson Mar 3, 2019
52d5a35
add explicit return type to parallelSeq shim
erikerlandson Mar 4, 2019
b8d5e52
use %%% for scala-collection-compat
erikerlandson Mar 4, 2019
5d4a06d
try adding 2.13 to CI
erikerlandson Mar 4, 2019
5e279d1
pay the code style bridge troll
erikerlandson Mar 4, 2019
0e85226
bump sbt-scoverage rev to pick up 2.13
erikerlandson Mar 4, 2019
a0056c6
turn off buffering and parallel for tests to localize inf-loops
erikerlandson Mar 5, 2019
45196c1
uncomment test
erikerlandson Mar 5, 2019
f4d5edc
annotate tests causing compile errors with 2.13
erikerlandson Mar 5, 2019
6761f06
comment out a couple tests causing infinite loops on 2.13
erikerlandson Mar 5, 2019
314878d
turn off docs/tut on 2.13
erikerlandson Mar 5, 2019
f95d0c7
rename implicits to avoid import conflicts
erikerlandson Mar 8, 2019
c506939
uncomment unit tests using Sized that are now compiling with 2.13
erikerlandson Mar 8, 2019
e9c06b8
add preScala2p13 method for runtime disable of a couple unit tests
erikerlandson Mar 9, 2019
37d8e9c
turn off inf-looping tests at runtime for 2.13 only
erikerlandson Mar 9, 2019
3db7fb7
IterableLikeCompat, for squaring the newBuilder method circle
erikerlandson Mar 10, 2019
69f3e40
simplification example complies using IterableLikeCompat shim
erikerlandson Mar 10, 2019
aaa4715
remove logBuffered and parallelExecution settings I used for debuggin…
erikerlandson Mar 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: scala
scala:
- 2.11.12
- 2.12.6
- 2.13.0-M5

jdk:
- oraclejdk8
Expand Down
14 changes: 10 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ lazy val apfloatVersion = "1.8.3"
lazy val jscienceVersion = "4.3.1"
lazy val apacheCommonsMath3Version = "3.6.1"


// Projects

lazy val spire = project.in(file("."))
Expand Down Expand Up @@ -275,12 +274,18 @@ addCommandAlias("validate", ";validateJVM;validateJS")
lazy val buildSettings = Seq(
organization := "org.typelevel",
scalaVersion := scalaVersions("2.12"),
crossScalaVersions := Seq(scalaVersions("2.11"), scalaVersions("2.12"))
crossScalaVersions := Seq(scalaVersions("2.11"), scalaVersions("2.12")),
unmanagedSourceDirectories in Compile += {
val sharedSourceDir = (baseDirectory in ThisBuild).value / "compat/src/main"
if (scalaVersion.value.startsWith("2.13.")) sharedSourceDir / "scala-2.13"
else sharedSourceDir / "scala-pre-2.13"
}
)

lazy val commonDeps = Seq(libraryDependencies ++= Seq(
"org.typelevel" %%% "machinist" % machinistVersion,
"org.typelevel" %%% "algebra" % algebraVersion))
"org.typelevel" %%% "algebra" % algebraVersion,
"org.scala-lang.modules" %%% "scala-collection-compat" % "0.3.0"))

lazy val commonSettings = Seq(
scalacOptions ++= commonScalacOptions.value.diff(Seq(
Expand Down Expand Up @@ -543,8 +548,9 @@ lazy val warnUnusedImport = Seq(
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 10)) =>
Seq()
case Some((2, n)) if n >= 11 =>
case Some((2, n)) if ((n >= 11) && (n <= 12)) =>
Copy link
Member

Choose a reason for hiding this comment

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

just a silly style thing, but you can case Some((2, 11 | 12)). I sometimes forget that | is usable other than at the top level of the 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.

I had no idea!

Copy link
Contributor

Choose a reason for hiding this comment

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

There's also

import sbt.librarymanagement.{ SemanticSelector, VersionNumber }
VersionNumber(scalaVersion.value).matchesSemVer(SemanticSelector("2.11.x || 2.12.x"))

Seq("-Ywarn-unused-import")
case _ => Seq()
}
},
scalacOptions in (Compile, console) ~= {_.filterNot("-Ywarn-unused-import" == _)},
Expand Down
19 changes: 19 additions & 0 deletions compat/src/main/scala-2.13/package.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package spire
package object scalacompat {

import scala.collection.mutable.ArrayBuilder
import scala.reflect.ClassTag

def arrayBuilderMake[T]()(implicit tag: ClassTag[T]): ArrayBuilder[T] =
ArrayBuilder.make[T]

def parallelSeq[A](s: Seq[A]): Seq[A] = {
erikerlandson marked this conversation as resolved.
Show resolved Hide resolved
throw new Exception("parallel sequences are currently disabled for scala 2.13 and higher")
}

def preScala2p13: Boolean = false

type SeqLike[A, C] = scala.collection.SeqOps[A, Seq, C]

type IterableLike[A, C] = scala.collection.IterableOps[A, Iterable, C]
}
12 changes: 12 additions & 0 deletions compat/src/main/scala-2.13/scalacompat.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package spire.scalacompat

trait ScalaOrderingWrapperCompat[A] extends scala.math.Ordering[A] {
override def min[U <: A](x:U, y:U): U = if (lt(x, y)) x else y
override def max[U <: A](x:U, y:U): U = if (gt(x, y)) x else y
}

trait BuilderCompat[-A, +To] extends scala.collection.mutable.Builder[A, To]

trait IterableLikeCompat[A, Repr] extends spire.scalacompat.IterableLike[A, Repr] {
def newBuilder: scala.collection.mutable.Builder[A, Repr]
}
18 changes: 18 additions & 0 deletions compat/src/main/scala-pre-2.13/package.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package spire
package object scalacompat {

import scala.collection.mutable.ArrayBuilder
import scala.collection.parallel.ParSeq
import scala.reflect.ClassTag

def arrayBuilderMake[T]()(implicit tag: ClassTag[T]): ArrayBuilder[T] =
ArrayBuilder.make[T]()

def parallelSeq[A](s: Seq[A]): ParSeq[A] = s.par

def preScala2p13: Boolean = true

type SeqLike[A, C] = scala.collection.SeqLike[A, C]

type IterableLike[A, C] = scala.collection.IterableLike[A, C]
}
13 changes: 13 additions & 0 deletions compat/src/main/scala-pre-2.13/scalacompat.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package spire.scalacompat

trait ScalaOrderingWrapperCompat[A] extends scala.math.Ordering[A] {
override def min(x:A, y:A): A = if (lt(x, y)) x else y
override def max(x:A, y:A): A = if (gt(x, y)) x else y
}

trait BuilderCompat[-A, +To] extends scala.collection.mutable.Builder[A, To] {
def addOne(elem: A): this.type
def +=(elem: A): this.type = addOne(elem)
}

trait IterableLikeCompat[A, Repr] extends spire.scalacompat.IterableLike[A, Repr]
6 changes: 3 additions & 3 deletions core/src/main/scala/spire/algebra/CoordinateSpace.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package algebra

import spire.std._

import scala.collection.SeqLike
import scala.collection.generic.CanBuildFrom
import scala.collection.compat._
import spire.scalacompat.SeqLike

trait CoordinateSpace[V, @sp(Float, Double) F] extends Any with InnerProductSpace[V, F] {
def dimensions: Int
Expand Down Expand Up @@ -34,7 +34,7 @@ object CoordinateSpace {
@inline final def apply[V, @sp(Float,Double) F](implicit V: CoordinateSpace[V, F]): CoordinateSpace[V, F] = V

def seq[A: Field, CC[A] <: SeqLike[A, CC[A]]](dimensions: Int)(implicit
cbf0: CanBuildFrom[CC[A], A, CC[A]]): SeqCoordinateSpace[A, CC[A]] = new SeqCoordinateSpace[A, CC[A]](dimensions)
cbf0: Factory[A, CC[A]]): SeqCoordinateSpace[A, CC[A]] = new SeqCoordinateSpace[A, CC[A]](dimensions)

def array[@sp(Float, Double) A: Field: ClassTag](dimensions: Int): CoordinateSpace[Array[A], A] =
new ArrayCoordinateSpace[A](dimensions)
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/scala/spire/algebra/NormedVectorSpace.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package algebra

import spire.std._

import scala.collection.SeqLike
import scala.collection.generic.CanBuildFrom
import scala.collection.compat._
import spire.scalacompat.SeqLike

/**
* A normed vector space is a vector space equipped with a function
Expand Down Expand Up @@ -35,10 +35,10 @@ private[algebra] trait NormedVectorSpace0 {

private[algebra] trait NormedVectorSpaceFunctions {
def max[A, CC[A] <: SeqLike[A, CC[A]]](implicit field0: Field[A], order0: Order[A],
signed0: Signed[A], cbf0: CanBuildFrom[CC[A], A, CC[A]]): NormedVectorSpace[CC[A], A] =
signed0: Signed[A], cbf0: Factory[A, CC[A]]): NormedVectorSpace[CC[A], A] =
new SeqMaxNormedVectorSpace[A, CC[A]]

def Lp[A, CC[A] <: SeqLike[A, CC[A]]](p: Int)(implicit field0: Field[A], nroot0: NRoot[A],
signed0: Signed[A], cbf0: CanBuildFrom[CC[A], A, CC[A]]): NormedVectorSpace[CC[A], A] =
signed0: Signed[A], cbf0: Factory[A, CC[A]]): NormedVectorSpace[CC[A], A] =
new SeqLpNormedVectorSpace[A, CC[A]](p)
}
12 changes: 6 additions & 6 deletions core/src/main/scala/spire/math/Polynomial.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package spire
package math

import scala.collection.mutable.ArrayBuilder
import spire.scalacompat.arrayBuilderMake

import spire.algebra._
import spire.math.poly._
Expand Down Expand Up @@ -125,8 +125,8 @@ object Polynomial extends PolynomialInstances {
}

private final def split[@sp(Double) C: ClassTag](poly: Polynomial[C]): (Array[Int], Array[C]) = {
val es = ArrayBuilder.make[Int]()
val cs = ArrayBuilder.make[C]()
val es = arrayBuilderMake[Int]()
val cs = arrayBuilderMake[C]()
poly foreach { (e, c) =>
es += e
cs += c
Expand Down Expand Up @@ -204,11 +204,11 @@ trait Polynomial[@sp(Double) C] { lhs =>

/** Returns a map from exponent to coefficient of this polynomial. */
def data(implicit ring: Semiring[C], eq: Eq[C]): Map[Int, C] = {
val bldr = new scala.collection.mutable.MapBuilder[Int, C, Map[Int, C]](Map.empty[Int, C])
val bldr = scala.collection.mutable.Map.newBuilder[Int, C]
foreachNonZero { (e, c) =>
bldr += ((e, c))
}
bldr.result()
bldr.result().toMap
}

/**
Expand Down Expand Up @@ -474,7 +474,7 @@ trait Polynomial[@sp(Double) C] { lhs =>
if (isZero) {
"(0)"
} else {
val bldr = ArrayBuilder.make[Term[C]]()
val bldr = arrayBuilderMake[Term[C]]()
foreach { (e, c) => bldr += Term(c, e) }

val ts = bldr.result()
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/scala/spire/math/ScalaWrappers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private[spire] trait ScalaPartialOrderingWrapper[A] extends scala.math.PartialOr
}


private[spire] trait ScalaOrderingWrapper[A] extends scala.math.Ordering[A] {
private[spire] trait ScalaOrderingWrapper[A] extends spire.scalacompat.ScalaOrderingWrapperCompat[A] {
def order: Order[A]

def compare(x:A, y:A): Int = order.compare(x, y)
Expand All @@ -32,9 +32,6 @@ private[spire] trait ScalaOrderingWrapper[A] extends scala.math.Ordering[A] {
override def gteq(x:A, y:A): Boolean = order.gteqv(x, y)
override def lt(x:A, y:A): Boolean = order.lt(x, y)
override def lteq(x:A, y:A): Boolean = order.lteqv(x, y)

override def min(x:A, y:A): A = order.min(x, y)
override def max(x:A, y:A): A = order.max(x, y)
}

private[spire] trait ScalaNumericWrapper[A] extends scala.math.Numeric[A] with ScalaOrderingWrapper[A] {
Expand All @@ -58,6 +55,9 @@ private[spire] trait ScalaNumericWrapper[A] extends scala.math.Numeric[A] with S

override def signum(x:A): Int = signed.signum(x)
override def abs(x: A): A = signed.abs(x)

// this is an abstract method starting in scala 2.13
def parseString(str: String): Option[A] = None
}

private[spire] trait ScalaFractionalWrapper[A] extends ScalaNumericWrapper[A] with scala.math.Fractional[A] {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/spire/math/Searching.scala
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ object Searching {
if (!aIsNotMinimal)
candidates += a
}
Seq(candidates: _*)
candidates.toSeq
}
}
10 changes: 5 additions & 5 deletions core/src/main/scala/spire/math/poly/PolySparse.scala
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ object PolySparse {
}

final def apply[@sp(Double) C: Semiring: Eq: ClassTag](data: TraversableOnce[Term[C]]): PolySparse[C] = {
import scala.collection.mutable.ArrayBuilder
import spire.scalacompat.arrayBuilderMake

var expBldr = ArrayBuilder.make[Int]()
var coeffBldr = ArrayBuilder.make[C]()
var expBldr = arrayBuilderMake[Int]()
var coeffBldr = arrayBuilderMake[C]()
val zero = Semiring[C].zero
var inReverseOrder = true
var inOrder = true
Expand All @@ -253,8 +253,8 @@ object PolySparse {
} else {
val indices = Array.range(0, exp.length)
indices.qsortBy(exp(_))
expBldr = ArrayBuilder.make[Int]()
coeffBldr = ArrayBuilder.make[C]()
expBldr = arrayBuilderMake[Int]()
coeffBldr = arrayBuilderMake[C]()
var i = 1
var j = indices(0)
var e = exp(j)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/spire/math/prime/Factors.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ case class Factors(elements: Map[SafeLong, Int], sign: Sign)
val sign = (lhs.sign * rhs.sign).toInt
val (nn, dd) = (lhs.elements - rhs.elements).filter(_._2 != 0).partition(_._2 > 0)
val cc = lhs.elements.flatMap { case (p, le) =>
rhs.elements.get(p).map(re => (p, le min re))
rhs.elements.get(p).iterator.map(re => (p, le min re))
}
(sign, nn, dd.map { case (p, e) => (p, -e) }, cc)
}
Expand Down
10 changes: 5 additions & 5 deletions core/src/main/scala/spire/optional/mapIntIntPermutation.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package spire
package optional

import scala.collection.SeqLike
import scala.collection.generic.CanBuildFrom
import scala.collection.compat._
import spire.scalacompat.SeqLike

import spire.algebra.{Action, Group}
import spire.algebra.partial.PartialAction
Expand Down Expand Up @@ -30,12 +30,12 @@ final class MapIntIntGroup extends Group[Map[Int, Int]] {
def inverse(a: Map[Int, Int]): Map[Int, Int] = a.map(_.swap).toMap
}

final class MapIntIntSeqPartialAction[A, SA <: SeqLike[A, SA]](implicit cbf: CanBuildFrom[SA, A, SA]) extends PartialAction[SA, Map[Int, Int]] {
final class MapIntIntSeqPartialAction[A, SA <: SeqLike[A, SA]](implicit cbf: Factory[A, SA]) extends PartialAction[SA, Map[Int, Int]] {
import mapIntIntPermutation._
def partialActl(perm: Map[Int, Int], sa: SA): Opt[SA] = {
if (perm.isEmpty) return Opt(sa)
if (perm.keys.max >= sa.size) return Opt.empty[SA]
val builder = cbf()
val builder = cbf.newBuilder
cforRange(0 until sa.size) { k =>
builder += sa(perm.getOrElse(k, k))
}
Expand All @@ -48,5 +48,5 @@ final class MapIntIntSeqPartialAction[A, SA <: SeqLike[A, SA]](implicit cbf: Can
object mapIntIntPermutation {
implicit val MapIntIntIntAction: Action[Int, Map[Int, Int]] = new MapIntIntIntAction
implicit val MapIntIntGroup: Group[Map[Int, Int]] = new MapIntIntGroup
implicit def MapIntIntSeqPartialAction[A, CC[A] <: SeqLike[A, CC[A]]](implicit cbf: CanBuildFrom[CC[A], A, CC[A]]): PartialAction[CC[A], Map[Int, Int]] = new MapIntIntSeqPartialAction[A, CC[A]]
implicit def MapIntIntSeqPartialAction[A, CC[A] <: SeqLike[A, CC[A]]](implicit cbf: Factory[A, CC[A]]): PartialAction[CC[A], Map[Int, Int]] = new MapIntIntSeqPartialAction[A, CC[A]]
}
22 changes: 11 additions & 11 deletions core/src/main/scala/spire/optional/partialIterable.scala
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package spire
package optional

import scala.collection.IterableLike
import scala.collection.generic.CanBuildFrom
import scala.collection.compat._
import spire.scalacompat.IterableLike

import spire.algebra.{Semigroup, Group}
import spire.algebra.partial.{Semigroupoid, Groupoid}
import spire.util._

final class IterableSemigroupoid[A, SA <: IterableLike[A, SA]](implicit cbf: CanBuildFrom[SA, A, SA], A: Semigroup[A]) extends Semigroupoid[SA] {
final class IterableSemigroupoid[A, SA <: IterableLike[A, SA]](implicit cbf: Factory[A, SA], A: Semigroup[A]) extends Semigroupoid[SA] {
override def opIsDefined(x: SA, y: SA): Boolean = x.size == y.size
def partialOp(x: SA, y: SA): Opt[SA] =
if (opIsDefined(x, y)) Opt({
val xIt = x.iterator
val yIt = y.iterator
val builder = cbf()
val builder = cbf.newBuilder
while (xIt.nonEmpty) {
assert(yIt.nonEmpty)
builder += A.combine(xIt.next, yIt.next)
Expand All @@ -23,30 +23,30 @@ final class IterableSemigroupoid[A, SA <: IterableLike[A, SA]](implicit cbf: Can
}) else Opt.empty[SA]
}

final class IterableGroupoid[A, SA <: IterableLike[A, SA]](implicit cbf: CanBuildFrom[SA, A, SA], A: Group[A]) extends Groupoid[SA] {
final class IterableGroupoid[A, SA <: IterableLike[A, SA]](implicit cbf: Factory[A, SA], A: Group[A]) extends Groupoid[SA] {
override def opIsDefined(x: SA, y: SA): Boolean = x.size == y.size
def partialOp(x: SA, y: SA): Opt[SA] =
if (opIsDefined(x, y)) Opt({
val xIt = x.iterator
val yIt = y.iterator
val builder = cbf()
val builder = cbf.newBuilder
while (xIt.nonEmpty) {
assert(yIt.nonEmpty)
builder += A.combine(xIt.next, yIt.next)
}
builder.result()
}) else Opt.empty[SA]
def inverse(a: SA): SA = a.map(A.inverse(_))(cbf)
override def leftId(a: SA): SA = a.map(x => A.empty)(cbf)
override def rightId(a: SA): SA = a.map(x => A.empty)(cbf)
def inverse(a: SA): SA = cbf.newBuilder.++=(a.map(A.inverse(_))).result
override def leftId(a: SA): SA = cbf.newBuilder.++=(a.map(x => A.empty)).result
override def rightId(a: SA): SA = cbf.newBuilder.++=(a.map(x => A.empty)).result
}

trait PartialIterable0 {
implicit def IterableSemigroupoid[A: Semigroup, CC[A] <: IterableLike[A, CC[A]]](implicit cbf: CanBuildFrom[CC[A], A, CC[A]]): Semigroupoid[CC[A]] = new IterableSemigroupoid[A, CC[A]]
implicit def IterableSemigroupoid[A: Semigroup, CC[A] <: IterableLike[A, CC[A]]](implicit cbf: Factory[A, CC[A]]): Semigroupoid[CC[A]] = new IterableSemigroupoid[A, CC[A]]
}

trait PartialIterable1 extends PartialIterable0 {
implicit def IterableGroupoid[A: Group, CC[A] <: IterableLike[A, CC[A]]](implicit cbf: CanBuildFrom[CC[A], A, CC[A]]): Groupoid[CC[A]] = new IterableGroupoid[A, CC[A]]
implicit def IterableGroupoid[A: Group, CC[A] <: IterableLike[A, CC[A]]](implicit cbf: Factory[A, CC[A]]): Groupoid[CC[A]] = new IterableGroupoid[A, CC[A]]
}

object partialIterable extends PartialIterable1
2 changes: 1 addition & 1 deletion core/src/main/scala/spire/optional/vectorOrder.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package spire
package optional

import scala.collection.SeqLike
import spire.scalacompat.SeqLike
import spire.algebra.{ Eq, CModule, Order }
import spire.std.{ SeqVectorEq, SeqVectorOrder }
import spire.std.{ ArrayVectorEq, ArrayVectorOrder }
Expand Down
Loading