From 78878e72ef17fe2727be793baaa311413fc0bd36 Mon Sep 17 00:00:00 2001 From: Filipe Regadas Date: Tue, 17 Sep 2019 16:48:11 +0100 Subject: [PATCH] Use scalameta scalafmt plugin --- .scalafmt.conf | 1 + .travis.yml | 2 +- .../benchmark/AsyncSummerBenchmark.scala | 3 +- .../BloomFilterDistanceBenchmark.scala | 12 +- .../benchmark/CMSHashingBenchmark.scala | 4 +- .../bijection/AlgebirdBijections.scala | 3 +- .../com/twitter/algebird/AdaptiveVector.scala | 3 +- .../com/twitter/algebird/Aggregator.scala | 70 +- .../com/twitter/algebird/Applicative.scala | 21 +- .../com/twitter/algebird/Approximate.scala | 7 +- .../scala/com/twitter/algebird/Batched.scala | 6 +- .../com/twitter/algebird/BloomFilter.scala | 25 +- .../com/twitter/algebird/CountMinSketch.scala | 168 +- .../com/twitter/algebird/DecayedVector.scala | 14 +- .../com/twitter/algebird/Eventually.scala | 25 +- .../scala/com/twitter/algebird/ExpHist.scala | 13 +- .../algebird/GeneratedAbstractAlgebra.scala | 3074 ++++++++++------- .../algebird/GeneratedProductAlgebra.scala | 2855 ++++++++------- .../com/twitter/algebird/HyperLogLog.scala | 14 +- .../scala/com/twitter/algebird/Identity.scala | 30 +- .../scala/com/twitter/algebird/Interval.scala | 3 +- .../com/twitter/algebird/JavaMonoids.scala | 6 +- .../com/twitter/algebird/MapAlgebra.scala | 32 +- .../com/twitter/algebird/MinHasher.scala | 6 +- .../scala/com/twitter/algebird/Preparer.scala | 13 +- .../scala/com/twitter/algebird/QTree.scala | 46 +- .../com/twitter/algebird/RightFolded2.scala | 4 +- .../com/twitter/algebird/SGDMonoid.scala | 10 +- .../com/twitter/algebird/Semigroup.scala | 3 +- .../com/twitter/algebird/SketchMap.scala | 48 +- .../com/twitter/algebird/SummingQueue.scala | 4 +- .../com/twitter/algebird/TopKMonoid.scala | 3 +- .../com/twitter/algebird/macros/package.scala | 5 +- .../algebird/matrix/AdaptiveMatrix.scala | 26 +- .../algebird/monad/StateWithError.scala | 11 +- .../algebird/generic/EquivOrdering.scala | 8 +- .../twitter/algebird/generic/Instances.scala | 32 +- .../twitter/algebird/ApplicativeLaws.scala | 34 +- .../algebird/ApproximateProperty.scala | 22 +- .../com/twitter/algebird/BaseProperties.scala | 8 +- .../algebird/BaseVectorSpaceProperties.scala | 37 +- .../com/twitter/algebird/FunctorLaws.scala | 34 +- .../com/twitter/algebird/MonadLaws.scala | 107 +- .../scalacheck/IntervalInstances.scala | 4 +- .../com/twitter/algebird/AggregatorLaws.scala | 46 +- .../algebird/AppendAggregatorTest.scala | 20 +- .../twitter/algebird/ApproximateTest.scala | 4 +- .../twitter/algebird/BloomFilterTest.scala | 6 +- .../algebird/CollectionSpecification.scala | 27 +- .../twitter/algebird/CountMinSketchTest.scala | 28 +- .../algebird/DecayedVectorProperties.scala | 6 +- .../com/twitter/algebird/EventuallyTest.scala | 56 +- .../com/twitter/algebird/ExpHistLaws.scala | 3 +- .../scala/com/twitter/algebird/FoldTest.scala | 15 +- .../GeneratedAbstractAlgebraLaws.scala | 90 +- .../GeneratedProductAlgebraLaws.scala | 117 +- .../twitter/algebird/HyperLogLogTest.scala | 19 +- .../algebird/MinMaxAggregatorSpec.scala | 20 +- .../algebird/NumericSpecification.scala | 9 +- .../com/twitter/algebird/PreparerLaws.scala | 38 +- .../com/twitter/algebird/QTreeTest.scala | 2 +- .../twitter/algebird/RightFolded2Test.scala | 20 +- .../com/twitter/algebird/SketchMapTest.scala | 2 +- .../com/twitter/algebird/SpaceSaverTest.scala | 3 +- .../com/twitter/algebird/TopKTests.scala | 3 +- .../algebird/TupleAggregatorsTest.scala | 2285 +++++++----- .../algebird/VectorSpaceProperties.scala | 2 +- .../algebird/statistics/StatisticsTests.scala | 6 +- .../twitter/algebird/util/TunnelMonoid.scala | 3 +- .../util/summer/AsyncListMMapSum.scala | 20 +- .../algebird/util/summer/AsyncListSum.scala | 28 +- .../algebird/util/summer/AsyncMapSum.scala | 20 +- .../summer/HeavyHittersCachingSummer.scala | 77 +- .../algebird/util/summer/NullSummer.scala | 4 +- .../util/summer/SyncSummingQueue.scala | 28 +- .../util/TunnelMonoidProperties.scala | 11 +- .../summer/AsyncListMMapSumProperties.scala | 13 +- .../util/summer/AsyncListSumProperties.scala | 22 +- .../util/summer/AsyncMapSumProperties.scala | 13 +- .../util/summer/AsyncSummerLaws.scala | 3 +- .../HeavyHittersCachingSummerProperties.scala | 13 +- .../summer/SyncSummingQueueProperties.scala | 13 +- build.sbt | 220 +- project/GenTupleAggregators.scala | 88 +- project/plugins.sbt | 29 +- 85 files changed, 6007 insertions(+), 4281 deletions(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index c49bcb92b..d607b28db 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,3 +1,4 @@ +version=2.0.1 maxColumn = 110 docstrings = JavaDoc newlines.penalizeSingleSelectMultiArgList = false diff --git a/.travis.yml b/.travis.yml index f1d0419b2..1c682e1a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ matrix: - scala: 2.12.10 jdk: openjdk8 - script: sbt "++$TRAVIS_SCALA_VERSION clean" "++$TRAVIS_SCALA_VERSION test" "scalafmt::test" "test:scalafmt::test" "++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues" "++$TRAVIS_SCALA_VERSION docs/makeMicrosite" + script: sbt "++$TRAVIS_SCALA_VERSION clean" "++$TRAVIS_SCALA_VERSION test" "scalafmtCheckAll" "scalafmtSbtCheck" "++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues" "++$TRAVIS_SCALA_VERSION docs/makeMicrosite" #script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test" "++$TRAVIS_SCALA_VERSION docs/makeMicrosite" before_install: diff --git a/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/AsyncSummerBenchmark.scala b/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/AsyncSummerBenchmark.scala index e369c4ac5..61c328e22 100644 --- a/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/AsyncSummerBenchmark.scala +++ b/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/AsyncSummerBenchmark.scala @@ -100,7 +100,8 @@ object AsyncSummerBenchmark { Counter("insertOp"), Counter("tuplesOut"), Counter("size"), - workPool) + workPool + ) syncSummingQueue = new SyncSummingQueue[Long, HLL]( bufferSize, flushFrequency, diff --git a/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/BloomFilterDistanceBenchmark.scala b/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/BloomFilterDistanceBenchmark.scala index f7ef90236..d46f13d58 100644 --- a/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/BloomFilterDistanceBenchmark.scala +++ b/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/BloomFilterDistanceBenchmark.scala @@ -41,18 +41,22 @@ object BloomFilterDistanceBenchmark { val sparseBF1: BF[String] = toSparse( BloomFilter[String](nbrOfElements, falsePositiveRate) - .create(randomElements: _*)) + .create(randomElements: _*) + ) val sparesBF2: BF[String] = toSparse( BloomFilter[String](nbrOfElements, falsePositiveRate) - .create(randomElements: _*)) + .create(randomElements: _*) + ) val denseBF1: BF[String] = toDense( BloomFilter[String](nbrOfElements, falsePositiveRate) - .create(randomElements: _*)) + .create(randomElements: _*) + ) val denseBF2: BF[String] = toDense( BloomFilter[String](nbrOfElements, falsePositiveRate) - .create(randomElements: _*)) + .create(randomElements: _*) + ) } } diff --git a/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/CMSHashingBenchmark.scala b/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/CMSHashingBenchmark.scala index 3b9b4f962..01d73b9b3 100644 --- a/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/CMSHashingBenchmark.scala +++ b/algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/CMSHashingBenchmark.scala @@ -41,7 +41,9 @@ object CMSHashingBenchmark { "11" /* eps = 0.271 */, "544" /* eps = 0.005 */, "2719" /* eps = 1E-3 */, - "271829" /* eps = 1E-5 */ )) + "271829" /* eps = 1E-5 */ + ) + ) var width: Int = 0 /** diff --git a/algebird-bijection/src/main/scala/com/twitter/algebird/bijection/AlgebirdBijections.scala b/algebird-bijection/src/main/scala/com/twitter/algebird/bijection/AlgebirdBijections.scala index b6d9fcb77..c5a8784c0 100644 --- a/algebird-bijection/src/main/scala/com/twitter/algebird/bijection/AlgebirdBijections.scala +++ b/algebird-bijection/src/main/scala/com/twitter/algebird/bijection/AlgebirdBijections.scala @@ -56,7 +56,8 @@ class BijectedRing[T, U](implicit val ring: Ring[T], bij: ImplicitBijection[T, U trait AlgebirdBijections { implicit def semigroupBijection[T, U]( - implicit bij: ImplicitBijection[T, U]): Bijection[Semigroup[T], Semigroup[U]] = + implicit bij: ImplicitBijection[T, U] + ): Bijection[Semigroup[T], Semigroup[U]] = new AbstractBijection[Semigroup[T], Semigroup[U]] { override def apply(sg: Semigroup[T]) = new BijectedSemigroup[T, U]()(sg, bij) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/AdaptiveVector.scala b/algebird-core/src/main/scala/com/twitter/algebird/AdaptiveVector.scala index d28268009..d6a4d2b63 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/AdaptiveVector.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/AdaptiveVector.scala @@ -106,7 +106,8 @@ object AdaptiveVector { case _ if valueIsNonZero(left.sparseValue) => fromVector( Vector(Semigroup.plus(toVector(left): IndexedSeq[V], toVector(right): IndexedSeq[V]): _*), - left.sparseValue) + left.sparseValue + ) case _ => // sparse is zero: fromMap(Semigroup.plus(toMap(left), toMap(right)), left.sparseValue, maxSize) } diff --git a/algebird-core/src/main/scala/com/twitter/algebird/Aggregator.scala b/algebird-core/src/main/scala/com/twitter/algebird/Aggregator.scala index 956638d6b..1233fb6e2 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/Aggregator.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/Aggregator.scala @@ -69,7 +69,8 @@ object Aggregator extends java.io.Serializable { * Equivalent to {{{ appendSemigroup(prep, appnd, identity[T]_)(sg) }}} */ def appendSemigroup[F, T](prep: F => T, appnd: (T, F) => T)( - implicit sg: Semigroup[T]): Aggregator[F, T, T] = + implicit sg: Semigroup[T] + ): Aggregator[F, T, T] = appendSemigroup(prep, appnd, identity[T] _)(sg) /** @@ -85,7 +86,8 @@ object Aggregator extends java.io.Serializable { * @note The functions 'appnd' and 'prep' are expected to obey the law: {{{ appnd(t, f) == sg.plus(t, prep(f)) }}} */ def appendSemigroup[F, T, P](prep: F => T, appnd: (T, F) => T, pres: T => P)( - implicit sg: Semigroup[T]): Aggregator[F, T, P] = + implicit sg: Semigroup[T] + ): Aggregator[F, T, P] = new Aggregator[F, T, P] { def semigroup: Semigroup[T] = sg def prepare(input: F): T = prep(input) @@ -130,7 +132,8 @@ object Aggregator extends java.io.Serializable { * @note The function 'appnd' is expected to obey the law: {{{ appnd(t, f) == m.plus(t, appnd(m.zero, f)) }}} */ def appendMonoid[F, T, P](appnd: (T, F) => T, pres: T => P)( - implicit m: Monoid[T]): MonoidAggregator[F, T, P] = + implicit m: Monoid[T] + ): MonoidAggregator[F, T, P] = new MonoidAggregator[F, T, P] { def monoid: Monoid[T] = m def prepare(input: F): T = appnd(m.zero, input) @@ -237,8 +240,9 @@ object Aggregator extends java.io.Serializable { * * This function is like writing list.sortBy(fn).reverse.take(count). */ - def sortByReverseTake[T, U: Ordering](count: Int)( - fn: T => U): MonoidAggregator[T, PriorityQueue[T], Seq[T]] = + def sortByReverseTake[T, U: Ordering]( + count: Int + )(fn: T => U): MonoidAggregator[T, PriorityQueue[T], Seq[T]] = Aggregator.sortedReverseTake(count)(Ordering.by(fn)) /** @@ -258,8 +262,10 @@ object Aggregator extends java.io.Serializable { * selected. This assumes that all sampled records can fit in memory, so use this only when the * expected number of sampled values is small. */ - def randomSample[T](prob: Double, - seed: Int = DefaultSeed): MonoidAggregator[T, Option[Batched[T]], List[T]] = { + def randomSample[T]( + prob: Double, + seed: Int = DefaultSeed + ): MonoidAggregator[T, Option[Batched[T]], List[T]] = { assert(prob >= 0 && prob <= 1, "randomSample.prob must lie in [0, 1]") val rng = new java.util.Random(seed) Preparer[T] @@ -272,8 +278,10 @@ object Aggregator extends java.io.Serializable { * then 'count' total records). This assumes that all 'count' of the records can fit in memory, * so use this only for small values of 'count'. */ - def reservoirSample[T](count: Int, - seed: Int = DefaultSeed): MonoidAggregator[T, PriorityQueue[(Double, T)], Seq[T]] = { + def reservoirSample[T]( + count: Int, + seed: Int = DefaultSeed + ): MonoidAggregator[T, PriorityQueue[(Double, T)], Seq[T]] = { val rng = new java.util.Random(seed) Preparer[T] .map(rng.nextDouble() -> _) @@ -324,7 +332,8 @@ object Aggregator extends java.io.Serializable { * The items that are iterated over cannot be negative. */ def approximatePercentile[T](percentile: Double, k: Int = QTreeAggregator.DefaultK)( - implicit num: Numeric[T]): QTreeAggregatorLowerBound[T] = + implicit num: Numeric[T] + ): QTreeAggregatorLowerBound[T] = QTreeAggregatorLowerBound[T](percentile, k) /** @@ -332,7 +341,8 @@ object Aggregator extends java.io.Serializable { * The items that are iterated over cannot be negative. */ def approximatePercentileBounds[T](percentile: Double, k: Int = QTreeAggregator.DefaultK)( - implicit num: Numeric[T]): QTreeAggregator[T] = + implicit num: Numeric[T] + ): QTreeAggregator[T] = QTreeAggregator[T](percentile, k) /** @@ -429,8 +439,9 @@ trait Aggregator[-A, B, +C] extends java.io.Serializable { self => * This returns the cumulative sum of its inputs, in the same order. * If the inputs are empty, the result will be empty too. */ - def applyCumulatively[In <: TraversableOnce[A], Out](inputs: In)( - implicit bf: CanBuildFrom[In, C, Out]): Out = { + def applyCumulatively[In <: TraversableOnce[A], Out]( + inputs: In + )(implicit bf: CanBuildFrom[In, C, Out]): Out = { val builder = bf() builder ++= cumulativeIterator(inputs.toIterator) builder.result @@ -509,22 +520,28 @@ class AggregatorApplicative[I] extends Applicative[({ type L[O] = Aggregator[I, Aggregator.const(v) override def join[T, U](mt: Aggregator[I, _, T], mu: Aggregator[I, _, U]): Aggregator[I, _, (T, U)] = mt.join(mu) - override def join[T1, T2, T3](m1: Aggregator[I, _, T1], - m2: Aggregator[I, _, T2], - m3: Aggregator[I, _, T3]): Aggregator[I, _, (T1, T2, T3)] = + override def join[T1, T2, T3]( + m1: Aggregator[I, _, T1], + m2: Aggregator[I, _, T2], + m3: Aggregator[I, _, T3] + ): Aggregator[I, _, (T1, T2, T3)] = GeneratedTupleAggregator.from3((m1, m2, m3)) - override def join[T1, T2, T3, T4](m1: Aggregator[I, _, T1], - m2: Aggregator[I, _, T2], - m3: Aggregator[I, _, T3], - m4: Aggregator[I, _, T4]): Aggregator[I, _, (T1, T2, T3, T4)] = + override def join[T1, T2, T3, T4]( + m1: Aggregator[I, _, T1], + m2: Aggregator[I, _, T2], + m3: Aggregator[I, _, T3], + m4: Aggregator[I, _, T4] + ): Aggregator[I, _, (T1, T2, T3, T4)] = GeneratedTupleAggregator.from4((m1, m2, m3, m4)) - override def join[T1, T2, T3, T4, T5](m1: Aggregator[I, _, T1], - m2: Aggregator[I, _, T2], - m3: Aggregator[I, _, T3], - m4: Aggregator[I, _, T4], - m5: Aggregator[I, _, T5]): Aggregator[I, _, (T1, T2, T3, T4, T5)] = + override def join[T1, T2, T3, T4, T5]( + m1: Aggregator[I, _, T1], + m2: Aggregator[I, _, T2], + m3: Aggregator[I, _, T3], + m4: Aggregator[I, _, T4], + m5: Aggregator[I, _, T5] + ): Aggregator[I, _, (T1, T2, T3, T4, T5)] = GeneratedTupleAggregator.from5((m1, m2, m3, m4, m5)) } @@ -558,7 +575,8 @@ trait MonoidAggregator[-A, B, +C] extends Aggregator[A, B, C] { self => * and outputs the pair from both */ def either[A2, B2, C2]( - that: MonoidAggregator[A2, B2, C2]): MonoidAggregator[Either[A, A2], (B, B2), (C, C2)] = + that: MonoidAggregator[A2, B2, C2] + ): MonoidAggregator[Either[A, A2], (B, B2), (C, C2)] = new MonoidAggregator[Either[A, A2], (B, B2), (C, C2)] { def prepare(e: Either[A, A2]) = e match { case Left(a) => (self.prepare(a), that.monoid.zero) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/Applicative.scala b/algebird-core/src/main/scala/com/twitter/algebird/Applicative.scala index 76be20908..5e4ab5e95 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/Applicative.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/Applicative.scala @@ -63,11 +63,13 @@ trait Applicative[M[_]] extends Functor[M] { case (((t1, t2), t3), t4) => (t1, t2, t3, t4) } - def join[T1, T2, T3, T4, T5](m1: M[T1], - m2: M[T2], - m3: M[T3], - m4: M[T4], - m5: M[T5]): M[(T1, T2, T3, T4, T5)] = + def join[T1, T2, T3, T4, T5]( + m1: M[T1], + m2: M[T2], + m3: M[T3], + m4: M[T4], + m5: M[T5] + ): M[(T1, T2, T3, T4, T5)] = joinWith(join(join(join(m1, m2), m3), m4), m5) { case ((((t1, t2), t3), t4), t5) => (t1, t2, t3, t4, t5) } @@ -90,10 +92,12 @@ object Applicative { def join[M[_], T1, T2, T3](m1: M[T1], m2: M[T2], m3: M[T3])(implicit app: Applicative[M]): M[(T1, T2, T3)] = app.join(m1, m2, m3) def join[M[_], T1, T2, T3, T4](m1: M[T1], m2: M[T2], m3: M[T3], m4: M[T4])( - implicit app: Applicative[M]): M[(T1, T2, T3, T4)] = + implicit app: Applicative[M] + ): M[(T1, T2, T3, T4)] = app.join(m1, m2, m3, m4) def join[M[_], T1, T2, T3, T4, T5](m1: M[T1], m2: M[T2], m3: M[T3], m4: M[T4], m5: M[T5])( - implicit app: Applicative[M]): M[(T1, T2, T3, T4, T5)] = + implicit app: Applicative[M] + ): M[(T1, T2, T3, T4, T5)] = app.join(m1, m2, m3, m4, m5) def sequence[M[_], T](ms: Seq[M[T]])(implicit app: Applicative[M]): M[Seq[T]] = app.sequence(ms) @@ -102,7 +106,8 @@ object Applicative { * A Generic sequence that uses CanBuildFrom */ def sequenceGen[M[_], T, S[X] <: TraversableOnce[X], R[_]]( - ms: S[M[T]])(implicit app: Applicative[M], cbf: CanBuildFrom[Nothing, T, R[T]]): M[R[T]] = { + ms: S[M[T]] + )(implicit app: Applicative[M], cbf: CanBuildFrom[Nothing, T, R[T]]): M[R[T]] = { val bldr = cbf() val mbldr = ms.toIterator.foldLeft(app.apply(bldr)) { (mb, mt) => app.joinWith(mb, mt)(_ += _) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/Approximate.scala b/algebird-core/src/main/scala/com/twitter/algebird/Approximate.scala index 8003db5a2..0f59096de 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/Approximate.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/Approximate.scala @@ -72,8 +72,8 @@ object ApproximateBoolean { // Note the probWithinBounds is a LOWER BOUND (at least this probability) case class Approximate[N](min: N, estimate: N, max: N, probWithinBounds: Double)( - implicit val numeric: Numeric[N]) - extends ApproximateSet[N] { + implicit val numeric: Numeric[N] +) extends ApproximateSet[N] { require(numeric.lteq(min, estimate) && numeric.lteq(estimate, max)) /** @@ -101,7 +101,8 @@ case class Approximate[N](min: N, estimate: N, max: N, probWithinBounds: Double) n.plus(min, right.min), n.plus(estimate, right.estimate), n.plus(max, right.max), - probWithinBounds * right.probWithinBounds) + probWithinBounds * right.probWithinBounds + ) } def -(right: Approximate[N]): Approximate[N] = this.+(right.negate) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/Batched.scala b/algebird-core/src/main/scala/com/twitter/algebird/Batched.scala index 92672b2f7..6a05ef5f6 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/Batched.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/Batched.scala @@ -192,8 +192,10 @@ object Batched { * (e.g. when there is temporary mutable state used to make * summation fast). */ - def monoidAggregator[A, B, C](batchSize: Int, - agg: MonoidAggregator[A, B, C]): MonoidAggregator[A, Batched[B], C] = + def monoidAggregator[A, B, C]( + batchSize: Int, + agg: MonoidAggregator[A, B, C] + ): MonoidAggregator[A, Batched[B], C] = new MonoidAggregator[A, Batched[B], C] { def prepare(a: A): Batched[B] = Item(agg.prepare(a)) def monoid: Monoid[Batched[B]] = new BatchedMonoid(batchSize)(agg.monoid) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/BloomFilter.scala b/algebird-core/src/main/scala/com/twitter/algebird/BloomFilter.scala index f02f6c948..a54d9decb 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/BloomFilter.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/BloomFilter.scala @@ -101,7 +101,8 @@ object BloomFilter { BloomFilter.optimalWidth(numEntries, fpProb) match { case None => throw new java.lang.IllegalArgumentException( - s"BloomFilter cannot guarantee the specified false positive probability for the number of entries! (numEntries: $numEntries, fpProb: $fpProb)") + s"BloomFilter cannot guarantee the specified false positive probability for the number of entries! (numEntries: $numEntries, fpProb: $fpProb)" + ) case Some(width) => val numHashes = BloomFilter.optimalNumHashes(numEntries, width) BloomFilterMonoid[A](numHashes, width)(hash) @@ -137,10 +138,12 @@ object BloomFilter { * (min, estimate, max) = * ((1 - approxWidth) * estimate, estimate, (1 + approxWidth) * estimate) */ - def sizeEstimate(numBits: Int, - numHashes: Int, - width: Int, - approximationWidth: Double = 0.05): Approximate[Long] = { + def sizeEstimate( + numBits: Int, + numHashes: Int, + width: Int, + approximationWidth: Double = 0.05 + ): Approximate[Long] = { assert(0 <= approximationWidth && approximationWidth < 1, "approximationWidth must lie in [0, 1)") /** @@ -636,11 +639,13 @@ case class BFHash[A](numHashes: Int, width: Int)(implicit hash: Hash128[A]) { } @annotation.tailrec - private def nextHash(valueToHash: A, - hashIndex: Int, - buffer: Array[Int], - bidx: Int, - target: Array[Int]): Array[Int] = + private def nextHash( + valueToHash: A, + hashIndex: Int, + buffer: Array[Int], + bidx: Int, + target: Array[Int] + ): Array[Int] = if (hashIndex == numHashes) target else { val thisBidx = if (bidx > 3) { diff --git a/algebird-core/src/main/scala/com/twitter/algebird/CountMinSketch.scala b/algebird-core/src/main/scala/com/twitter/algebird/CountMinSketch.scala index 13b617321..175d39978 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/CountMinSketch.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/CountMinSketch.scala @@ -247,16 +247,19 @@ case class CMSAggregator[K](cmsMonoid: CMSMonoid[K]) extends MonoidAggregator[K, * @param maxExactCountOpt An Option parameter about how many exact counts a sparse CMS wants to keep. * @tparam K The type used to identify the elements to be counted. */ -case class CMSParams[K](hashes: Seq[CMSHash[K]], - eps: Double, - delta: Double, - maxExactCountOpt: Option[Int] = None) { +case class CMSParams[K]( + hashes: Seq[CMSHash[K]], + eps: Double, + delta: Double, + maxExactCountOpt: Option[Int] = None +) { require(0 < eps && eps < 1, "eps must lie in (0, 1)") require(0 < delta && delta < 1, "delta must lie in (0, 1)") require( hashes.size >= CMSFunctions.depth(delta), - s"we require at least ${CMSFunctions.depth(delta)} hash functions") + s"we require at least ${CMSFunctions.depth(delta)} hash functions" + ) } @@ -278,7 +281,8 @@ object CMSFunctions { val i = scala.math.exp(-depth) require( i > 0.0, - s"depth must be smaller as it causes precision errors when computing delta ($depth led to an invalid delta of $i)") + s"depth must be smaller as it causes precision errors when computing delta ($depth led to an invalid delta of $i)" + ) i } @@ -476,10 +480,12 @@ object CMS { def monoid[K: CMSHasher](eps: Double, delta: Double, seed: Int): CMSMonoid[K] = monoid(eps, delta, seed, None) - def monoid[K: CMSHasher](eps: Double, - delta: Double, - seed: Int, - maxExactCountOpt: Option[Int]): CMSMonoid[K] = + def monoid[K: CMSHasher]( + eps: Double, + delta: Double, + seed: Int, + maxExactCountOpt: Option[Int] + ): CMSMonoid[K] = new CMSMonoid[K](eps, delta, seed, maxExactCountOpt) def monoid[K: CMSHasher](depth: Int, width: Int, seed: Int): CMSMonoid[K] = @@ -489,27 +495,33 @@ object CMS { def aggregator[K: CMSHasher](eps: Double, delta: Double, seed: Int): CMSAggregator[K] = aggregator(eps, delta, seed, None) - def aggregator[K: CMSHasher](eps: Double, - delta: Double, - seed: Int, - maxExactCountOpt: Option[Int]): CMSAggregator[K] = + def aggregator[K: CMSHasher]( + eps: Double, + delta: Double, + seed: Int, + maxExactCountOpt: Option[Int] + ): CMSAggregator[K] = new CMSAggregator[K](monoid(eps, delta, seed, maxExactCountOpt)) def aggregator[K: CMSHasher](depth: Int, width: Int, seed: Int): CMSAggregator[K] = aggregator(depth, width, seed, None) - def aggregator[K: CMSHasher](depth: Int, - width: Int, - seed: Int, - maxExactCountOpt: Option[Int]): CMSAggregator[K] = + def aggregator[K: CMSHasher]( + depth: Int, + width: Int, + seed: Int, + maxExactCountOpt: Option[Int] + ): CMSAggregator[K] = aggregator(CMSFunctions.eps(width), CMSFunctions.delta(depth), seed, maxExactCountOpt) /** * Returns a fresh, zeroed CMS instance. */ - def apply[K: CMSHasher](eps: Double, - delta: Double, - seed: Int, - maxExactCountOpt: Option[Int] = None): CMS[K] = { + def apply[K: CMSHasher]( + eps: Double, + delta: Double, + seed: Int, + maxExactCountOpt: Option[Int] = None + ): CMS[K] = { val params = { val hashes: Seq[CMSHash[K]] = CMSFunctions.generateHashes(eps, delta, seed) @@ -610,10 +622,11 @@ case class CMSItem[K](item: K, override val totalCount: Long, override val param /** * A sparse Count-Min sketch structure, used for situations where the key is highly skewed. */ -case class SparseCMS[K](exactCountTable: Map[K, Long], - override val totalCount: Long, - override val params: CMSParams[K]) - extends CMS[K](params) { +case class SparseCMS[K]( + exactCountTable: Map[K, Long], + override val totalCount: Long, + override val params: CMSParams[K] +) extends CMS[K](params) { import SparseCMS._ override def +(x: K, count: Long): CMS[K] = { @@ -678,10 +691,11 @@ object SparseCMS { /** * The general Count-Min sketch structure, used for holding any number of elements. */ -case class CMSInstance[K](countsTable: CMSInstance.CountsTable[K], - override val totalCount: Long, - override val params: CMSParams[K]) - extends CMS[K](params) { +case class CMSInstance[K]( + countsTable: CMSInstance.CountsTable[K], + override val totalCount: Long, + override val params: CMSParams[K] +) extends CMS[K](params) { def ++(other: CMS[K]): CMS[K] = other match { @@ -979,7 +993,8 @@ class TopCMSMonoid[K](emptyCms: CMS[K], logic: HeavyHittersLogic[K]) extends Mon def plus(left: TopCMS[K], right: TopCMS[K]): TopCMS[K] = { require( left.cms.params.hashes == right.cms.params.hashes, - "The sketches must use the same hash functions.") + "The sketches must use the same hash functions." + ) left ++ right } @@ -1028,8 +1043,10 @@ class TopCMSAggregator[K](cmsMonoid: TopCMSMonoid[K]) extends MonoidAggregator[K */ abstract class HeavyHittersLogic[K] extends java.io.Serializable { - def updateHeavyHitters(oldCms: CMS[K], - newCms: CMS[K])(hhs: HeavyHitters[K], item: K, count: Long): HeavyHitters[K] = { + def updateHeavyHitters( + oldCms: CMS[K], + newCms: CMS[K] + )(hhs: HeavyHitters[K], item: K, count: Long): HeavyHitters[K] = { val oldItemCount = oldCms.frequency(item).estimate val oldHh = HeavyHitter[K](item, oldItemCount) val newItemCount = oldItemCount + count @@ -1161,25 +1178,31 @@ class TopPctCMSMonoid[K](cms: CMS[K], heavyHittersPct: Double = 0.01) object TopPctCMS { - def monoid[K: CMSHasher](eps: Double, - delta: Double, - seed: Int, - heavyHittersPct: Double): TopPctCMSMonoid[K] = + def monoid[K: CMSHasher]( + eps: Double, + delta: Double, + seed: Int, + heavyHittersPct: Double + ): TopPctCMSMonoid[K] = new TopPctCMSMonoid[K](CMS(eps, delta, seed), heavyHittersPct) def monoid[K: CMSHasher](depth: Int, width: Int, seed: Int, heavyHittersPct: Double): TopPctCMSMonoid[K] = monoid(CMSFunctions.eps(width), CMSFunctions.delta(depth), seed, heavyHittersPct) - def aggregator[K: CMSHasher](eps: Double, - delta: Double, - seed: Int, - heavyHittersPct: Double): TopPctCMSAggregator[K] = + def aggregator[K: CMSHasher]( + eps: Double, + delta: Double, + seed: Int, + heavyHittersPct: Double + ): TopPctCMSAggregator[K] = new TopPctCMSAggregator[K](monoid(eps, delta, seed, heavyHittersPct)) - def aggregator[K: CMSHasher](depth: Int, - width: Int, - seed: Int, - heavyHittersPct: Double): TopPctCMSAggregator[K] = + def aggregator[K: CMSHasher]( + depth: Int, + width: Int, + seed: Int, + heavyHittersPct: Double + ): TopPctCMSAggregator[K] = aggregator(CMSFunctions.eps(width), CMSFunctions.delta(depth), seed, heavyHittersPct) } @@ -1253,10 +1276,12 @@ object TopNCMS { def monoid[K: CMSHasher](depth: Int, width: Int, seed: Int, heavyHittersN: Int): TopNCMSMonoid[K] = monoid(CMSFunctions.eps(width), CMSFunctions.delta(depth), seed, heavyHittersN) - def aggregator[K: CMSHasher](eps: Double, - delta: Double, - seed: Int, - heavyHittersN: Int): TopNCMSAggregator[K] = + def aggregator[K: CMSHasher]( + eps: Double, + delta: Double, + seed: Int, + heavyHittersN: Int + ): TopNCMSAggregator[K] = new TopNCMSAggregator[K](monoid(eps, delta, seed, heavyHittersN)) def aggregator[K: CMSHasher](depth: Int, width: Int, seed: Int, heavyHittersN: Int): TopNCMSAggregator[K] = @@ -1277,8 +1302,9 @@ case class ScopedTopNLogic[K1, K2](heavyHittersN: Int) extends HeavyHittersLogic require(heavyHittersN > 0, "heavyHittersN must be > 0") - override def purgeHeavyHitters(cms: CMS[(K1, K2)])( - hitters: HeavyHitters[(K1, K2)]): HeavyHitters[(K1, K2)] = { + override def purgeHeavyHitters( + cms: CMS[(K1, K2)] + )(hitters: HeavyHitters[(K1, K2)]): HeavyHitters[(K1, K2)] = { val grouped = hitters.hhs.groupBy { hh => hh.item._1 } @@ -1333,28 +1359,36 @@ object ScopedTopNCMS { } } - def monoid[K1: CMSHasher, K2: CMSHasher](eps: Double, - delta: Double, - seed: Int, - heavyHittersN: Int): ScopedTopNCMSMonoid[K1, K2] = + def monoid[K1: CMSHasher, K2: CMSHasher]( + eps: Double, + delta: Double, + seed: Int, + heavyHittersN: Int + ): ScopedTopNCMSMonoid[K1, K2] = new ScopedTopNCMSMonoid[K1, K2](CMS(eps, delta, seed)(scopedHasher[K1, K2]), heavyHittersN) - def monoid[K1: CMSHasher, K2: CMSHasher](depth: Int, - width: Int, - seed: Int, - heavyHittersN: Int): ScopedTopNCMSMonoid[K1, K2] = + def monoid[K1: CMSHasher, K2: CMSHasher]( + depth: Int, + width: Int, + seed: Int, + heavyHittersN: Int + ): ScopedTopNCMSMonoid[K1, K2] = monoid(CMSFunctions.eps(width), CMSFunctions.delta(depth), seed, heavyHittersN) - def aggregator[K1: CMSHasher, K2: CMSHasher](eps: Double, - delta: Double, - seed: Int, - heavyHittersN: Int): TopCMSAggregator[(K1, K2)] = + def aggregator[K1: CMSHasher, K2: CMSHasher]( + eps: Double, + delta: Double, + seed: Int, + heavyHittersN: Int + ): TopCMSAggregator[(K1, K2)] = new TopCMSAggregator(monoid(eps, delta, seed, heavyHittersN)) - def aggregator[K1: CMSHasher, K2: CMSHasher](depth: Int, - width: Int, - seed: Int, - heavyHittersN: Int): TopCMSAggregator[(K1, K2)] = + def aggregator[K1: CMSHasher, K2: CMSHasher]( + depth: Int, + width: Int, + seed: Int, + heavyHittersN: Int + ): TopCMSAggregator[(K1, K2)] = aggregator(CMSFunctions.eps(width), CMSFunctions.delta(depth), seed, heavyHittersN) } diff --git a/algebird-core/src/main/scala/com/twitter/algebird/DecayedVector.scala b/algebird-core/src/main/scala/com/twitter/algebird/DecayedVector.scala index 116554458..1af3f3bc1 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/DecayedVector.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/DecayedVector.scala @@ -41,21 +41,25 @@ object DecayedVector { def forMapWithHalflife[K](m: Map[K, Double], time: Double, halfLife: Double) = forMap(m, time * scala.math.log(2.0) / halfLife) - def mapMonoidWithEpsilon[K](eps: Double)(implicit vs: VectorSpace[Double, ({ type x[a] = Map[K, a] })#x], - metric: Metric[Map[K, Double]]) = + def mapMonoidWithEpsilon[K]( + eps: Double + )(implicit vs: VectorSpace[Double, ({ type x[a] = Map[K, a] })#x], metric: Metric[Map[K, Double]]) = monoidWithEpsilon[({ type x[a] = Map[K, a] })#x](eps) // This is the default monoid that never thresholds. // If you want to set a specific accuracy you need to implicitly override this implicit def monoid[F, C[_]](implicit vs: VectorSpace[F, C], metric: Metric[C[F]], ord: Ordering[F]) = monoidWithEpsilon(-1.0) - implicit def mapMonoid[K](implicit vs: VectorSpace[Double, ({ type x[a] = Map[K, a] })#x], - metric: Metric[Map[K, Double]]) = + implicit def mapMonoid[K]( + implicit vs: VectorSpace[Double, ({ type x[a] = Map[K, a] })#x], + metric: Metric[Map[K, Double]] + ) = mapMonoidWithEpsilon(-1.0) def scaledPlus[C[_]](newVal: DecayedVector[C], oldVal: DecayedVector[C], eps: Double)( implicit vs: VectorSpace[Double, C], - metric: Metric[C[Double]]): DecayedVector[C] = { + metric: Metric[C[Double]] + ): DecayedVector[C] = { implicit val mon: Monoid[C[Double]] = vs.group val expFactor = scala.math.exp(oldVal.scaledTime - newVal.scaledTime) val newVector = diff --git a/algebird-core/src/main/scala/com/twitter/algebird/Eventually.scala b/algebird-core/src/main/scala/com/twitter/algebird/Eventually.scala index 1902e8f80..b30716152 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/Eventually.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/Eventually.scala @@ -37,8 +37,8 @@ package com.twitter.algebird */ class EventuallySemigroup[E, O](convert: O => E)(mustConvert: O => Boolean)( implicit eventualSemigroup: Semigroup[E], - originalSemigroup: Semigroup[O]) - extends Semigroup[Either[E, O]] { + originalSemigroup: Semigroup[O] +) extends Semigroup[Either[E, O]] { import scala.collection.mutable.Buffer @@ -124,9 +124,10 @@ class EventuallySemigroup[E, O](convert: O => E)(mustConvert: O => Boolean)( /** * @see EventuallySemigroup */ -class EventuallyMonoid[E, O](convert: O => E)(mustConvert: O => Boolean)(implicit lSemigroup: Semigroup[E], - rMonoid: Monoid[O]) - extends EventuallySemigroup[E, O](convert)(mustConvert) +class EventuallyMonoid[E, O](convert: O => E)(mustConvert: O => Boolean)( + implicit lSemigroup: Semigroup[E], + rMonoid: Monoid[O] +) extends EventuallySemigroup[E, O](convert)(mustConvert) with Monoid[Either[E, O]] { override def zero = Right(Monoid.zero[O]) @@ -136,9 +137,10 @@ class EventuallyMonoid[E, O](convert: O => E)(mustConvert: O => Boolean)(implici /** * @see EventuallySemigroup */ -class EventuallyGroup[E, O](convert: O => E)(mustConvert: O => Boolean)(implicit lGroup: Group[E], - rGroup: Group[O]) - extends EventuallyMonoid[E, O](convert)(mustConvert) +class EventuallyGroup[E, O](convert: O => E)(mustConvert: O => Boolean)( + implicit lGroup: Group[E], + rGroup: Group[O] +) extends EventuallyMonoid[E, O](convert)(mustConvert) with Group[Either[E, O]] { override def negate(x: Either[E, O]) = @@ -154,9 +156,10 @@ class EventuallyGroup[E, O](convert: O => E)(mustConvert: O => Boolean)(implicit /** * @see EventuallySemigroup */ -class EventuallyRing[E, O](convert: O => E)(mustConvert: O => Boolean)(implicit lRing: Ring[E], - rRing: Ring[O]) - extends EventuallyGroup[E, O](convert)(mustConvert) +class EventuallyRing[E, O](convert: O => E)(mustConvert: O => Boolean)( + implicit lRing: Ring[E], + rRing: Ring[O] +) extends EventuallyGroup[E, O](convert)(mustConvert) with Ring[Either[E, O]] { override def one = Right(Ring.one[O]) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/ExpHist.scala b/algebird-core/src/main/scala/com/twitter/algebird/ExpHist.scala index fe0c9e591..2a25abbbe 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/ExpHist.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/ExpHist.scala @@ -38,10 +38,12 @@ import scala.collection.mutable.Builder * @param total total ticks tracked. `total == buckets.map(_.size).sum` * @param time current timestamp of this instance. */ -case class ExpHist(conf: ExpHist.Config, - buckets: Vector[ExpHist.Bucket], - total: Long, - time: ExpHist.Timestamp) { +case class ExpHist( + conf: ExpHist.Config, + buckets: Vector[ExpHist.Bucket], + total: Long, + time: ExpHist.Timestamp +) { import ExpHist.{Bucket, Canonical, Timestamp} /** @@ -415,7 +417,8 @@ object ExpHist { def toLong: Long = Monoid.sum( rep.iterator.zipWithIndex - .map { case (i, exp) => i.toLong << exp }) + .map { case (i, exp) => i.toLong << exp } + ) /** * Expands out the l-canonical representation of some number s into diff --git a/algebird-core/src/main/scala/com/twitter/algebird/GeneratedAbstractAlgebra.scala b/algebird-core/src/main/scala/com/twitter/algebird/GeneratedAbstractAlgebra.scala index e2969da0b..72e92ef10 100755 --- a/algebird-core/src/main/scala/com/twitter/algebird/GeneratedAbstractAlgebra.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/GeneratedAbstractAlgebra.scala @@ -54,10 +54,11 @@ class Tuple2Ring[A, B](implicit aring: Ring[A], bring: Ring[B]) extends Tuple2Gr /** * Combine 3 semigroups into a product semigroup */ -class Tuple3Semigroup[A, B, C](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C]) - extends Semigroup[(A, B, C)] { +class Tuple3Semigroup[A, B, C]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C] +) extends Semigroup[(A, B, C)] { override def plus(l: (A, B, C), r: (A, B, C)) = (asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), csemigroup.plus(l._3, r._3)) override def sumOption(to: TraversableOnce[(A, B, C)]) = @@ -108,17 +109,19 @@ class Tuple3Ring[A, B, C](implicit aring: Ring[A], bring: Ring[B], cring: Ring[C /** * Combine 4 semigroups into a product semigroup */ -class Tuple4Semigroup[A, B, C, D](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D]) - extends Semigroup[(A, B, C, D)] { +class Tuple4Semigroup[A, B, C, D]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D] +) extends Semigroup[(A, B, C, D)] { override def plus(l: (A, B, C, D), r: (A, B, C, D)) = ( asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), csemigroup.plus(l._3, r._3), - dsemigroup.plus(l._4, r._4)) + dsemigroup.plus(l._4, r._4) + ) override def sumOption(to: TraversableOnce[(A, B, C, D)]) = if (to.isEmpty) None else { @@ -137,11 +140,12 @@ class Tuple4Semigroup[A, B, C, D](implicit asemigroup: Semigroup[A], /** * Combine 4 monoids into a product monoid */ -class Tuple4Monoid[A, B, C, D](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D]) - extends Tuple4Semigroup[A, B, C, D] +class Tuple4Monoid[A, B, C, D]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D] +) extends Tuple4Semigroup[A, B, C, D] with Monoid[(A, B, C, D)] { override def zero = (amonoid.zero, bmonoid.zero, cmonoid.zero, dmonoid.zero) } @@ -172,19 +176,21 @@ class Tuple4Ring[A, B, C, D](implicit aring: Ring[A], bring: Ring[B], cring: Rin /** * Combine 5 semigroups into a product semigroup */ -class Tuple5Semigroup[A, B, C, D, E](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E]) - extends Semigroup[(A, B, C, D, E)] { +class Tuple5Semigroup[A, B, C, D, E]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E] +) extends Semigroup[(A, B, C, D, E)] { override def plus(l: (A, B, C, D, E), r: (A, B, C, D, E)) = ( asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), csemigroup.plus(l._3, r._3), dsemigroup.plus(l._4, r._4), - esemigroup.plus(l._5, r._5)) + esemigroup.plus(l._5, r._5) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E)]) = if (to.isEmpty) None else { @@ -204,12 +210,13 @@ class Tuple5Semigroup[A, B, C, D, E](implicit asemigroup: Semigroup[A], /** * Combine 5 monoids into a product monoid */ -class Tuple5Monoid[A, B, C, D, E](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E]) - extends Tuple5Semigroup[A, B, C, D, E] +class Tuple5Monoid[A, B, C, D, E]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E] +) extends Tuple5Semigroup[A, B, C, D, E] with Monoid[(A, B, C, D, E)] { override def zero = (amonoid.zero, bmonoid.zero, cmonoid.zero, dmonoid.zero, emonoid.zero) @@ -218,12 +225,13 @@ class Tuple5Monoid[A, B, C, D, E](implicit amonoid: Monoid[A], /** * Combine 5 groups into a product group */ -class Tuple5Group[A, B, C, D, E](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E]) - extends Tuple5Monoid[A, B, C, D, E] +class Tuple5Group[A, B, C, D, E]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E] +) extends Tuple5Monoid[A, B, C, D, E] with Group[(A, B, C, D, E)] { override def negate(v: (A, B, C, D, E)) = (agroup.negate(v._1), bgroup.negate(v._2), cgroup.negate(v._3), dgroup.negate(v._4), egroup.negate(v._5)) @@ -233,18 +241,20 @@ class Tuple5Group[A, B, C, D, E](implicit agroup: Group[A], bgroup.minus(l._2, r._2), cgroup.minus(l._3, r._3), dgroup.minus(l._4, r._4), - egroup.minus(l._5, r._5)) + egroup.minus(l._5, r._5) + ) } /** * Combine 5 rings into a product ring */ -class Tuple5Ring[A, B, C, D, E](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E]) - extends Tuple5Group[A, B, C, D, E] +class Tuple5Ring[A, B, C, D, E]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E] +) extends Tuple5Group[A, B, C, D, E] with Ring[(A, B, C, D, E)] { override def one = (aring.one, bring.one, cring.one, dring.one, ering.one) override def times(l: (A, B, C, D, E), r: (A, B, C, D, E)) = @@ -253,19 +263,21 @@ class Tuple5Ring[A, B, C, D, E](implicit aring: Ring[A], bring.times(l._2, r._2), cring.times(l._3, r._3), dring.times(l._4, r._4), - ering.times(l._5, r._5)) + ering.times(l._5, r._5) + ) } /** * Combine 6 semigroups into a product semigroup */ -class Tuple6Semigroup[A, B, C, D, E, F](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F]) - extends Semigroup[(A, B, C, D, E, F)] { +class Tuple6Semigroup[A, B, C, D, E, F]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F] +) extends Semigroup[(A, B, C, D, E, F)] { override def plus(l: (A, B, C, D, E, F), r: (A, B, C, D, E, F)) = ( asemigroup.plus(l._1, r._1), @@ -273,7 +285,8 @@ class Tuple6Semigroup[A, B, C, D, E, F](implicit asemigroup: Semigroup[A], csemigroup.plus(l._3, r._3), dsemigroup.plus(l._4, r._4), esemigroup.plus(l._5, r._5), - fsemigroup.plus(l._6, r._6)) + fsemigroup.plus(l._6, r._6) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F)]) = if (to.isEmpty) None else { @@ -294,13 +307,14 @@ class Tuple6Semigroup[A, B, C, D, E, F](implicit asemigroup: Semigroup[A], /** * Combine 6 monoids into a product monoid */ -class Tuple6Monoid[A, B, C, D, E, F](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F]) - extends Tuple6Semigroup[A, B, C, D, E, F] +class Tuple6Monoid[A, B, C, D, E, F]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F] +) extends Tuple6Semigroup[A, B, C, D, E, F] with Monoid[(A, B, C, D, E, F)] { override def zero = (amonoid.zero, bmonoid.zero, cmonoid.zero, dmonoid.zero, emonoid.zero, fmonoid.zero) @@ -309,13 +323,14 @@ class Tuple6Monoid[A, B, C, D, E, F](implicit amonoid: Monoid[A], /** * Combine 6 groups into a product group */ -class Tuple6Group[A, B, C, D, E, F](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F]) - extends Tuple6Monoid[A, B, C, D, E, F] +class Tuple6Group[A, B, C, D, E, F]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F] +) extends Tuple6Monoid[A, B, C, D, E, F] with Group[(A, B, C, D, E, F)] { override def negate(v: (A, B, C, D, E, F)) = ( @@ -324,7 +339,8 @@ class Tuple6Group[A, B, C, D, E, F](implicit agroup: Group[A], cgroup.negate(v._3), dgroup.negate(v._4), egroup.negate(v._5), - fgroup.negate(v._6)) + fgroup.negate(v._6) + ) override def minus(l: (A, B, C, D, E, F), r: (A, B, C, D, E, F)) = ( agroup.minus(l._1, r._1), @@ -332,19 +348,21 @@ class Tuple6Group[A, B, C, D, E, F](implicit agroup: Group[A], cgroup.minus(l._3, r._3), dgroup.minus(l._4, r._4), egroup.minus(l._5, r._5), - fgroup.minus(l._6, r._6)) + fgroup.minus(l._6, r._6) + ) } /** * Combine 6 rings into a product ring */ -class Tuple6Ring[A, B, C, D, E, F](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F]) - extends Tuple6Group[A, B, C, D, E, F] +class Tuple6Ring[A, B, C, D, E, F]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F] +) extends Tuple6Group[A, B, C, D, E, F] with Ring[(A, B, C, D, E, F)] { override def one = (aring.one, bring.one, cring.one, dring.one, ering.one, fring.one) @@ -355,20 +373,22 @@ class Tuple6Ring[A, B, C, D, E, F](implicit aring: Ring[A], cring.times(l._3, r._3), dring.times(l._4, r._4), ering.times(l._5, r._5), - fring.times(l._6, r._6)) + fring.times(l._6, r._6) + ) } /** * Combine 7 semigroups into a product semigroup */ -class Tuple7Semigroup[A, B, C, D, E, F, G](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G]) - extends Semigroup[(A, B, C, D, E, F, G)] { +class Tuple7Semigroup[A, B, C, D, E, F, G]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G] +) extends Semigroup[(A, B, C, D, E, F, G)] { override def plus(l: (A, B, C, D, E, F, G), r: (A, B, C, D, E, F, G)) = ( asemigroup.plus(l._1, r._1), @@ -377,7 +397,8 @@ class Tuple7Semigroup[A, B, C, D, E, F, G](implicit asemigroup: Semigroup[A], dsemigroup.plus(l._4, r._4), esemigroup.plus(l._5, r._5), fsemigroup.plus(l._6, r._6), - gsemigroup.plus(l._7, r._7)) + gsemigroup.plus(l._7, r._7) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G)]) = if (to.isEmpty) None else { @@ -401,21 +422,24 @@ class Tuple7Semigroup[A, B, C, D, E, F, G](implicit asemigroup: Semigroup[A], bufD.flush.get, bufE.flush.get, bufF.flush.get, - bufG.flush.get)) + bufG.flush.get + ) + ) } } /** * Combine 7 monoids into a product monoid */ -class Tuple7Monoid[A, B, C, D, E, F, G](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G]) - extends Tuple7Semigroup[A, B, C, D, E, F, G] +class Tuple7Monoid[A, B, C, D, E, F, G]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G] +) extends Tuple7Semigroup[A, B, C, D, E, F, G] with Monoid[(A, B, C, D, E, F, G)] { override def zero = (amonoid.zero, bmonoid.zero, cmonoid.zero, dmonoid.zero, emonoid.zero, fmonoid.zero, gmonoid.zero) @@ -424,14 +448,15 @@ class Tuple7Monoid[A, B, C, D, E, F, G](implicit amonoid: Monoid[A], /** * Combine 7 groups into a product group */ -class Tuple7Group[A, B, C, D, E, F, G](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G]) - extends Tuple7Monoid[A, B, C, D, E, F, G] +class Tuple7Group[A, B, C, D, E, F, G]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G] +) extends Tuple7Monoid[A, B, C, D, E, F, G] with Group[(A, B, C, D, E, F, G)] { override def negate(v: (A, B, C, D, E, F, G)) = ( @@ -441,7 +466,8 @@ class Tuple7Group[A, B, C, D, E, F, G](implicit agroup: Group[A], dgroup.negate(v._4), egroup.negate(v._5), fgroup.negate(v._6), - ggroup.negate(v._7)) + ggroup.negate(v._7) + ) override def minus(l: (A, B, C, D, E, F, G), r: (A, B, C, D, E, F, G)) = ( agroup.minus(l._1, r._1), @@ -450,20 +476,22 @@ class Tuple7Group[A, B, C, D, E, F, G](implicit agroup: Group[A], dgroup.minus(l._4, r._4), egroup.minus(l._5, r._5), fgroup.minus(l._6, r._6), - ggroup.minus(l._7, r._7)) + ggroup.minus(l._7, r._7) + ) } /** * Combine 7 rings into a product ring */ -class Tuple7Ring[A, B, C, D, E, F, G](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G]) - extends Tuple7Group[A, B, C, D, E, F, G] +class Tuple7Ring[A, B, C, D, E, F, G]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G] +) extends Tuple7Group[A, B, C, D, E, F, G] with Ring[(A, B, C, D, E, F, G)] { override def one = (aring.one, bring.one, cring.one, dring.one, ering.one, fring.one, gring.one) @@ -475,21 +503,23 @@ class Tuple7Ring[A, B, C, D, E, F, G](implicit aring: Ring[A], dring.times(l._4, r._4), ering.times(l._5, r._5), fring.times(l._6, r._6), - gring.times(l._7, r._7)) + gring.times(l._7, r._7) + ) } /** * Combine 8 semigroups into a product semigroup */ -class Tuple8Semigroup[A, B, C, D, E, F, G, H](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H]) - extends Semigroup[(A, B, C, D, E, F, G, H)] { +class Tuple8Semigroup[A, B, C, D, E, F, G, H]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H] +) extends Semigroup[(A, B, C, D, E, F, G, H)] { override def plus(l: (A, B, C, D, E, F, G, H), r: (A, B, C, D, E, F, G, H)) = ( asemigroup.plus(l._1, r._1), @@ -499,7 +529,8 @@ class Tuple8Semigroup[A, B, C, D, E, F, G, H](implicit asemigroup: Semigroup[A], esemigroup.plus(l._5, r._5), fsemigroup.plus(l._6, r._6), gsemigroup.plus(l._7, r._7), - hsemigroup.plus(l._8, r._8)) + hsemigroup.plus(l._8, r._8) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H)]) = if (to.isEmpty) None else { @@ -525,22 +556,25 @@ class Tuple8Semigroup[A, B, C, D, E, F, G, H](implicit asemigroup: Semigroup[A], bufE.flush.get, bufF.flush.get, bufG.flush.get, - bufH.flush.get)) + bufH.flush.get + ) + ) } } /** * Combine 8 monoids into a product monoid */ -class Tuple8Monoid[A, B, C, D, E, F, G, H](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H]) - extends Tuple8Semigroup[A, B, C, D, E, F, G, H] +class Tuple8Monoid[A, B, C, D, E, F, G, H]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H] +) extends Tuple8Semigroup[A, B, C, D, E, F, G, H] with Monoid[(A, B, C, D, E, F, G, H)] { override def zero = ( @@ -551,21 +585,23 @@ class Tuple8Monoid[A, B, C, D, E, F, G, H](implicit amonoid: Monoid[A], emonoid.zero, fmonoid.zero, gmonoid.zero, - hmonoid.zero) + hmonoid.zero + ) } /** * Combine 8 groups into a product group */ -class Tuple8Group[A, B, C, D, E, F, G, H](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H]) - extends Tuple8Monoid[A, B, C, D, E, F, G, H] +class Tuple8Group[A, B, C, D, E, F, G, H]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H] +) extends Tuple8Monoid[A, B, C, D, E, F, G, H] with Group[(A, B, C, D, E, F, G, H)] { override def negate(v: (A, B, C, D, E, F, G, H)) = ( @@ -576,7 +612,8 @@ class Tuple8Group[A, B, C, D, E, F, G, H](implicit agroup: Group[A], egroup.negate(v._5), fgroup.negate(v._6), ggroup.negate(v._7), - hgroup.negate(v._8)) + hgroup.negate(v._8) + ) override def minus(l: (A, B, C, D, E, F, G, H), r: (A, B, C, D, E, F, G, H)) = ( agroup.minus(l._1, r._1), @@ -586,21 +623,23 @@ class Tuple8Group[A, B, C, D, E, F, G, H](implicit agroup: Group[A], egroup.minus(l._5, r._5), fgroup.minus(l._6, r._6), ggroup.minus(l._7, r._7), - hgroup.minus(l._8, r._8)) + hgroup.minus(l._8, r._8) + ) } /** * Combine 8 rings into a product ring */ -class Tuple8Ring[A, B, C, D, E, F, G, H](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H]) - extends Tuple8Group[A, B, C, D, E, F, G, H] +class Tuple8Ring[A, B, C, D, E, F, G, H]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H] +) extends Tuple8Group[A, B, C, D, E, F, G, H] with Ring[(A, B, C, D, E, F, G, H)] { override def one = (aring.one, bring.one, cring.one, dring.one, ering.one, fring.one, gring.one, hring.one) @@ -613,22 +652,24 @@ class Tuple8Ring[A, B, C, D, E, F, G, H](implicit aring: Ring[A], ering.times(l._5, r._5), fring.times(l._6, r._6), gring.times(l._7, r._7), - hring.times(l._8, r._8)) + hring.times(l._8, r._8) + ) } /** * Combine 9 semigroups into a product semigroup */ -class Tuple9Semigroup[A, B, C, D, E, F, G, H, I](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I]) - extends Semigroup[(A, B, C, D, E, F, G, H, I)] { +class Tuple9Semigroup[A, B, C, D, E, F, G, H, I]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I] +) extends Semigroup[(A, B, C, D, E, F, G, H, I)] { override def plus(l: (A, B, C, D, E, F, G, H, I), r: (A, B, C, D, E, F, G, H, I)) = ( asemigroup.plus(l._1, r._1), @@ -639,7 +680,8 @@ class Tuple9Semigroup[A, B, C, D, E, F, G, H, I](implicit asemigroup: Semigroup[ fsemigroup.plus(l._6, r._6), gsemigroup.plus(l._7, r._7), hsemigroup.plus(l._8, r._8), - isemigroup.plus(l._9, r._9)) + isemigroup.plus(l._9, r._9) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I)]) = if (to.isEmpty) None else { @@ -667,23 +709,26 @@ class Tuple9Semigroup[A, B, C, D, E, F, G, H, I](implicit asemigroup: Semigroup[ bufF.flush.get, bufG.flush.get, bufH.flush.get, - bufI.flush.get)) + bufI.flush.get + ) + ) } } /** * Combine 9 monoids into a product monoid */ -class Tuple9Monoid[A, B, C, D, E, F, G, H, I](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I]) - extends Tuple9Semigroup[A, B, C, D, E, F, G, H, I] +class Tuple9Monoid[A, B, C, D, E, F, G, H, I]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I] +) extends Tuple9Semigroup[A, B, C, D, E, F, G, H, I] with Monoid[(A, B, C, D, E, F, G, H, I)] { override def zero = ( @@ -695,22 +740,24 @@ class Tuple9Monoid[A, B, C, D, E, F, G, H, I](implicit amonoid: Monoid[A], fmonoid.zero, gmonoid.zero, hmonoid.zero, - imonoid.zero) + imonoid.zero + ) } /** * Combine 9 groups into a product group */ -class Tuple9Group[A, B, C, D, E, F, G, H, I](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I]) - extends Tuple9Monoid[A, B, C, D, E, F, G, H, I] +class Tuple9Group[A, B, C, D, E, F, G, H, I]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I] +) extends Tuple9Monoid[A, B, C, D, E, F, G, H, I] with Group[(A, B, C, D, E, F, G, H, I)] { override def negate(v: (A, B, C, D, E, F, G, H, I)) = ( @@ -722,7 +769,8 @@ class Tuple9Group[A, B, C, D, E, F, G, H, I](implicit agroup: Group[A], fgroup.negate(v._6), ggroup.negate(v._7), hgroup.negate(v._8), - igroup.negate(v._9)) + igroup.negate(v._9) + ) override def minus(l: (A, B, C, D, E, F, G, H, I), r: (A, B, C, D, E, F, G, H, I)) = ( agroup.minus(l._1, r._1), @@ -733,22 +781,24 @@ class Tuple9Group[A, B, C, D, E, F, G, H, I](implicit agroup: Group[A], fgroup.minus(l._6, r._6), ggroup.minus(l._7, r._7), hgroup.minus(l._8, r._8), - igroup.minus(l._9, r._9)) + igroup.minus(l._9, r._9) + ) } /** * Combine 9 rings into a product ring */ -class Tuple9Ring[A, B, C, D, E, F, G, H, I](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I]) - extends Tuple9Group[A, B, C, D, E, F, G, H, I] +class Tuple9Ring[A, B, C, D, E, F, G, H, I]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I] +) extends Tuple9Group[A, B, C, D, E, F, G, H, I] with Ring[(A, B, C, D, E, F, G, H, I)] { override def one = (aring.one, bring.one, cring.one, dring.one, ering.one, fring.one, gring.one, hring.one, iring.one) @@ -762,23 +812,25 @@ class Tuple9Ring[A, B, C, D, E, F, G, H, I](implicit aring: Ring[A], fring.times(l._6, r._6), gring.times(l._7, r._7), hring.times(l._8, r._8), - iring.times(l._9, r._9)) + iring.times(l._9, r._9) + ) } /** * Combine 10 semigroups into a product semigroup */ -class Tuple10Semigroup[A, B, C, D, E, F, G, H, I, J](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J)] { +class Tuple10Semigroup[A, B, C, D, E, F, G, H, I, J]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J)] { override def plus(l: (A, B, C, D, E, F, G, H, I, J), r: (A, B, C, D, E, F, G, H, I, J)) = ( asemigroup.plus(l._1, r._1), @@ -790,7 +842,8 @@ class Tuple10Semigroup[A, B, C, D, E, F, G, H, I, J](implicit asemigroup: Semigr gsemigroup.plus(l._7, r._7), hsemigroup.plus(l._8, r._8), isemigroup.plus(l._9, r._9), - jsemigroup.plus(l._10, r._10)) + jsemigroup.plus(l._10, r._10) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J)]) = if (to.isEmpty) None else { @@ -821,24 +874,27 @@ class Tuple10Semigroup[A, B, C, D, E, F, G, H, I, J](implicit asemigroup: Semigr bufG.flush.get, bufH.flush.get, bufI.flush.get, - bufJ.flush.get)) + bufJ.flush.get + ) + ) } } /** * Combine 10 monoids into a product monoid */ -class Tuple10Monoid[A, B, C, D, E, F, G, H, I, J](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J]) - extends Tuple10Semigroup[A, B, C, D, E, F, G, H, I, J] +class Tuple10Monoid[A, B, C, D, E, F, G, H, I, J]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J] +) extends Tuple10Semigroup[A, B, C, D, E, F, G, H, I, J] with Monoid[(A, B, C, D, E, F, G, H, I, J)] { override def zero = ( @@ -851,23 +907,25 @@ class Tuple10Monoid[A, B, C, D, E, F, G, H, I, J](implicit amonoid: Monoid[A], gmonoid.zero, hmonoid.zero, imonoid.zero, - jmonoid.zero) + jmonoid.zero + ) } /** * Combine 10 groups into a product group */ -class Tuple10Group[A, B, C, D, E, F, G, H, I, J](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J]) - extends Tuple10Monoid[A, B, C, D, E, F, G, H, I, J] +class Tuple10Group[A, B, C, D, E, F, G, H, I, J]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J] +) extends Tuple10Monoid[A, B, C, D, E, F, G, H, I, J] with Group[(A, B, C, D, E, F, G, H, I, J)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J)) = ( @@ -880,7 +938,8 @@ class Tuple10Group[A, B, C, D, E, F, G, H, I, J](implicit agroup: Group[A], ggroup.negate(v._7), hgroup.negate(v._8), igroup.negate(v._9), - jgroup.negate(v._10)) + jgroup.negate(v._10) + ) override def minus(l: (A, B, C, D, E, F, G, H, I, J), r: (A, B, C, D, E, F, G, H, I, J)) = ( agroup.minus(l._1, r._1), @@ -892,23 +951,25 @@ class Tuple10Group[A, B, C, D, E, F, G, H, I, J](implicit agroup: Group[A], ggroup.minus(l._7, r._7), hgroup.minus(l._8, r._8), igroup.minus(l._9, r._9), - jgroup.minus(l._10, r._10)) + jgroup.minus(l._10, r._10) + ) } /** * Combine 10 rings into a product ring */ -class Tuple10Ring[A, B, C, D, E, F, G, H, I, J](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J]) - extends Tuple10Group[A, B, C, D, E, F, G, H, I, J] +class Tuple10Ring[A, B, C, D, E, F, G, H, I, J]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J] +) extends Tuple10Group[A, B, C, D, E, F, G, H, I, J] with Ring[(A, B, C, D, E, F, G, H, I, J)] { override def one = ( @@ -921,7 +982,8 @@ class Tuple10Ring[A, B, C, D, E, F, G, H, I, J](implicit aring: Ring[A], gring.one, hring.one, iring.one, - jring.one) + jring.one + ) override def times(l: (A, B, C, D, E, F, G, H, I, J), r: (A, B, C, D, E, F, G, H, I, J)) = ( aring.times(l._1, r._1), @@ -933,24 +995,26 @@ class Tuple10Ring[A, B, C, D, E, F, G, H, I, J](implicit aring: Ring[A], gring.times(l._7, r._7), hring.times(l._8, r._8), iring.times(l._9, r._9), - jring.times(l._10, r._10)) + jring.times(l._10, r._10) + ) } /** * Combine 11 semigroups into a product semigroup */ -class Tuple11Semigroup[A, B, C, D, E, F, G, H, I, J, K](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K)] { +class Tuple11Semigroup[A, B, C, D, E, F, G, H, I, J, K]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K)] { override def plus(l: (A, B, C, D, E, F, G, H, I, J, K), r: (A, B, C, D, E, F, G, H, I, J, K)) = ( asemigroup.plus(l._1, r._1), @@ -963,7 +1027,8 @@ class Tuple11Semigroup[A, B, C, D, E, F, G, H, I, J, K](implicit asemigroup: Sem hsemigroup.plus(l._8, r._8), isemigroup.plus(l._9, r._9), jsemigroup.plus(l._10, r._10), - ksemigroup.plus(l._11, r._11)) + ksemigroup.plus(l._11, r._11) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K)]) = if (to.isEmpty) None else { @@ -996,25 +1061,28 @@ class Tuple11Semigroup[A, B, C, D, E, F, G, H, I, J, K](implicit asemigroup: Sem bufH.flush.get, bufI.flush.get, bufJ.flush.get, - bufK.flush.get)) + bufK.flush.get + ) + ) } } /** * Combine 11 monoids into a product monoid */ -class Tuple11Monoid[A, B, C, D, E, F, G, H, I, J, K](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K]) - extends Tuple11Semigroup[A, B, C, D, E, F, G, H, I, J, K] +class Tuple11Monoid[A, B, C, D, E, F, G, H, I, J, K]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K] +) extends Tuple11Semigroup[A, B, C, D, E, F, G, H, I, J, K] with Monoid[(A, B, C, D, E, F, G, H, I, J, K)] { override def zero = ( @@ -1028,24 +1096,26 @@ class Tuple11Monoid[A, B, C, D, E, F, G, H, I, J, K](implicit amonoid: Monoid[A] hmonoid.zero, imonoid.zero, jmonoid.zero, - kmonoid.zero) + kmonoid.zero + ) } /** * Combine 11 groups into a product group */ -class Tuple11Group[A, B, C, D, E, F, G, H, I, J, K](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K]) - extends Tuple11Monoid[A, B, C, D, E, F, G, H, I, J, K] +class Tuple11Group[A, B, C, D, E, F, G, H, I, J, K]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K] +) extends Tuple11Monoid[A, B, C, D, E, F, G, H, I, J, K] with Group[(A, B, C, D, E, F, G, H, I, J, K)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K)) = ( @@ -1059,7 +1129,8 @@ class Tuple11Group[A, B, C, D, E, F, G, H, I, J, K](implicit agroup: Group[A], hgroup.negate(v._8), igroup.negate(v._9), jgroup.negate(v._10), - kgroup.negate(v._11)) + kgroup.negate(v._11) + ) override def minus(l: (A, B, C, D, E, F, G, H, I, J, K), r: (A, B, C, D, E, F, G, H, I, J, K)) = ( agroup.minus(l._1, r._1), @@ -1072,24 +1143,26 @@ class Tuple11Group[A, B, C, D, E, F, G, H, I, J, K](implicit agroup: Group[A], hgroup.minus(l._8, r._8), igroup.minus(l._9, r._9), jgroup.minus(l._10, r._10), - kgroup.minus(l._11, r._11)) + kgroup.minus(l._11, r._11) + ) } /** * Combine 11 rings into a product ring */ -class Tuple11Ring[A, B, C, D, E, F, G, H, I, J, K](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K]) - extends Tuple11Group[A, B, C, D, E, F, G, H, I, J, K] +class Tuple11Ring[A, B, C, D, E, F, G, H, I, J, K]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K] +) extends Tuple11Group[A, B, C, D, E, F, G, H, I, J, K] with Ring[(A, B, C, D, E, F, G, H, I, J, K)] { override def one = ( @@ -1103,7 +1176,8 @@ class Tuple11Ring[A, B, C, D, E, F, G, H, I, J, K](implicit aring: Ring[A], hring.one, iring.one, jring.one, - kring.one) + kring.one + ) override def times(l: (A, B, C, D, E, F, G, H, I, J, K), r: (A, B, C, D, E, F, G, H, I, J, K)) = ( aring.times(l._1, r._1), @@ -1116,25 +1190,27 @@ class Tuple11Ring[A, B, C, D, E, F, G, H, I, J, K](implicit aring: Ring[A], hring.times(l._8, r._8), iring.times(l._9, r._9), jring.times(l._10, r._10), - kring.times(l._11, r._11)) + kring.times(l._11, r._11) + ) } /** * Combine 12 semigroups into a product semigroup */ -class Tuple12Semigroup[A, B, C, D, E, F, G, H, I, J, K, L](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L)] { +class Tuple12Semigroup[A, B, C, D, E, F, G, H, I, J, K, L]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L)] { override def plus(l: (A, B, C, D, E, F, G, H, I, J, K, L), r: (A, B, C, D, E, F, G, H, I, J, K, L)) = ( asemigroup.plus(l._1, r._1), @@ -1148,7 +1224,8 @@ class Tuple12Semigroup[A, B, C, D, E, F, G, H, I, J, K, L](implicit asemigroup: isemigroup.plus(l._9, r._9), jsemigroup.plus(l._10, r._10), ksemigroup.plus(l._11, r._11), - lsemigroup.plus(l._12, r._12)) + lsemigroup.plus(l._12, r._12) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L)]) = if (to.isEmpty) None else { @@ -1183,26 +1260,29 @@ class Tuple12Semigroup[A, B, C, D, E, F, G, H, I, J, K, L](implicit asemigroup: bufI.flush.get, bufJ.flush.get, bufK.flush.get, - bufL.flush.get)) + bufL.flush.get + ) + ) } } /** * Combine 12 monoids into a product monoid */ -class Tuple12Monoid[A, B, C, D, E, F, G, H, I, J, K, L](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L]) - extends Tuple12Semigroup[A, B, C, D, E, F, G, H, I, J, K, L] +class Tuple12Monoid[A, B, C, D, E, F, G, H, I, J, K, L]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L] +) extends Tuple12Semigroup[A, B, C, D, E, F, G, H, I, J, K, L] with Monoid[(A, B, C, D, E, F, G, H, I, J, K, L)] { override def zero = ( @@ -1217,25 +1297,27 @@ class Tuple12Monoid[A, B, C, D, E, F, G, H, I, J, K, L](implicit amonoid: Monoid imonoid.zero, jmonoid.zero, kmonoid.zero, - lmonoid.zero) + lmonoid.zero + ) } /** * Combine 12 groups into a product group */ -class Tuple12Group[A, B, C, D, E, F, G, H, I, J, K, L](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L]) - extends Tuple12Monoid[A, B, C, D, E, F, G, H, I, J, K, L] +class Tuple12Group[A, B, C, D, E, F, G, H, I, J, K, L]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L] +) extends Tuple12Monoid[A, B, C, D, E, F, G, H, I, J, K, L] with Group[(A, B, C, D, E, F, G, H, I, J, K, L)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K, L)) = ( @@ -1250,7 +1332,8 @@ class Tuple12Group[A, B, C, D, E, F, G, H, I, J, K, L](implicit agroup: Group[A] igroup.negate(v._9), jgroup.negate(v._10), kgroup.negate(v._11), - lgroup.negate(v._12)) + lgroup.negate(v._12) + ) override def minus(l: (A, B, C, D, E, F, G, H, I, J, K, L), r: (A, B, C, D, E, F, G, H, I, J, K, L)) = ( agroup.minus(l._1, r._1), @@ -1264,25 +1347,27 @@ class Tuple12Group[A, B, C, D, E, F, G, H, I, J, K, L](implicit agroup: Group[A] igroup.minus(l._9, r._9), jgroup.minus(l._10, r._10), kgroup.minus(l._11, r._11), - lgroup.minus(l._12, r._12)) + lgroup.minus(l._12, r._12) + ) } /** * Combine 12 rings into a product ring */ -class Tuple12Ring[A, B, C, D, E, F, G, H, I, J, K, L](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L]) - extends Tuple12Group[A, B, C, D, E, F, G, H, I, J, K, L] +class Tuple12Ring[A, B, C, D, E, F, G, H, I, J, K, L]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L] +) extends Tuple12Group[A, B, C, D, E, F, G, H, I, J, K, L] with Ring[(A, B, C, D, E, F, G, H, I, J, K, L)] { override def one = ( @@ -1297,7 +1382,8 @@ class Tuple12Ring[A, B, C, D, E, F, G, H, I, J, K, L](implicit aring: Ring[A], iring.one, jring.one, kring.one, - lring.one) + lring.one + ) override def times(l: (A, B, C, D, E, F, G, H, I, J, K, L), r: (A, B, C, D, E, F, G, H, I, J, K, L)) = ( aring.times(l._1, r._1), @@ -1311,26 +1397,28 @@ class Tuple12Ring[A, B, C, D, E, F, G, H, I, J, K, L](implicit aring: Ring[A], iring.times(l._9, r._9), jring.times(l._10, r._10), kring.times(l._11, r._11), - lring.times(l._12, r._12)) + lring.times(l._12, r._12) + ) } /** * Combine 13 semigroups into a product semigroup */ -class Tuple13Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L], - msemigroup: Semigroup[M]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M)] { +class Tuple13Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L], + msemigroup: Semigroup[M] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M)] { override def plus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M), r: (A, B, C, D, E, F, G, H, I, J, K, L, M)) = ( asemigroup.plus(l._1, r._1), @@ -1345,7 +1433,8 @@ class Tuple13Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M](implicit asemigrou jsemigroup.plus(l._10, r._10), ksemigroup.plus(l._11, r._11), lsemigroup.plus(l._12, r._12), - msemigroup.plus(l._13, r._13)) + msemigroup.plus(l._13, r._13) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M)]) = if (to.isEmpty) None else { @@ -1383,27 +1472,30 @@ class Tuple13Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M](implicit asemigrou bufJ.flush.get, bufK.flush.get, bufL.flush.get, - bufM.flush.get)) + bufM.flush.get + ) + ) } } /** * Combine 13 monoids into a product monoid */ -class Tuple13Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M]) - extends Tuple13Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M] +class Tuple13Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M] +) extends Tuple13Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M] with Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M)] { override def zero = ( @@ -1419,26 +1511,28 @@ class Tuple13Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M](implicit amonoid: Mon jmonoid.zero, kmonoid.zero, lmonoid.zero, - mmonoid.zero) + mmonoid.zero + ) } /** * Combine 13 groups into a product group */ -class Tuple13Group[A, B, C, D, E, F, G, H, I, J, K, L, M](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M]) - extends Tuple13Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M] +class Tuple13Group[A, B, C, D, E, F, G, H, I, J, K, L, M]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M] +) extends Tuple13Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M] with Group[(A, B, C, D, E, F, G, H, I, J, K, L, M)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K, L, M)) = ( @@ -1454,7 +1548,8 @@ class Tuple13Group[A, B, C, D, E, F, G, H, I, J, K, L, M](implicit agroup: Group jgroup.negate(v._10), kgroup.negate(v._11), lgroup.negate(v._12), - mgroup.negate(v._13)) + mgroup.negate(v._13) + ) override def minus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M), r: (A, B, C, D, E, F, G, H, I, J, K, L, M)) = ( agroup.minus(l._1, r._1), @@ -1469,26 +1564,28 @@ class Tuple13Group[A, B, C, D, E, F, G, H, I, J, K, L, M](implicit agroup: Group jgroup.minus(l._10, r._10), kgroup.minus(l._11, r._11), lgroup.minus(l._12, r._12), - mgroup.minus(l._13, r._13)) + mgroup.minus(l._13, r._13) + ) } /** * Combine 13 rings into a product ring */ -class Tuple13Ring[A, B, C, D, E, F, G, H, I, J, K, L, M](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M]) - extends Tuple13Group[A, B, C, D, E, F, G, H, I, J, K, L, M] +class Tuple13Ring[A, B, C, D, E, F, G, H, I, J, K, L, M]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M] +) extends Tuple13Group[A, B, C, D, E, F, G, H, I, J, K, L, M] with Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M)] { override def one = ( @@ -1504,7 +1601,8 @@ class Tuple13Ring[A, B, C, D, E, F, G, H, I, J, K, L, M](implicit aring: Ring[A] jring.one, kring.one, lring.one, - mring.one) + mring.one + ) override def times(l: (A, B, C, D, E, F, G, H, I, J, K, L, M), r: (A, B, C, D, E, F, G, H, I, J, K, L, M)) = ( aring.times(l._1, r._1), @@ -1519,29 +1617,33 @@ class Tuple13Ring[A, B, C, D, E, F, G, H, I, J, K, L, M](implicit aring: Ring[A] jring.times(l._10, r._10), kring.times(l._11, r._11), lring.times(l._12, r._12), - mring.times(l._13, r._13)) + mring.times(l._13, r._13) + ) } /** * Combine 14 semigroups into a product semigroup */ -class Tuple14Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L], - msemigroup: Semigroup[M], - nsemigroup: Semigroup[N]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] { - override def plus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N)) = +class Tuple14Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L], + msemigroup: Semigroup[M], + nsemigroup: Semigroup[N] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] { + override def plus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) + ) = ( asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), @@ -1556,7 +1658,8 @@ class Tuple14Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit asemig ksemigroup.plus(l._11, r._11), lsemigroup.plus(l._12, r._12), msemigroup.plus(l._13, r._13), - nsemigroup.plus(l._14, r._14)) + nsemigroup.plus(l._14, r._14) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)]) = if (to.isEmpty) None else { @@ -1596,28 +1699,31 @@ class Tuple14Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit asemig bufK.flush.get, bufL.flush.get, bufM.flush.get, - bufN.flush.get)) + bufN.flush.get + ) + ) } } /** * Combine 14 monoids into a product monoid */ -class Tuple14Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N]) - extends Tuple14Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N] +class Tuple14Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N] +) extends Tuple14Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N] with Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] { override def zero = ( @@ -1634,27 +1740,29 @@ class Tuple14Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit amonoid: kmonoid.zero, lmonoid.zero, mmonoid.zero, - nmonoid.zero) + nmonoid.zero + ) } /** * Combine 14 groups into a product group */ -class Tuple14Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N]) - extends Tuple14Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N] +class Tuple14Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N] +) extends Tuple14Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N] with Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K, L, M, N)) = ( @@ -1671,9 +1779,12 @@ class Tuple14Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit agroup: Gr kgroup.negate(v._11), lgroup.negate(v._12), mgroup.negate(v._13), - ngroup.negate(v._14)) - override def minus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N)) = + ngroup.negate(v._14) + ) + override def minus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) + ) = ( agroup.minus(l._1, r._1), bgroup.minus(l._2, r._2), @@ -1688,27 +1799,29 @@ class Tuple14Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit agroup: Gr kgroup.minus(l._11, r._11), lgroup.minus(l._12, r._12), mgroup.minus(l._13, r._13), - ngroup.minus(l._14, r._14)) + ngroup.minus(l._14, r._14) + ) } /** * Combine 14 rings into a product ring */ -class Tuple14Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N]) - extends Tuple14Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N] +class Tuple14Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N] +) extends Tuple14Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N] with Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] { override def one = ( @@ -1725,9 +1838,12 @@ class Tuple14Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit aring: Ring kring.one, lring.one, mring.one, - nring.one) - override def times(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N)) = + nring.one + ) + override def times( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) + ) = ( aring.times(l._1, r._1), bring.times(l._2, r._2), @@ -1742,30 +1858,34 @@ class Tuple14Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit aring: Ring kring.times(l._11, r._11), lring.times(l._12, r._12), mring.times(l._13, r._13), - nring.times(l._14, r._14)) + nring.times(l._14, r._14) + ) } /** * Combine 15 semigroups into a product semigroup */ -class Tuple15Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L], - msemigroup: Semigroup[M], - nsemigroup: Semigroup[N], - osemigroup: Semigroup[O]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] { - override def plus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)) = +class Tuple15Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L], + msemigroup: Semigroup[M], + nsemigroup: Semigroup[N], + osemigroup: Semigroup[O] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] { + override def plus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) + ) = ( asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), @@ -1781,7 +1901,8 @@ class Tuple15Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit ase lsemigroup.plus(l._12, r._12), msemigroup.plus(l._13, r._13), nsemigroup.plus(l._14, r._14), - osemigroup.plus(l._15, r._15)) + osemigroup.plus(l._15, r._15) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)]) = if (to.isEmpty) None else { @@ -1823,29 +1944,32 @@ class Tuple15Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit ase bufL.flush.get, bufM.flush.get, bufN.flush.get, - bufO.flush.get)) + bufO.flush.get + ) + ) } } /** * Combine 15 monoids into a product monoid */ -class Tuple15Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N], - omonoid: Monoid[O]) - extends Tuple15Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] +class Tuple15Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N], + omonoid: Monoid[O] +) extends Tuple15Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] with Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] { override def zero = ( @@ -1863,28 +1987,30 @@ class Tuple15Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit amonoi lmonoid.zero, mmonoid.zero, nmonoid.zero, - omonoid.zero) + omonoid.zero + ) } /** * Combine 15 groups into a product group */ -class Tuple15Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O]) - extends Tuple15Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] +class Tuple15Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O] +) extends Tuple15Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] with Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)) = ( @@ -1902,9 +2028,12 @@ class Tuple15Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit agroup: lgroup.negate(v._12), mgroup.negate(v._13), ngroup.negate(v._14), - ogroup.negate(v._15)) - override def minus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)) = + ogroup.negate(v._15) + ) + override def minus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) + ) = ( agroup.minus(l._1, r._1), bgroup.minus(l._2, r._2), @@ -1920,28 +2049,30 @@ class Tuple15Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit agroup: lgroup.minus(l._12, r._12), mgroup.minus(l._13, r._13), ngroup.minus(l._14, r._14), - ogroup.minus(l._15, r._15)) + ogroup.minus(l._15, r._15) + ) } /** * Combine 15 rings into a product ring */ -class Tuple15Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O]) - extends Tuple15Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] +class Tuple15Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O] +) extends Tuple15Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] with Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] { override def one = ( @@ -1959,9 +2090,12 @@ class Tuple15Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit aring: R lring.one, mring.one, nring.one, - oring.one) - override def times(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)) = + oring.one + ) + override def times( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) + ) = ( aring.times(l._1, r._1), bring.times(l._2, r._2), @@ -1977,31 +2111,35 @@ class Tuple15Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit aring: R lring.times(l._12, r._12), mring.times(l._13, r._13), nring.times(l._14, r._14), - oring.times(l._15, r._15)) + oring.times(l._15, r._15) + ) } /** * Combine 16 semigroups into a product semigroup */ -class Tuple16Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L], - msemigroup: Semigroup[M], - nsemigroup: Semigroup[N], - osemigroup: Semigroup[O], - psemigroup: Semigroup[P]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] { - override def plus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)) = +class Tuple16Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L], + msemigroup: Semigroup[M], + nsemigroup: Semigroup[N], + osemigroup: Semigroup[O], + psemigroup: Semigroup[P] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] { + override def plus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) + ) = ( asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), @@ -2018,7 +2156,8 @@ class Tuple16Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit msemigroup.plus(l._13, r._13), nsemigroup.plus(l._14, r._14), osemigroup.plus(l._15, r._15), - psemigroup.plus(l._16, r._16)) + psemigroup.plus(l._16, r._16) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)]) = if (to.isEmpty) None else { @@ -2063,30 +2202,33 @@ class Tuple16Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit bufM.flush.get, bufN.flush.get, bufO.flush.get, - bufP.flush.get)) + bufP.flush.get + ) + ) } } /** * Combine 16 monoids into a product monoid */ -class Tuple16Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N], - omonoid: Monoid[O], - pmonoid: Monoid[P]) - extends Tuple16Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] +class Tuple16Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N], + omonoid: Monoid[O], + pmonoid: Monoid[P] +) extends Tuple16Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] with Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] { override def zero = ( @@ -2105,29 +2247,31 @@ class Tuple16Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit amo mmonoid.zero, nmonoid.zero, omonoid.zero, - pmonoid.zero) + pmonoid.zero + ) } /** * Combine 16 groups into a product group */ -class Tuple16Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O], - pgroup: Group[P]) - extends Tuple16Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] +class Tuple16Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O], + pgroup: Group[P] +) extends Tuple16Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] with Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)) = ( @@ -2146,9 +2290,12 @@ class Tuple16Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit agro mgroup.negate(v._13), ngroup.negate(v._14), ogroup.negate(v._15), - pgroup.negate(v._16)) - override def minus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)) = + pgroup.negate(v._16) + ) + override def minus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) + ) = ( agroup.minus(l._1, r._1), bgroup.minus(l._2, r._2), @@ -2165,29 +2312,31 @@ class Tuple16Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit agro mgroup.minus(l._13, r._13), ngroup.minus(l._14, r._14), ogroup.minus(l._15, r._15), - pgroup.minus(l._16, r._16)) + pgroup.minus(l._16, r._16) + ) } /** * Combine 16 rings into a product ring */ -class Tuple16Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P]) - extends Tuple16Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] +class Tuple16Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P] +) extends Tuple16Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] with Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] { override def one = ( @@ -2206,9 +2355,12 @@ class Tuple16Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit aring mring.one, nring.one, oring.one, - pring.one) - override def times(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)) = + pring.one + ) + override def times( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) + ) = ( aring.times(l._1, r._1), bring.times(l._2, r._2), @@ -2225,32 +2377,36 @@ class Tuple16Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit aring mring.times(l._13, r._13), nring.times(l._14, r._14), oring.times(l._15, r._15), - pring.times(l._16, r._16)) + pring.times(l._16, r._16) + ) } /** * Combine 17 semigroups into a product semigroup */ -class Tuple17Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L], - msemigroup: Semigroup[M], - nsemigroup: Semigroup[N], - osemigroup: Semigroup[O], - psemigroup: Semigroup[P], - qsemigroup: Semigroup[Q]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] { - override def plus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)) = +class Tuple17Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L], + msemigroup: Semigroup[M], + nsemigroup: Semigroup[N], + osemigroup: Semigroup[O], + psemigroup: Semigroup[P], + qsemigroup: Semigroup[Q] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] { + override def plus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) + ) = ( asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), @@ -2268,7 +2424,8 @@ class Tuple17Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implic nsemigroup.plus(l._14, r._14), osemigroup.plus(l._15, r._15), psemigroup.plus(l._16, r._16), - qsemigroup.plus(l._17, r._17)) + qsemigroup.plus(l._17, r._17) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)]) = if (to.isEmpty) None else { @@ -2315,31 +2472,34 @@ class Tuple17Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implic bufN.flush.get, bufO.flush.get, bufP.flush.get, - bufQ.flush.get)) + bufQ.flush.get + ) + ) } } /** * Combine 17 monoids into a product monoid */ -class Tuple17Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N], - omonoid: Monoid[O], - pmonoid: Monoid[P], - qmonoid: Monoid[Q]) - extends Tuple17Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] +class Tuple17Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N], + omonoid: Monoid[O], + pmonoid: Monoid[P], + qmonoid: Monoid[Q] +) extends Tuple17Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] with Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] { override def zero = ( @@ -2359,30 +2519,32 @@ class Tuple17Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit nmonoid.zero, omonoid.zero, pmonoid.zero, - qmonoid.zero) + qmonoid.zero + ) } /** * Combine 17 groups into a product group */ -class Tuple17Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O], - pgroup: Group[P], - qgroup: Group[Q]) - extends Tuple17Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] +class Tuple17Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O], + pgroup: Group[P], + qgroup: Group[Q] +) extends Tuple17Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] with Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)) = ( @@ -2402,9 +2564,12 @@ class Tuple17Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit a ngroup.negate(v._14), ogroup.negate(v._15), pgroup.negate(v._16), - qgroup.negate(v._17)) - override def minus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)) = + qgroup.negate(v._17) + ) + override def minus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) + ) = ( agroup.minus(l._1, r._1), bgroup.minus(l._2, r._2), @@ -2422,30 +2587,32 @@ class Tuple17Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit a ngroup.minus(l._14, r._14), ogroup.minus(l._15, r._15), pgroup.minus(l._16, r._16), - qgroup.minus(l._17, r._17)) + qgroup.minus(l._17, r._17) + ) } /** * Combine 17 rings into a product ring */ -class Tuple17Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P], - qring: Ring[Q]) - extends Tuple17Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] +class Tuple17Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P], + qring: Ring[Q] +) extends Tuple17Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] with Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] { override def one = ( @@ -2465,9 +2632,12 @@ class Tuple17Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit ar nring.one, oring.one, pring.one, - qring.one) - override def times(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)) = + qring.one + ) + override def times( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) + ) = ( aring.times(l._1, r._1), bring.times(l._2, r._2), @@ -2485,7 +2655,8 @@ class Tuple17Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit ar nring.times(l._14, r._14), oring.times(l._15, r._15), pring.times(l._16, r._16), - qring.times(l._17, r._17)) + qring.times(l._17, r._17) + ) } /** @@ -2509,10 +2680,12 @@ class Tuple18Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( osemigroup: Semigroup[O], psemigroup: Semigroup[P], qsemigroup: Semigroup[Q], - rsemigroup: Semigroup[R]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] { - override def plus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)) = + rsemigroup: Semigroup[R] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] { + override def plus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) + ) = ( asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), @@ -2531,7 +2704,8 @@ class Tuple18Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( osemigroup.plus(l._15, r._15), psemigroup.plus(l._16, r._16), qsemigroup.plus(l._17, r._17), - rsemigroup.plus(l._18, r._18)) + rsemigroup.plus(l._18, r._18) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)]) = if (to.isEmpty) None else { @@ -2580,32 +2754,35 @@ class Tuple18Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( bufO.flush.get, bufP.flush.get, bufQ.flush.get, - bufR.flush.get)) + bufR.flush.get + ) + ) } } /** * Combine 18 monoids into a product monoid */ -class Tuple18Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N], - omonoid: Monoid[O], - pmonoid: Monoid[P], - qmonoid: Monoid[Q], - rmonoid: Monoid[R]) - extends Tuple18Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] +class Tuple18Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N], + omonoid: Monoid[O], + pmonoid: Monoid[P], + qmonoid: Monoid[Q], + rmonoid: Monoid[R] +) extends Tuple18Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] with Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] { override def zero = ( @@ -2626,31 +2803,33 @@ class Tuple18Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implic omonoid.zero, pmonoid.zero, qmonoid.zero, - rmonoid.zero) + rmonoid.zero + ) } /** * Combine 18 groups into a product group */ -class Tuple18Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O], - pgroup: Group[P], - qgroup: Group[Q], - rgroup: Group[R]) - extends Tuple18Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] +class Tuple18Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O], + pgroup: Group[P], + qgroup: Group[Q], + rgroup: Group[R] +) extends Tuple18Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] with Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)) = ( @@ -2671,9 +2850,12 @@ class Tuple18Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implici ogroup.negate(v._15), pgroup.negate(v._16), qgroup.negate(v._17), - rgroup.negate(v._18)) - override def minus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)) = + rgroup.negate(v._18) + ) + override def minus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) + ) = ( agroup.minus(l._1, r._1), bgroup.minus(l._2, r._2), @@ -2692,31 +2874,33 @@ class Tuple18Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implici ogroup.minus(l._15, r._15), pgroup.minus(l._16, r._16), qgroup.minus(l._17, r._17), - rgroup.minus(l._18, r._18)) + rgroup.minus(l._18, r._18) + ) } /** * Combine 18 rings into a product ring */ -class Tuple18Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P], - qring: Ring[Q], - rring: Ring[R]) - extends Tuple18Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] +class Tuple18Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P], + qring: Ring[Q], + rring: Ring[R] +) extends Tuple18Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] with Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] { override def one = ( @@ -2737,9 +2921,12 @@ class Tuple18Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implicit oring.one, pring.one, qring.one, - rring.one) - override def times(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)) = + rring.one + ) + override def times( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) + ) = ( aring.times(l._1, r._1), bring.times(l._2, r._2), @@ -2758,7 +2945,8 @@ class Tuple18Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implicit oring.times(l._15, r._15), pring.times(l._16, r._16), qring.times(l._17, r._17), - rring.times(l._18, r._18)) + rring.times(l._18, r._18) + ) } /** @@ -2783,10 +2971,12 @@ class Tuple19Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( psemigroup: Semigroup[P], qsemigroup: Semigroup[Q], rsemigroup: Semigroup[R], - ssemigroup: Semigroup[S]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] { - override def plus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)) = + ssemigroup: Semigroup[S] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] { + override def plus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) + ) = ( asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), @@ -2806,7 +2996,8 @@ class Tuple19Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( psemigroup.plus(l._16, r._16), qsemigroup.plus(l._17, r._17), rsemigroup.plus(l._18, r._18), - ssemigroup.plus(l._19, r._19)) + ssemigroup.plus(l._19, r._19) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)]) = if (to.isEmpty) None else { @@ -2858,33 +3049,36 @@ class Tuple19Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( bufP.flush.get, bufQ.flush.get, bufR.flush.get, - bufS.flush.get)) + bufS.flush.get + ) + ) } } /** * Combine 19 monoids into a product monoid */ -class Tuple19Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N], - omonoid: Monoid[O], - pmonoid: Monoid[P], - qmonoid: Monoid[Q], - rmonoid: Monoid[R], - smonoid: Monoid[S]) - extends Tuple19Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] +class Tuple19Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N], + omonoid: Monoid[O], + pmonoid: Monoid[P], + qmonoid: Monoid[Q], + rmonoid: Monoid[R], + smonoid: Monoid[S] +) extends Tuple19Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] with Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] { override def zero = ( @@ -2906,32 +3100,34 @@ class Tuple19Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](imp pmonoid.zero, qmonoid.zero, rmonoid.zero, - smonoid.zero) + smonoid.zero + ) } /** * Combine 19 groups into a product group */ -class Tuple19Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O], - pgroup: Group[P], - qgroup: Group[Q], - rgroup: Group[R], - sgroup: Group[S]) - extends Tuple19Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] +class Tuple19Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O], + pgroup: Group[P], + qgroup: Group[Q], + rgroup: Group[R], + sgroup: Group[S] +) extends Tuple19Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] with Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)) = ( @@ -2953,9 +3149,12 @@ class Tuple19Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](impl pgroup.negate(v._16), qgroup.negate(v._17), rgroup.negate(v._18), - sgroup.negate(v._19)) - override def minus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)) = + sgroup.negate(v._19) + ) + override def minus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) + ) = ( agroup.minus(l._1, r._1), bgroup.minus(l._2, r._2), @@ -2975,32 +3174,34 @@ class Tuple19Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](impl pgroup.minus(l._16, r._16), qgroup.minus(l._17, r._17), rgroup.minus(l._18, r._18), - sgroup.minus(l._19, r._19)) + sgroup.minus(l._19, r._19) + ) } /** * Combine 19 rings into a product ring */ -class Tuple19Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P], - qring: Ring[Q], - rring: Ring[R], - sring: Ring[S]) - extends Tuple19Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] +class Tuple19Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P], + qring: Ring[Q], + rring: Ring[R], + sring: Ring[S] +) extends Tuple19Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] with Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] { override def one = ( @@ -3022,9 +3223,12 @@ class Tuple19Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](impli pring.one, qring.one, rring.one, - sring.one) - override def times(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)) = + sring.one + ) + override def times( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) + ) = ( aring.times(l._1, r._1), bring.times(l._2, r._2), @@ -3044,7 +3248,8 @@ class Tuple19Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](impli pring.times(l._16, r._16), qring.times(l._17, r._17), rring.times(l._18, r._18), - sring.times(l._19, r._19)) + sring.times(l._19, r._19) + ) } /** @@ -3070,10 +3275,12 @@ class Tuple20Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, qsemigroup: Semigroup[Q], rsemigroup: Semigroup[R], ssemigroup: Semigroup[S], - tsemigroup: Semigroup[T]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] { - override def plus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)) = + tsemigroup: Semigroup[T] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] { + override def plus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) + ) = ( asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), @@ -3094,7 +3301,8 @@ class Tuple20Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, qsemigroup.plus(l._17, r._17), rsemigroup.plus(l._18, r._18), ssemigroup.plus(l._19, r._19), - tsemigroup.plus(l._20, r._20)) + tsemigroup.plus(l._20, r._20) + ) override def sumOption(to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)]) = if (to.isEmpty) None else { @@ -3148,34 +3356,37 @@ class Tuple20Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, bufQ.flush.get, bufR.flush.get, bufS.flush.get, - bufT.flush.get)) + bufT.flush.get + ) + ) } } /** * Combine 20 monoids into a product monoid */ -class Tuple20Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N], - omonoid: Monoid[O], - pmonoid: Monoid[P], - qmonoid: Monoid[Q], - rmonoid: Monoid[R], - smonoid: Monoid[S], - tmonoid: Monoid[T]) - extends Tuple20Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] +class Tuple20Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N], + omonoid: Monoid[O], + pmonoid: Monoid[P], + qmonoid: Monoid[Q], + rmonoid: Monoid[R], + smonoid: Monoid[S], + tmonoid: Monoid[T] +) extends Tuple20Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] with Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] { override def zero = ( @@ -3198,33 +3409,35 @@ class Tuple20Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( qmonoid.zero, rmonoid.zero, smonoid.zero, - tmonoid.zero) + tmonoid.zero + ) } /** * Combine 20 groups into a product group */ -class Tuple20Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O], - pgroup: Group[P], - qgroup: Group[Q], - rgroup: Group[R], - sgroup: Group[S], - tgroup: Group[T]) - extends Tuple20Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] +class Tuple20Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O], + pgroup: Group[P], + qgroup: Group[Q], + rgroup: Group[R], + sgroup: Group[S], + tgroup: Group[T] +) extends Tuple20Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] with Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)) = ( @@ -3247,9 +3460,12 @@ class Tuple20Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](i qgroup.negate(v._17), rgroup.negate(v._18), sgroup.negate(v._19), - tgroup.negate(v._20)) - override def minus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)) = + tgroup.negate(v._20) + ) + override def minus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) + ) = ( agroup.minus(l._1, r._1), bgroup.minus(l._2, r._2), @@ -3270,33 +3486,35 @@ class Tuple20Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](i qgroup.minus(l._17, r._17), rgroup.minus(l._18, r._18), sgroup.minus(l._19, r._19), - tgroup.minus(l._20, r._20)) + tgroup.minus(l._20, r._20) + ) } /** * Combine 20 rings into a product ring */ -class Tuple20Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P], - qring: Ring[Q], - rring: Ring[R], - sring: Ring[S], - tring: Ring[T]) - extends Tuple20Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] +class Tuple20Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P], + qring: Ring[Q], + rring: Ring[R], + sring: Ring[S], + tring: Ring[T] +) extends Tuple20Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] with Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] { override def one = ( @@ -3319,9 +3537,12 @@ class Tuple20Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](im qring.one, rring.one, sring.one, - tring.one) - override def times(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)) = + tring.one + ) + override def times( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) + ) = ( aring.times(l._1, r._1), bring.times(l._2, r._2), @@ -3342,7 +3563,8 @@ class Tuple20Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](im qring.times(l._17, r._17), rring.times(l._18, r._18), sring.times(l._19, r._19), - tring.times(l._20, r._20)) + tring.times(l._20, r._20) + ) } /** @@ -3369,10 +3591,12 @@ class Tuple21Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, rsemigroup: Semigroup[R], ssemigroup: Semigroup[S], tsemigroup: Semigroup[T], - usemigroup: Semigroup[U]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] { - override def plus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)) = + usemigroup: Semigroup[U] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] { + override def plus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) + ) = ( asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), @@ -3394,9 +3618,11 @@ class Tuple21Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, rsemigroup.plus(l._18, r._18), ssemigroup.plus(l._19, r._19), tsemigroup.plus(l._20, r._20), - usemigroup.plus(l._21, r._21)) + usemigroup.plus(l._21, r._21) + ) override def sumOption( - to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)]) = + to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] + ) = if (to.isEmpty) None else { val bufA = fromSumOption[A](1000) @@ -3451,7 +3677,9 @@ class Tuple21Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, bufR.flush.get, bufS.flush.get, bufT.flush.get, - bufU.flush.get)) + bufU.flush.get + ) + ) } } @@ -3479,8 +3707,8 @@ class Tuple21Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, rmonoid: Monoid[R], smonoid: Monoid[S], tmonoid: Monoid[T], - umonoid: Monoid[U]) - extends Tuple21Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] + umonoid: Monoid[U] +) extends Tuple21Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] with Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] { override def zero = ( @@ -3504,34 +3732,36 @@ class Tuple21Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, rmonoid.zero, smonoid.zero, tmonoid.zero, - umonoid.zero) + umonoid.zero + ) } /** * Combine 21 groups into a product group */ -class Tuple21Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O], - pgroup: Group[P], - qgroup: Group[Q], - rgroup: Group[R], - sgroup: Group[S], - tgroup: Group[T], - ugroup: Group[U]) - extends Tuple21Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] +class Tuple21Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O], + pgroup: Group[P], + qgroup: Group[Q], + rgroup: Group[R], + sgroup: Group[S], + tgroup: Group[T], + ugroup: Group[U] +) extends Tuple21Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] with Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)) = ( @@ -3555,9 +3785,12 @@ class Tuple21Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U rgroup.negate(v._18), sgroup.negate(v._19), tgroup.negate(v._20), - ugroup.negate(v._21)) - override def minus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)) = + ugroup.negate(v._21) + ) + override def minus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) + ) = ( agroup.minus(l._1, r._1), bgroup.minus(l._2, r._2), @@ -3579,34 +3812,36 @@ class Tuple21Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U rgroup.minus(l._18, r._18), sgroup.minus(l._19, r._19), tgroup.minus(l._20, r._20), - ugroup.minus(l._21, r._21)) + ugroup.minus(l._21, r._21) + ) } /** * Combine 21 rings into a product ring */ -class Tuple21Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P], - qring: Ring[Q], - rring: Ring[R], - sring: Ring[S], - tring: Ring[T], - uring: Ring[U]) - extends Tuple21Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] +class Tuple21Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P], + qring: Ring[Q], + rring: Ring[R], + sring: Ring[S], + tring: Ring[T], + uring: Ring[U] +) extends Tuple21Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] with Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] { override def one = ( @@ -3630,9 +3865,12 @@ class Tuple21Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] rring.one, sring.one, tring.one, - uring.one) - override def times(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)) = + uring.one + ) + override def times( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) + ) = ( aring.times(l._1, r._1), bring.times(l._2, r._2), @@ -3654,7 +3892,8 @@ class Tuple21Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] rring.times(l._18, r._18), sring.times(l._19, r._19), tring.times(l._20, r._20), - uring.times(l._21, r._21)) + uring.times(l._21, r._21) + ) } /** @@ -3682,10 +3921,12 @@ class Tuple22Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, ssemigroup: Semigroup[S], tsemigroup: Semigroup[T], usemigroup: Semigroup[U], - vsemigroup: Semigroup[V]) - extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] { - override def plus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)) = + vsemigroup: Semigroup[V] +) extends Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] { + override def plus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) + ) = ( asemigroup.plus(l._1, r._1), bsemigroup.plus(l._2, r._2), @@ -3708,9 +3949,11 @@ class Tuple22Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, ssemigroup.plus(l._19, r._19), tsemigroup.plus(l._20, r._20), usemigroup.plus(l._21, r._21), - vsemigroup.plus(l._22, r._22)) + vsemigroup.plus(l._22, r._22) + ) override def sumOption( - to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)]) = + to: TraversableOnce[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] + ) = if (to.isEmpty) None else { val bufA = fromSumOption[A](1000) @@ -3768,7 +4011,9 @@ class Tuple22Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, bufS.flush.get, bufT.flush.get, bufU.flush.get, - bufV.flush.get)) + bufV.flush.get + ) + ) } } @@ -3797,8 +4042,8 @@ class Tuple22Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, smonoid: Monoid[S], tmonoid: Monoid[T], umonoid: Monoid[U], - vmonoid: Monoid[V]) - extends Tuple22Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V] + vmonoid: Monoid[V] +) extends Tuple22Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V] with Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] { override def zero = ( @@ -3823,7 +4068,8 @@ class Tuple22Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, smonoid.zero, tmonoid.zero, umonoid.zero, - vmonoid.zero) + vmonoid.zero + ) } /** @@ -3851,8 +4097,8 @@ class Tuple22Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U sgroup: Group[S], tgroup: Group[T], ugroup: Group[U], - vgroup: Group[V]) - extends Tuple22Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V] + vgroup: Group[V] +) extends Tuple22Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V] with Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] { override def negate(v: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)) = ( @@ -3877,9 +4123,12 @@ class Tuple22Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U sgroup.negate(v._19), tgroup.negate(v._20), ugroup.negate(v._21), - vgroup.negate(v._22)) - override def minus(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)) = + vgroup.negate(v._22) + ) + override def minus( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) + ) = ( agroup.minus(l._1, r._1), bgroup.minus(l._2, r._2), @@ -3902,35 +4151,37 @@ class Tuple22Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U sgroup.minus(l._19, r._19), tgroup.minus(l._20, r._20), ugroup.minus(l._21, r._21), - vgroup.minus(l._22, r._22)) + vgroup.minus(l._22, r._22) + ) } /** * Combine 22 rings into a product ring */ -class Tuple22Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P], - qring: Ring[Q], - rring: Ring[R], - sring: Ring[S], - tring: Ring[T], - uring: Ring[U], - vring: Ring[V]) - extends Tuple22Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V] +class Tuple22Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P], + qring: Ring[Q], + rring: Ring[R], + sring: Ring[S], + tring: Ring[T], + uring: Ring[U], + vring: Ring[V] +) extends Tuple22Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V] with Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] { override def one = ( @@ -3955,9 +4206,12 @@ class Tuple22Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, sring.one, tring.one, uring.one, - vring.one) - override def times(l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V), - r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)) = + vring.one + ) + override def times( + l: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V), + r: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) + ) = ( aring.times(l._1, r._1), bring.times(l._2, r._2), @@ -3980,53 +4234,67 @@ class Tuple22Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, sring.times(l._19, r._19), tring.times(l._20, r._20), uring.times(l._21, r._21), - vring.times(l._22, r._22)) + vring.times(l._22, r._22) + ) } trait GeneratedSemigroupImplicits { - implicit def semigroup2[A, B](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B]): Semigroup[(A, B)] = + implicit def semigroup2[A, B]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B] + ): Semigroup[(A, B)] = new Tuple2Semigroup[A, B]()(asemigroup, bsemigroup) - implicit def semigroup3[A, B, C](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C]): Semigroup[(A, B, C)] = + implicit def semigroup3[A, B, C]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C] + ): Semigroup[(A, B, C)] = new Tuple3Semigroup[A, B, C]()(asemigroup, bsemigroup, csemigroup) - implicit def semigroup4[A, B, C, D](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D]): Semigroup[(A, B, C, D)] = + implicit def semigroup4[A, B, C, D]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D] + ): Semigroup[(A, B, C, D)] = new Tuple4Semigroup[A, B, C, D]()(asemigroup, bsemigroup, csemigroup, dsemigroup) - implicit def semigroup5[A, B, C, D, E](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E]): Semigroup[(A, B, C, D, E)] = + implicit def semigroup5[A, B, C, D, E]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E] + ): Semigroup[(A, B, C, D, E)] = new Tuple5Semigroup[A, B, C, D, E]()(asemigroup, bsemigroup, csemigroup, dsemigroup, esemigroup) - implicit def semigroup6[A, B, C, D, E, F](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F]): Semigroup[(A, B, C, D, E, F)] = + implicit def semigroup6[A, B, C, D, E, F]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F] + ): Semigroup[(A, B, C, D, E, F)] = new Tuple6Semigroup[A, B, C, D, E, F]()( asemigroup, bsemigroup, csemigroup, dsemigroup, esemigroup, - fsemigroup) - - implicit def semigroup7[A, B, C, D, E, F, G](implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G]): Semigroup[(A, B, C, D, E, F, G)] = + fsemigroup + ) + + implicit def semigroup7[A, B, C, D, E, F, G]( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G] + ): Semigroup[(A, B, C, D, E, F, G)] = new Tuple7Semigroup[A, B, C, D, E, F, G]()( asemigroup, bsemigroup, @@ -4034,7 +4302,8 @@ trait GeneratedSemigroupImplicits { dsemigroup, esemigroup, fsemigroup, - gsemigroup) + gsemigroup + ) implicit def semigroup8[A, B, C, D, E, F, G, H]( implicit asemigroup: Semigroup[A], @@ -4044,7 +4313,8 @@ trait GeneratedSemigroupImplicits { esemigroup: Semigroup[E], fsemigroup: Semigroup[F], gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H]): Semigroup[(A, B, C, D, E, F, G, H)] = + hsemigroup: Semigroup[H] + ): Semigroup[(A, B, C, D, E, F, G, H)] = new Tuple8Semigroup[A, B, C, D, E, F, G, H]()( asemigroup, bsemigroup, @@ -4053,7 +4323,8 @@ trait GeneratedSemigroupImplicits { esemigroup, fsemigroup, gsemigroup, - hsemigroup) + hsemigroup + ) implicit def semigroup9[A, B, C, D, E, F, G, H, I]( implicit asemigroup: Semigroup[A], @@ -4064,7 +4335,8 @@ trait GeneratedSemigroupImplicits { fsemigroup: Semigroup[F], gsemigroup: Semigroup[G], hsemigroup: Semigroup[H], - isemigroup: Semigroup[I]): Semigroup[(A, B, C, D, E, F, G, H, I)] = + isemigroup: Semigroup[I] + ): Semigroup[(A, B, C, D, E, F, G, H, I)] = new Tuple9Semigroup[A, B, C, D, E, F, G, H, I]()( asemigroup, bsemigroup, @@ -4074,7 +4346,8 @@ trait GeneratedSemigroupImplicits { fsemigroup, gsemigroup, hsemigroup, - isemigroup) + isemigroup + ) implicit def semigroup10[A, B, C, D, E, F, G, H, I, J]( implicit asemigroup: Semigroup[A], @@ -4086,7 +4359,8 @@ trait GeneratedSemigroupImplicits { gsemigroup: Semigroup[G], hsemigroup: Semigroup[H], isemigroup: Semigroup[I], - jsemigroup: Semigroup[J]): Semigroup[(A, B, C, D, E, F, G, H, I, J)] = + jsemigroup: Semigroup[J] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J)] = new Tuple10Semigroup[A, B, C, D, E, F, G, H, I, J]()( asemigroup, bsemigroup, @@ -4097,7 +4371,8 @@ trait GeneratedSemigroupImplicits { gsemigroup, hsemigroup, isemigroup, - jsemigroup) + jsemigroup + ) implicit def semigroup11[A, B, C, D, E, F, G, H, I, J, K]( implicit asemigroup: Semigroup[A], @@ -4110,7 +4385,8 @@ trait GeneratedSemigroupImplicits { hsemigroup: Semigroup[H], isemigroup: Semigroup[I], jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K]): Semigroup[(A, B, C, D, E, F, G, H, I, J, K)] = + ksemigroup: Semigroup[K] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K)] = new Tuple11Semigroup[A, B, C, D, E, F, G, H, I, J, K]()( asemigroup, bsemigroup, @@ -4122,7 +4398,8 @@ trait GeneratedSemigroupImplicits { hsemigroup, isemigroup, jsemigroup, - ksemigroup) + ksemigroup + ) implicit def semigroup12[A, B, C, D, E, F, G, H, I, J, K, L]( implicit asemigroup: Semigroup[A], @@ -4136,7 +4413,8 @@ trait GeneratedSemigroupImplicits { isemigroup: Semigroup[I], jsemigroup: Semigroup[J], ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L]): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L)] = + lsemigroup: Semigroup[L] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L)] = new Tuple12Semigroup[A, B, C, D, E, F, G, H, I, J, K, L]()( asemigroup, bsemigroup, @@ -4149,7 +4427,8 @@ trait GeneratedSemigroupImplicits { isemigroup, jsemigroup, ksemigroup, - lsemigroup) + lsemigroup + ) implicit def semigroup13[A, B, C, D, E, F, G, H, I, J, K, L, M]( implicit asemigroup: Semigroup[A], @@ -4164,7 +4443,8 @@ trait GeneratedSemigroupImplicits { jsemigroup: Semigroup[J], ksemigroup: Semigroup[K], lsemigroup: Semigroup[L], - msemigroup: Semigroup[M]): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M)] = + msemigroup: Semigroup[M] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M)] = new Tuple13Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M]()( asemigroup, bsemigroup, @@ -4178,7 +4458,8 @@ trait GeneratedSemigroupImplicits { jsemigroup, ksemigroup, lsemigroup, - msemigroup) + msemigroup + ) implicit def semigroup14[A, B, C, D, E, F, G, H, I, J, K, L, M, N]( implicit asemigroup: Semigroup[A], @@ -4194,7 +4475,8 @@ trait GeneratedSemigroupImplicits { ksemigroup: Semigroup[K], lsemigroup: Semigroup[L], msemigroup: Semigroup[M], - nsemigroup: Semigroup[N]): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = + nsemigroup: Semigroup[N] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = new Tuple14Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N]()( asemigroup, bsemigroup, @@ -4227,7 +4509,8 @@ trait GeneratedSemigroupImplicits { lsemigroup: Semigroup[L], msemigroup: Semigroup[M], nsemigroup: Semigroup[N], - osemigroup: Semigroup[O]): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = + osemigroup: Semigroup[O] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = new Tuple15Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]()( asemigroup, bsemigroup, @@ -4262,7 +4545,8 @@ trait GeneratedSemigroupImplicits { msemigroup: Semigroup[M], nsemigroup: Semigroup[N], osemigroup: Semigroup[O], - psemigroup: Semigroup[P]): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = + psemigroup: Semigroup[P] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = new Tuple16Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]()( asemigroup, bsemigroup, @@ -4299,7 +4583,8 @@ trait GeneratedSemigroupImplicits { nsemigroup: Semigroup[N], osemigroup: Semigroup[O], psemigroup: Semigroup[P], - qsemigroup: Semigroup[Q]): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = + qsemigroup: Semigroup[Q] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = new Tuple17Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]()( asemigroup, bsemigroup, @@ -4338,7 +4623,8 @@ trait GeneratedSemigroupImplicits { osemigroup: Semigroup[O], psemigroup: Semigroup[P], qsemigroup: Semigroup[Q], - rsemigroup: Semigroup[R]): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = + rsemigroup: Semigroup[R] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = new Tuple18Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]()( asemigroup, bsemigroup, @@ -4379,7 +4665,8 @@ trait GeneratedSemigroupImplicits { psemigroup: Semigroup[P], qsemigroup: Semigroup[Q], rsemigroup: Semigroup[R], - ssemigroup: Semigroup[S]): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = + ssemigroup: Semigroup[S] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = new Tuple19Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]()( asemigroup, bsemigroup, @@ -4422,7 +4709,8 @@ trait GeneratedSemigroupImplicits { qsemigroup: Semigroup[Q], rsemigroup: Semigroup[R], ssemigroup: Semigroup[S], - tsemigroup: Semigroup[T]): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = + tsemigroup: Semigroup[T] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = new Tuple20Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]()( asemigroup, bsemigroup, @@ -4467,7 +4755,8 @@ trait GeneratedSemigroupImplicits { rsemigroup: Semigroup[R], ssemigroup: Semigroup[S], tsemigroup: Semigroup[T], - usemigroup: Semigroup[U]): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = + usemigroup: Semigroup[U] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = new Tuple21Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]()( asemigroup, bsemigroup, @@ -4514,8 +4803,8 @@ trait GeneratedSemigroupImplicits { ssemigroup: Semigroup[S], tsemigroup: Semigroup[T], usemigroup: Semigroup[U], - vsemigroup: Semigroup[V]) - : Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = + vsemigroup: Semigroup[V] + ): Semigroup[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = new Tuple22Semigroup[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]()( asemigroup, bsemigroup, @@ -4547,49 +4836,61 @@ trait GeneratedMonoidImplicits { implicit def monoid2[A, B](implicit amonoid: Monoid[A], bmonoid: Monoid[B]): Monoid[(A, B)] = new Tuple2Monoid[A, B]()(amonoid, bmonoid) - implicit def monoid3[A, B, C](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C]): Monoid[(A, B, C)] = + implicit def monoid3[A, B, C]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C] + ): Monoid[(A, B, C)] = new Tuple3Monoid[A, B, C]()(amonoid, bmonoid, cmonoid) - implicit def monoid4[A, B, C, D](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D]): Monoid[(A, B, C, D)] = + implicit def monoid4[A, B, C, D]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D] + ): Monoid[(A, B, C, D)] = new Tuple4Monoid[A, B, C, D]()(amonoid, bmonoid, cmonoid, dmonoid) - implicit def monoid5[A, B, C, D, E](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E]): Monoid[(A, B, C, D, E)] = + implicit def monoid5[A, B, C, D, E]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E] + ): Monoid[(A, B, C, D, E)] = new Tuple5Monoid[A, B, C, D, E]()(amonoid, bmonoid, cmonoid, dmonoid, emonoid) - implicit def monoid6[A, B, C, D, E, F](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F]): Monoid[(A, B, C, D, E, F)] = + implicit def monoid6[A, B, C, D, E, F]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F] + ): Monoid[(A, B, C, D, E, F)] = new Tuple6Monoid[A, B, C, D, E, F]()(amonoid, bmonoid, cmonoid, dmonoid, emonoid, fmonoid) - implicit def monoid7[A, B, C, D, E, F, G](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G]): Monoid[(A, B, C, D, E, F, G)] = + implicit def monoid7[A, B, C, D, E, F, G]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G] + ): Monoid[(A, B, C, D, E, F, G)] = new Tuple7Monoid[A, B, C, D, E, F, G]()(amonoid, bmonoid, cmonoid, dmonoid, emonoid, fmonoid, gmonoid) - implicit def monoid8[A, B, C, D, E, F, G, H](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H]): Monoid[(A, B, C, D, E, F, G, H)] = + implicit def monoid8[A, B, C, D, E, F, G, H]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H] + ): Monoid[(A, B, C, D, E, F, G, H)] = new Tuple8Monoid[A, B, C, D, E, F, G, H]()( amonoid, bmonoid, @@ -4598,17 +4899,20 @@ trait GeneratedMonoidImplicits { emonoid, fmonoid, gmonoid, - hmonoid) - - implicit def monoid9[A, B, C, D, E, F, G, H, I](implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I]): Monoid[(A, B, C, D, E, F, G, H, I)] = + hmonoid + ) + + implicit def monoid9[A, B, C, D, E, F, G, H, I]( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I] + ): Monoid[(A, B, C, D, E, F, G, H, I)] = new Tuple9Monoid[A, B, C, D, E, F, G, H, I]()( amonoid, bmonoid, @@ -4618,7 +4922,8 @@ trait GeneratedMonoidImplicits { fmonoid, gmonoid, hmonoid, - imonoid) + imonoid + ) implicit def monoid10[A, B, C, D, E, F, G, H, I, J]( implicit amonoid: Monoid[A], @@ -4630,7 +4935,8 @@ trait GeneratedMonoidImplicits { gmonoid: Monoid[G], hmonoid: Monoid[H], imonoid: Monoid[I], - jmonoid: Monoid[J]): Monoid[(A, B, C, D, E, F, G, H, I, J)] = + jmonoid: Monoid[J] + ): Monoid[(A, B, C, D, E, F, G, H, I, J)] = new Tuple10Monoid[A, B, C, D, E, F, G, H, I, J]()( amonoid, bmonoid, @@ -4641,7 +4947,8 @@ trait GeneratedMonoidImplicits { gmonoid, hmonoid, imonoid, - jmonoid) + jmonoid + ) implicit def monoid11[A, B, C, D, E, F, G, H, I, J, K]( implicit amonoid: Monoid[A], @@ -4654,7 +4961,8 @@ trait GeneratedMonoidImplicits { hmonoid: Monoid[H], imonoid: Monoid[I], jmonoid: Monoid[J], - kmonoid: Monoid[K]): Monoid[(A, B, C, D, E, F, G, H, I, J, K)] = + kmonoid: Monoid[K] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K)] = new Tuple11Monoid[A, B, C, D, E, F, G, H, I, J, K]()( amonoid, bmonoid, @@ -4666,7 +4974,8 @@ trait GeneratedMonoidImplicits { hmonoid, imonoid, jmonoid, - kmonoid) + kmonoid + ) implicit def monoid12[A, B, C, D, E, F, G, H, I, J, K, L]( implicit amonoid: Monoid[A], @@ -4680,7 +4989,8 @@ trait GeneratedMonoidImplicits { imonoid: Monoid[I], jmonoid: Monoid[J], kmonoid: Monoid[K], - lmonoid: Monoid[L]): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L)] = + lmonoid: Monoid[L] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L)] = new Tuple12Monoid[A, B, C, D, E, F, G, H, I, J, K, L]()( amonoid, bmonoid, @@ -4693,7 +5003,8 @@ trait GeneratedMonoidImplicits { imonoid, jmonoid, kmonoid, - lmonoid) + lmonoid + ) implicit def monoid13[A, B, C, D, E, F, G, H, I, J, K, L, M]( implicit amonoid: Monoid[A], @@ -4708,7 +5019,8 @@ trait GeneratedMonoidImplicits { jmonoid: Monoid[J], kmonoid: Monoid[K], lmonoid: Monoid[L], - mmonoid: Monoid[M]): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M)] = + mmonoid: Monoid[M] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M)] = new Tuple13Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M]()( amonoid, bmonoid, @@ -4722,7 +5034,8 @@ trait GeneratedMonoidImplicits { jmonoid, kmonoid, lmonoid, - mmonoid) + mmonoid + ) implicit def monoid14[A, B, C, D, E, F, G, H, I, J, K, L, M, N]( implicit amonoid: Monoid[A], @@ -4738,7 +5051,8 @@ trait GeneratedMonoidImplicits { kmonoid: Monoid[K], lmonoid: Monoid[L], mmonoid: Monoid[M], - nmonoid: Monoid[N]): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = + nmonoid: Monoid[N] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = new Tuple14Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N]()( amonoid, bmonoid, @@ -4753,7 +5067,8 @@ trait GeneratedMonoidImplicits { kmonoid, lmonoid, mmonoid, - nmonoid) + nmonoid + ) implicit def monoid15[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( implicit amonoid: Monoid[A], @@ -4770,7 +5085,8 @@ trait GeneratedMonoidImplicits { lmonoid: Monoid[L], mmonoid: Monoid[M], nmonoid: Monoid[N], - omonoid: Monoid[O]): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = + omonoid: Monoid[O] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = new Tuple15Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]()( amonoid, bmonoid, @@ -4786,7 +5102,8 @@ trait GeneratedMonoidImplicits { lmonoid, mmonoid, nmonoid, - omonoid) + omonoid + ) implicit def monoid16[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( implicit amonoid: Monoid[A], @@ -4804,7 +5121,8 @@ trait GeneratedMonoidImplicits { mmonoid: Monoid[M], nmonoid: Monoid[N], omonoid: Monoid[O], - pmonoid: Monoid[P]): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = + pmonoid: Monoid[P] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = new Tuple16Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]()( amonoid, bmonoid, @@ -4821,7 +5139,8 @@ trait GeneratedMonoidImplicits { mmonoid, nmonoid, omonoid, - pmonoid) + pmonoid + ) implicit def monoid17[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( implicit amonoid: Monoid[A], @@ -4840,7 +5159,8 @@ trait GeneratedMonoidImplicits { nmonoid: Monoid[N], omonoid: Monoid[O], pmonoid: Monoid[P], - qmonoid: Monoid[Q]): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = + qmonoid: Monoid[Q] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = new Tuple17Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]()( amonoid, bmonoid, @@ -4858,7 +5178,8 @@ trait GeneratedMonoidImplicits { nmonoid, omonoid, pmonoid, - qmonoid) + qmonoid + ) implicit def monoid18[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( implicit amonoid: Monoid[A], @@ -4878,7 +5199,8 @@ trait GeneratedMonoidImplicits { omonoid: Monoid[O], pmonoid: Monoid[P], qmonoid: Monoid[Q], - rmonoid: Monoid[R]): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = + rmonoid: Monoid[R] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = new Tuple18Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]()( amonoid, bmonoid, @@ -4897,7 +5219,8 @@ trait GeneratedMonoidImplicits { omonoid, pmonoid, qmonoid, - rmonoid) + rmonoid + ) implicit def monoid19[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( implicit amonoid: Monoid[A], @@ -4918,7 +5241,8 @@ trait GeneratedMonoidImplicits { pmonoid: Monoid[P], qmonoid: Monoid[Q], rmonoid: Monoid[R], - smonoid: Monoid[S]): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = + smonoid: Monoid[S] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = new Tuple19Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]()( amonoid, bmonoid, @@ -4961,7 +5285,8 @@ trait GeneratedMonoidImplicits { qmonoid: Monoid[Q], rmonoid: Monoid[R], smonoid: Monoid[S], - tmonoid: Monoid[T]): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = + tmonoid: Monoid[T] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = new Tuple20Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]()( amonoid, bmonoid, @@ -5006,7 +5331,8 @@ trait GeneratedMonoidImplicits { rmonoid: Monoid[R], smonoid: Monoid[S], tmonoid: Monoid[T], - umonoid: Monoid[U]): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = + umonoid: Monoid[U] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = new Tuple21Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]()( amonoid, bmonoid, @@ -5053,7 +5379,8 @@ trait GeneratedMonoidImplicits { smonoid: Monoid[S], tmonoid: Monoid[T], umonoid: Monoid[U], - vmonoid: Monoid[V]): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = + vmonoid: Monoid[V] + ): Monoid[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = new Tuple22Monoid[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]()( amonoid, bmonoid, @@ -5085,60 +5412,74 @@ trait GeneratedGroupImplicits { implicit def group2[A, B](implicit agroup: Group[A], bgroup: Group[B]): Group[(A, B)] = new Tuple2Group[A, B]()(agroup, bgroup) - implicit def group3[A, B, C](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C]): Group[(A, B, C)] = + implicit def group3[A, B, C]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C] + ): Group[(A, B, C)] = new Tuple3Group[A, B, C]()(agroup, bgroup, cgroup) - implicit def group4[A, B, C, D](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D]): Group[(A, B, C, D)] = + implicit def group4[A, B, C, D]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D] + ): Group[(A, B, C, D)] = new Tuple4Group[A, B, C, D]()(agroup, bgroup, cgroup, dgroup) - implicit def group5[A, B, C, D, E](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E]): Group[(A, B, C, D, E)] = + implicit def group5[A, B, C, D, E]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E] + ): Group[(A, B, C, D, E)] = new Tuple5Group[A, B, C, D, E]()(agroup, bgroup, cgroup, dgroup, egroup) - implicit def group6[A, B, C, D, E, F](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F]): Group[(A, B, C, D, E, F)] = + implicit def group6[A, B, C, D, E, F]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F] + ): Group[(A, B, C, D, E, F)] = new Tuple6Group[A, B, C, D, E, F]()(agroup, bgroup, cgroup, dgroup, egroup, fgroup) - implicit def group7[A, B, C, D, E, F, G](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G]): Group[(A, B, C, D, E, F, G)] = + implicit def group7[A, B, C, D, E, F, G]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G] + ): Group[(A, B, C, D, E, F, G)] = new Tuple7Group[A, B, C, D, E, F, G]()(agroup, bgroup, cgroup, dgroup, egroup, fgroup, ggroup) - implicit def group8[A, B, C, D, E, F, G, H](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H]): Group[(A, B, C, D, E, F, G, H)] = + implicit def group8[A, B, C, D, E, F, G, H]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H] + ): Group[(A, B, C, D, E, F, G, H)] = new Tuple8Group[A, B, C, D, E, F, G, H]()(agroup, bgroup, cgroup, dgroup, egroup, fgroup, ggroup, hgroup) - implicit def group9[A, B, C, D, E, F, G, H, I](implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I]): Group[(A, B, C, D, E, F, G, H, I)] = + implicit def group9[A, B, C, D, E, F, G, H, I]( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I] + ): Group[(A, B, C, D, E, F, G, H, I)] = new Tuple9Group[A, B, C, D, E, F, G, H, I]()( agroup, bgroup, @@ -5148,7 +5489,8 @@ trait GeneratedGroupImplicits { fgroup, ggroup, hgroup, - igroup) + igroup + ) implicit def group10[A, B, C, D, E, F, G, H, I, J]( implicit agroup: Group[A], @@ -5160,7 +5502,8 @@ trait GeneratedGroupImplicits { ggroup: Group[G], hgroup: Group[H], igroup: Group[I], - jgroup: Group[J]): Group[(A, B, C, D, E, F, G, H, I, J)] = + jgroup: Group[J] + ): Group[(A, B, C, D, E, F, G, H, I, J)] = new Tuple10Group[A, B, C, D, E, F, G, H, I, J]()( agroup, bgroup, @@ -5171,7 +5514,8 @@ trait GeneratedGroupImplicits { ggroup, hgroup, igroup, - jgroup) + jgroup + ) implicit def group11[A, B, C, D, E, F, G, H, I, J, K]( implicit agroup: Group[A], @@ -5184,7 +5528,8 @@ trait GeneratedGroupImplicits { hgroup: Group[H], igroup: Group[I], jgroup: Group[J], - kgroup: Group[K]): Group[(A, B, C, D, E, F, G, H, I, J, K)] = + kgroup: Group[K] + ): Group[(A, B, C, D, E, F, G, H, I, J, K)] = new Tuple11Group[A, B, C, D, E, F, G, H, I, J, K]()( agroup, bgroup, @@ -5196,7 +5541,8 @@ trait GeneratedGroupImplicits { hgroup, igroup, jgroup, - kgroup) + kgroup + ) implicit def group12[A, B, C, D, E, F, G, H, I, J, K, L]( implicit agroup: Group[A], @@ -5210,7 +5556,8 @@ trait GeneratedGroupImplicits { igroup: Group[I], jgroup: Group[J], kgroup: Group[K], - lgroup: Group[L]): Group[(A, B, C, D, E, F, G, H, I, J, K, L)] = + lgroup: Group[L] + ): Group[(A, B, C, D, E, F, G, H, I, J, K, L)] = new Tuple12Group[A, B, C, D, E, F, G, H, I, J, K, L]()( agroup, bgroup, @@ -5223,7 +5570,8 @@ trait GeneratedGroupImplicits { igroup, jgroup, kgroup, - lgroup) + lgroup + ) implicit def group13[A, B, C, D, E, F, G, H, I, J, K, L, M]( implicit agroup: Group[A], @@ -5238,7 +5586,8 @@ trait GeneratedGroupImplicits { jgroup: Group[J], kgroup: Group[K], lgroup: Group[L], - mgroup: Group[M]): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M)] = + mgroup: Group[M] + ): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M)] = new Tuple13Group[A, B, C, D, E, F, G, H, I, J, K, L, M]()( agroup, bgroup, @@ -5252,7 +5601,8 @@ trait GeneratedGroupImplicits { jgroup, kgroup, lgroup, - mgroup) + mgroup + ) implicit def group14[A, B, C, D, E, F, G, H, I, J, K, L, M, N]( implicit agroup: Group[A], @@ -5268,7 +5618,8 @@ trait GeneratedGroupImplicits { kgroup: Group[K], lgroup: Group[L], mgroup: Group[M], - ngroup: Group[N]): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = + ngroup: Group[N] + ): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = new Tuple14Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N]()( agroup, bgroup, @@ -5283,7 +5634,8 @@ trait GeneratedGroupImplicits { kgroup, lgroup, mgroup, - ngroup) + ngroup + ) implicit def group15[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( implicit agroup: Group[A], @@ -5300,7 +5652,8 @@ trait GeneratedGroupImplicits { lgroup: Group[L], mgroup: Group[M], ngroup: Group[N], - ogroup: Group[O]): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = + ogroup: Group[O] + ): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = new Tuple15Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]()( agroup, bgroup, @@ -5316,7 +5669,8 @@ trait GeneratedGroupImplicits { lgroup, mgroup, ngroup, - ogroup) + ogroup + ) implicit def group16[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( implicit agroup: Group[A], @@ -5334,7 +5688,8 @@ trait GeneratedGroupImplicits { mgroup: Group[M], ngroup: Group[N], ogroup: Group[O], - pgroup: Group[P]): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = + pgroup: Group[P] + ): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = new Tuple16Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]()( agroup, bgroup, @@ -5351,7 +5706,8 @@ trait GeneratedGroupImplicits { mgroup, ngroup, ogroup, - pgroup) + pgroup + ) implicit def group17[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( implicit agroup: Group[A], @@ -5370,7 +5726,8 @@ trait GeneratedGroupImplicits { ngroup: Group[N], ogroup: Group[O], pgroup: Group[P], - qgroup: Group[Q]): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = + qgroup: Group[Q] + ): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = new Tuple17Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]()( agroup, bgroup, @@ -5388,7 +5745,8 @@ trait GeneratedGroupImplicits { ngroup, ogroup, pgroup, - qgroup) + qgroup + ) implicit def group18[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( implicit agroup: Group[A], @@ -5408,7 +5766,8 @@ trait GeneratedGroupImplicits { ogroup: Group[O], pgroup: Group[P], qgroup: Group[Q], - rgroup: Group[R]): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = + rgroup: Group[R] + ): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = new Tuple18Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]()( agroup, bgroup, @@ -5427,7 +5786,8 @@ trait GeneratedGroupImplicits { ogroup, pgroup, qgroup, - rgroup) + rgroup + ) implicit def group19[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( implicit agroup: Group[A], @@ -5448,7 +5808,8 @@ trait GeneratedGroupImplicits { pgroup: Group[P], qgroup: Group[Q], rgroup: Group[R], - sgroup: Group[S]): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = + sgroup: Group[S] + ): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = new Tuple19Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]()( agroup, bgroup, @@ -5468,7 +5829,8 @@ trait GeneratedGroupImplicits { pgroup, qgroup, rgroup, - sgroup) + sgroup + ) implicit def group20[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( implicit agroup: Group[A], @@ -5490,7 +5852,8 @@ trait GeneratedGroupImplicits { qgroup: Group[Q], rgroup: Group[R], sgroup: Group[S], - tgroup: Group[T]): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = + tgroup: Group[T] + ): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = new Tuple20Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]()( agroup, bgroup, @@ -5511,7 +5874,8 @@ trait GeneratedGroupImplicits { qgroup, rgroup, sgroup, - tgroup) + tgroup + ) implicit def group21[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( implicit agroup: Group[A], @@ -5534,7 +5898,8 @@ trait GeneratedGroupImplicits { rgroup: Group[R], sgroup: Group[S], tgroup: Group[T], - ugroup: Group[U]): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = + ugroup: Group[U] + ): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = new Tuple21Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]()( agroup, bgroup, @@ -5556,7 +5921,8 @@ trait GeneratedGroupImplicits { rgroup, sgroup, tgroup, - ugroup) + ugroup + ) implicit def group22[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( implicit agroup: Group[A], @@ -5580,7 +5946,8 @@ trait GeneratedGroupImplicits { sgroup: Group[S], tgroup: Group[T], ugroup: Group[U], - vgroup: Group[V]): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = + vgroup: Group[V] + ): Group[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = new Tuple22Group[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]()( agroup, bgroup, @@ -5615,67 +5982,81 @@ trait GeneratedRingImplicits { implicit def ring3[A, B, C](implicit aring: Ring[A], bring: Ring[B], cring: Ring[C]): Ring[(A, B, C)] = new Tuple3Ring[A, B, C]()(aring, bring, cring) - implicit def ring4[A, B, C, D](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D]): Ring[(A, B, C, D)] = + implicit def ring4[A, B, C, D]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D] + ): Ring[(A, B, C, D)] = new Tuple4Ring[A, B, C, D]()(aring, bring, cring, dring) - implicit def ring5[A, B, C, D, E](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E]): Ring[(A, B, C, D, E)] = + implicit def ring5[A, B, C, D, E]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E] + ): Ring[(A, B, C, D, E)] = new Tuple5Ring[A, B, C, D, E]()(aring, bring, cring, dring, ering) - implicit def ring6[A, B, C, D, E, F](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F]): Ring[(A, B, C, D, E, F)] = + implicit def ring6[A, B, C, D, E, F]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F] + ): Ring[(A, B, C, D, E, F)] = new Tuple6Ring[A, B, C, D, E, F]()(aring, bring, cring, dring, ering, fring) - implicit def ring7[A, B, C, D, E, F, G](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G]): Ring[(A, B, C, D, E, F, G)] = + implicit def ring7[A, B, C, D, E, F, G]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G] + ): Ring[(A, B, C, D, E, F, G)] = new Tuple7Ring[A, B, C, D, E, F, G]()(aring, bring, cring, dring, ering, fring, gring) - implicit def ring8[A, B, C, D, E, F, G, H](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H]): Ring[(A, B, C, D, E, F, G, H)] = + implicit def ring8[A, B, C, D, E, F, G, H]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H] + ): Ring[(A, B, C, D, E, F, G, H)] = new Tuple8Ring[A, B, C, D, E, F, G, H]()(aring, bring, cring, dring, ering, fring, gring, hring) - implicit def ring9[A, B, C, D, E, F, G, H, I](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I]): Ring[(A, B, C, D, E, F, G, H, I)] = + implicit def ring9[A, B, C, D, E, F, G, H, I]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I] + ): Ring[(A, B, C, D, E, F, G, H, I)] = new Tuple9Ring[A, B, C, D, E, F, G, H, I]()(aring, bring, cring, dring, ering, fring, gring, hring, iring) - implicit def ring10[A, B, C, D, E, F, G, H, I, J](implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J]): Ring[(A, B, C, D, E, F, G, H, I, J)] = + implicit def ring10[A, B, C, D, E, F, G, H, I, J]( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J] + ): Ring[(A, B, C, D, E, F, G, H, I, J)] = new Tuple10Ring[A, B, C, D, E, F, G, H, I, J]()( aring, bring, @@ -5686,7 +6067,8 @@ trait GeneratedRingImplicits { gring, hring, iring, - jring) + jring + ) implicit def ring11[A, B, C, D, E, F, G, H, I, J, K]( implicit aring: Ring[A], @@ -5699,7 +6081,8 @@ trait GeneratedRingImplicits { hring: Ring[H], iring: Ring[I], jring: Ring[J], - kring: Ring[K]): Ring[(A, B, C, D, E, F, G, H, I, J, K)] = + kring: Ring[K] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K)] = new Tuple11Ring[A, B, C, D, E, F, G, H, I, J, K]()( aring, bring, @@ -5711,7 +6094,8 @@ trait GeneratedRingImplicits { hring, iring, jring, - kring) + kring + ) implicit def ring12[A, B, C, D, E, F, G, H, I, J, K, L]( implicit aring: Ring[A], @@ -5725,7 +6109,8 @@ trait GeneratedRingImplicits { iring: Ring[I], jring: Ring[J], kring: Ring[K], - lring: Ring[L]): Ring[(A, B, C, D, E, F, G, H, I, J, K, L)] = + lring: Ring[L] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K, L)] = new Tuple12Ring[A, B, C, D, E, F, G, H, I, J, K, L]()( aring, bring, @@ -5738,7 +6123,8 @@ trait GeneratedRingImplicits { iring, jring, kring, - lring) + lring + ) implicit def ring13[A, B, C, D, E, F, G, H, I, J, K, L, M]( implicit aring: Ring[A], @@ -5753,7 +6139,8 @@ trait GeneratedRingImplicits { jring: Ring[J], kring: Ring[K], lring: Ring[L], - mring: Ring[M]): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M)] = + mring: Ring[M] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M)] = new Tuple13Ring[A, B, C, D, E, F, G, H, I, J, K, L, M]()( aring, bring, @@ -5767,7 +6154,8 @@ trait GeneratedRingImplicits { jring, kring, lring, - mring) + mring + ) implicit def ring14[A, B, C, D, E, F, G, H, I, J, K, L, M, N]( implicit aring: Ring[A], @@ -5783,7 +6171,8 @@ trait GeneratedRingImplicits { kring: Ring[K], lring: Ring[L], mring: Ring[M], - nring: Ring[N]): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = + nring: Ring[N] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = new Tuple14Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N]()( aring, bring, @@ -5798,7 +6187,8 @@ trait GeneratedRingImplicits { kring, lring, mring, - nring) + nring + ) implicit def ring15[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( implicit aring: Ring[A], @@ -5815,7 +6205,8 @@ trait GeneratedRingImplicits { lring: Ring[L], mring: Ring[M], nring: Ring[N], - oring: Ring[O]): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = + oring: Ring[O] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = new Tuple15Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]()( aring, bring, @@ -5831,7 +6222,8 @@ trait GeneratedRingImplicits { lring, mring, nring, - oring) + oring + ) implicit def ring16[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( implicit aring: Ring[A], @@ -5849,7 +6241,8 @@ trait GeneratedRingImplicits { mring: Ring[M], nring: Ring[N], oring: Ring[O], - pring: Ring[P]): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = + pring: Ring[P] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = new Tuple16Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]()( aring, bring, @@ -5866,7 +6259,8 @@ trait GeneratedRingImplicits { mring, nring, oring, - pring) + pring + ) implicit def ring17[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( implicit aring: Ring[A], @@ -5885,7 +6279,8 @@ trait GeneratedRingImplicits { nring: Ring[N], oring: Ring[O], pring: Ring[P], - qring: Ring[Q]): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = + qring: Ring[Q] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = new Tuple17Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]()( aring, bring, @@ -5903,7 +6298,8 @@ trait GeneratedRingImplicits { nring, oring, pring, - qring) + qring + ) implicit def ring18[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( implicit aring: Ring[A], @@ -5923,7 +6319,8 @@ trait GeneratedRingImplicits { oring: Ring[O], pring: Ring[P], qring: Ring[Q], - rring: Ring[R]): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = + rring: Ring[R] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = new Tuple18Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]()( aring, bring, @@ -5942,7 +6339,8 @@ trait GeneratedRingImplicits { oring, pring, qring, - rring) + rring + ) implicit def ring19[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( implicit aring: Ring[A], @@ -5963,7 +6361,8 @@ trait GeneratedRingImplicits { pring: Ring[P], qring: Ring[Q], rring: Ring[R], - sring: Ring[S]): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = + sring: Ring[S] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = new Tuple19Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]()( aring, bring, @@ -5983,7 +6382,8 @@ trait GeneratedRingImplicits { pring, qring, rring, - sring) + sring + ) implicit def ring20[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( implicit aring: Ring[A], @@ -6005,7 +6405,8 @@ trait GeneratedRingImplicits { qring: Ring[Q], rring: Ring[R], sring: Ring[S], - tring: Ring[T]): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = + tring: Ring[T] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = new Tuple20Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]()( aring, bring, @@ -6026,7 +6427,8 @@ trait GeneratedRingImplicits { qring, rring, sring, - tring) + tring + ) implicit def ring21[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( implicit aring: Ring[A], @@ -6049,7 +6451,8 @@ trait GeneratedRingImplicits { rring: Ring[R], sring: Ring[S], tring: Ring[T], - uring: Ring[U]): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = + uring: Ring[U] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = new Tuple21Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]()( aring, bring, @@ -6071,7 +6474,8 @@ trait GeneratedRingImplicits { rring, sring, tring, - uring) + uring + ) implicit def ring22[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( implicit aring: Ring[A], @@ -6095,7 +6499,8 @@ trait GeneratedRingImplicits { sring: Ring[S], tring: Ring[T], uring: Ring[U], - vring: Ring[V]): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = + vring: Ring[V] + ): Ring[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = new Tuple22Ring[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]()( aring, bring, @@ -6118,6 +6523,7 @@ trait GeneratedRingImplicits { sring, tring, uring, - vring) + vring + ) } diff --git a/algebird-core/src/main/scala/com/twitter/algebird/GeneratedProductAlgebra.scala b/algebird-core/src/main/scala/com/twitter/algebird/GeneratedProductAlgebra.scala index 320136ebd..e62b90043 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/GeneratedProductAlgebra.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/GeneratedProductAlgebra.scala @@ -8,8 +8,8 @@ import ArrayBufferedOperation.fromSumOption */ class Product2Semigroup[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)])( implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B]) - extends Semigroup[X] { + bsemigroup: Semigroup[B] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply(asemigroup.plus(lTuple._1, rTuple._1), bsemigroup.plus(lTuple._2, rTuple._2)) @@ -30,9 +30,10 @@ class Product2Semigroup[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B) /** * Combine 2 monoids into a product monoid */ -class Product2Monoid[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B]) - extends Product2Semigroup[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)]) +class Product2Monoid[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)])( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B] +) extends Product2Semigroup[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)]) with Monoid[X] { override def zero = apply(amonoid.zero, bmonoid.zero) } @@ -40,9 +41,10 @@ class Product2Monoid[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)])( /** * Combine 2 groups into a product group */ -class Product2Group[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)])(implicit agroup: Group[A], - bgroup: Group[B]) - extends Product2Monoid[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)]) +class Product2Group[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)])( + implicit agroup: Group[A], + bgroup: Group[B] +) extends Product2Monoid[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)]) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -57,9 +59,10 @@ class Product2Group[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)])(i /** * Combine 2 rings into a product ring */ -class Product2Ring[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)])(implicit aring: Ring[A], - bring: Ring[B]) - extends Product2Group[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)]) +class Product2Ring[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)])( + implicit aring: Ring[A], + bring: Ring[B] +) extends Product2Group[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)]) with Ring[X] { override def one = apply(aring.one, bring.one) override def times(l: X, r: X) = { @@ -74,14 +77,15 @@ class Product2Ring[X, A, B](apply: (A, B) => X, unapply: X => Option[(A, B)])(im class Product3Semigroup[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, B, C)])( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], - csemigroup: Semigroup[C]) - extends Semigroup[X] { + csemigroup: Semigroup[C] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( asemigroup.plus(lTuple._1, rTuple._1), bsemigroup.plus(lTuple._2, rTuple._2), - csemigroup.plus(lTuple._3, rTuple._3)) + csemigroup.plus(lTuple._3, rTuple._3) + ) } override def sumOption(to: TraversableOnce[X]) = if (to.isEmpty) None @@ -103,8 +107,8 @@ class Product3Semigroup[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[ class Product3Monoid[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, B, C)])( implicit amonoid: Monoid[A], bmonoid: Monoid[B], - cmonoid: Monoid[C]) - extends Product3Semigroup[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, B, C)]) + cmonoid: Monoid[C] +) extends Product3Semigroup[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, B, C)]) with Monoid[X] { override def zero = apply(amonoid.zero, bmonoid.zero, cmonoid.zero) } @@ -115,8 +119,8 @@ class Product3Monoid[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, class Product3Group[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, B, C)])( implicit agroup: Group[A], bgroup: Group[B], - cgroup: Group[C]) - extends Product3Monoid[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, B, C)]) + cgroup: Group[C] +) extends Product3Monoid[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, B, C)]) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -127,7 +131,8 @@ class Product3Group[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, apply( agroup.minus(lTuple._1, rTuple._1), bgroup.minus(lTuple._2, rTuple._2), - cgroup.minus(lTuple._3, rTuple._3)) + cgroup.minus(lTuple._3, rTuple._3) + ) } } @@ -137,8 +142,8 @@ class Product3Group[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, class Product3Ring[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, B, C)])( implicit aring: Ring[A], bring: Ring[B], - cring: Ring[C]) - extends Product3Group[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, B, C)]) + cring: Ring[C] +) extends Product3Group[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, B, C)]) with Ring[X] { override def one = apply(aring.one, bring.one, cring.one) override def times(l: X, r: X) = { @@ -146,7 +151,8 @@ class Product3Ring[X, A, B, C](apply: (A, B, C) => X, unapply: X => Option[(A, B apply( aring.times(lTuple._1, rTuple._1), bring.times(lTuple._2, rTuple._2), - cring.times(lTuple._3, rTuple._3)) + cring.times(lTuple._3, rTuple._3) + ) } } @@ -157,15 +163,16 @@ class Product4Semigroup[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => O implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], - dsemigroup: Semigroup[D]) - extends Semigroup[X] { + dsemigroup: Semigroup[D] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( asemigroup.plus(lTuple._1, rTuple._1), bsemigroup.plus(lTuple._2, rTuple._2), csemigroup.plus(lTuple._3, rTuple._3), - dsemigroup.plus(lTuple._4, rTuple._4)) + dsemigroup.plus(lTuple._4, rTuple._4) + ) } override def sumOption(to: TraversableOnce[X]) = if (to.isEmpty) None @@ -190,8 +197,8 @@ class Product4Monoid[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => Opti implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], - dmonoid: Monoid[D]) - extends Product4Semigroup[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => Option[(A, B, C, D)]) + dmonoid: Monoid[D] +) extends Product4Semigroup[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => Option[(A, B, C, D)]) with Monoid[X] { override def zero = apply(amonoid.zero, bmonoid.zero, cmonoid.zero, dmonoid.zero) @@ -204,8 +211,8 @@ class Product4Group[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => Optio implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], - dgroup: Group[D]) - extends Product4Monoid[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => Option[(A, B, C, D)]) + dgroup: Group[D] +) extends Product4Monoid[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => Option[(A, B, C, D)]) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -217,7 +224,8 @@ class Product4Group[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => Optio agroup.minus(lTuple._1, rTuple._1), bgroup.minus(lTuple._2, rTuple._2), cgroup.minus(lTuple._3, rTuple._3), - dgroup.minus(lTuple._4, rTuple._4)) + dgroup.minus(lTuple._4, rTuple._4) + ) } } @@ -228,8 +236,8 @@ class Product4Ring[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => Option implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], - dring: Ring[D]) - extends Product4Group[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => Option[(A, B, C, D)]) + dring: Ring[D] +) extends Product4Group[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => Option[(A, B, C, D)]) with Ring[X] { override def one = apply(aring.one, bring.one, cring.one, dring.one) override def times(l: X, r: X) = { @@ -238,7 +246,8 @@ class Product4Ring[X, A, B, C, D](apply: (A, B, C, D) => X, unapply: X => Option aring.times(lTuple._1, rTuple._1), bring.times(lTuple._2, rTuple._2), cring.times(lTuple._3, rTuple._3), - dring.times(lTuple._4, rTuple._4)) + dring.times(lTuple._4, rTuple._4) + ) } } @@ -250,8 +259,8 @@ class Product5Semigroup[X, A, B, C, D, E](apply: (A, B, C, D, E) => X, unapply: bsemigroup: Semigroup[B], csemigroup: Semigroup[C], dsemigroup: Semigroup[D], - esemigroup: Semigroup[E]) - extends Semigroup[X] { + esemigroup: Semigroup[E] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -287,10 +296,11 @@ class Product5Monoid[X, A, B, C, D, E](apply: (A, B, C, D, E) => X, unapply: X = bmonoid: Monoid[B], cmonoid: Monoid[C], dmonoid: Monoid[D], - emonoid: Monoid[E]) - extends Product5Semigroup[X, A, B, C, D, E]( + emonoid: Monoid[E] +) extends Product5Semigroup[X, A, B, C, D, E]( apply: (A, B, C, D, E) => X, - unapply: X => Option[(A, B, C, D, E)]) + unapply: X => Option[(A, B, C, D, E)] + ) with Monoid[X] { override def zero = apply(amonoid.zero, bmonoid.zero, cmonoid.zero, dmonoid.zero, emonoid.zero) @@ -304,10 +314,11 @@ class Product5Group[X, A, B, C, D, E](apply: (A, B, C, D, E) => X, unapply: X => bgroup: Group[B], cgroup: Group[C], dgroup: Group[D], - egroup: Group[E]) - extends Product5Monoid[X, A, B, C, D, E]( + egroup: Group[E] +) extends Product5Monoid[X, A, B, C, D, E]( apply: (A, B, C, D, E) => X, - unapply: X => Option[(A, B, C, D, E)]) + unapply: X => Option[(A, B, C, D, E)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -316,7 +327,8 @@ class Product5Group[X, A, B, C, D, E](apply: (A, B, C, D, E) => X, unapply: X => bgroup.negate(tuple._2), cgroup.negate(tuple._3), dgroup.negate(tuple._4), - egroup.negate(tuple._5)) + egroup.negate(tuple._5) + ) } override def minus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; @@ -338,10 +350,11 @@ class Product5Ring[X, A, B, C, D, E](apply: (A, B, C, D, E) => X, unapply: X => bring: Ring[B], cring: Ring[C], dring: Ring[D], - ering: Ring[E]) - extends Product5Group[X, A, B, C, D, E]( + ering: Ring[E] +) extends Product5Group[X, A, B, C, D, E]( apply: (A, B, C, D, E) => X, - unapply: X => Option[(A, B, C, D, E)]) + unapply: X => Option[(A, B, C, D, E)] + ) with Ring[X] { override def one = apply(aring.one, bring.one, cring.one, dring.one, ering.one) @@ -360,15 +373,17 @@ class Product5Ring[X, A, B, C, D, E](apply: (A, B, C, D, E) => X, unapply: X => /** * Combine 6 semigroups into a product semigroup */ -class Product6Semigroup[X, A, B, C, D, E, F](apply: (A, B, C, D, E, F) => X, - unapply: X => Option[(A, B, C, D, E, F)])( +class Product6Semigroup[X, A, B, C, D, E, F]( + apply: (A, B, C, D, E, F) => X, + unapply: X => Option[(A, B, C, D, E, F)] +)( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], dsemigroup: Semigroup[D], esemigroup: Semigroup[E], - fsemigroup: Semigroup[F]) - extends Semigroup[X] { + fsemigroup: Semigroup[F] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -395,24 +410,28 @@ class Product6Semigroup[X, A, B, C, D, E, F](apply: (A, B, C, D, E, F) => X, bufD.put(tuple._4); bufE.put(tuple._5); bufF.put(tuple._6) } Some( - apply(bufA.flush.get, bufB.flush.get, bufC.flush.get, bufD.flush.get, bufE.flush.get, bufF.flush.get)) + apply(bufA.flush.get, bufB.flush.get, bufC.flush.get, bufD.flush.get, bufE.flush.get, bufF.flush.get) + ) } } /** * Combine 6 monoids into a product monoid */ -class Product6Monoid[X, A, B, C, D, E, F](apply: (A, B, C, D, E, F) => X, - unapply: X => Option[(A, B, C, D, E, F)])( +class Product6Monoid[X, A, B, C, D, E, F]( + apply: (A, B, C, D, E, F) => X, + unapply: X => Option[(A, B, C, D, E, F)] +)( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], dmonoid: Monoid[D], emonoid: Monoid[E], - fmonoid: Monoid[F]) - extends Product6Semigroup[X, A, B, C, D, E, F]( + fmonoid: Monoid[F] +) extends Product6Semigroup[X, A, B, C, D, E, F]( apply: (A, B, C, D, E, F) => X, - unapply: X => Option[(A, B, C, D, E, F)]) + unapply: X => Option[(A, B, C, D, E, F)] + ) with Monoid[X] { override def zero = apply(amonoid.zero, bmonoid.zero, cmonoid.zero, dmonoid.zero, emonoid.zero, fmonoid.zero) @@ -421,16 +440,20 @@ class Product6Monoid[X, A, B, C, D, E, F](apply: (A, B, C, D, E, F) => X, /** * Combine 6 groups into a product group */ -class Product6Group[X, A, B, C, D, E, F](apply: (A, B, C, D, E, F) => X, - unapply: X => Option[(A, B, C, D, E, F)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F]) - extends Product6Monoid[X, A, B, C, D, E, F]( +class Product6Group[X, A, B, C, D, E, F]( + apply: (A, B, C, D, E, F) => X, + unapply: X => Option[(A, B, C, D, E, F)] +)( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F] +) extends Product6Monoid[X, A, B, C, D, E, F]( apply: (A, B, C, D, E, F) => X, - unapply: X => Option[(A, B, C, D, E, F)]) + unapply: X => Option[(A, B, C, D, E, F)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -440,7 +463,8 @@ class Product6Group[X, A, B, C, D, E, F](apply: (A, B, C, D, E, F) => X, cgroup.negate(tuple._3), dgroup.negate(tuple._4), egroup.negate(tuple._5), - fgroup.negate(tuple._6)) + fgroup.negate(tuple._6) + ) } override def minus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; @@ -458,16 +482,14 @@ class Product6Group[X, A, B, C, D, E, F](apply: (A, B, C, D, E, F) => X, /** * Combine 6 rings into a product ring */ -class Product6Ring[X, A, B, C, D, E, F](apply: (A, B, C, D, E, F) => X, - unapply: X => Option[(A, B, C, D, E, F)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F]) +class Product6Ring[X, A, B, C, D, E, F]( + apply: (A, B, C, D, E, F) => X, + unapply: X => Option[(A, B, C, D, E, F)] +)(implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], dring: Ring[D], ering: Ring[E], fring: Ring[F]) extends Product6Group[X, A, B, C, D, E, F]( apply: (A, B, C, D, E, F) => X, - unapply: X => Option[(A, B, C, D, E, F)]) + unapply: X => Option[(A, B, C, D, E, F)] + ) with Ring[X] { override def one = apply(aring.one, bring.one, cring.one, dring.one, ering.one, fring.one) @@ -487,16 +509,18 @@ class Product6Ring[X, A, B, C, D, E, F](apply: (A, B, C, D, E, F) => X, /** * Combine 7 semigroups into a product semigroup */ -class Product7Semigroup[X, A, B, C, D, E, F, G](apply: (A, B, C, D, E, F, G) => X, - unapply: X => Option[(A, B, C, D, E, F, G)])( +class Product7Semigroup[X, A, B, C, D, E, F, G]( + apply: (A, B, C, D, E, F, G) => X, + unapply: X => Option[(A, B, C, D, E, F, G)] +)( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], dsemigroup: Semigroup[D], esemigroup: Semigroup[E], fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G]) - extends Semigroup[X] { + gsemigroup: Semigroup[G] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -533,25 +557,30 @@ class Product7Semigroup[X, A, B, C, D, E, F, G](apply: (A, B, C, D, E, F, G) => bufD.flush.get, bufE.flush.get, bufF.flush.get, - bufG.flush.get)) + bufG.flush.get + ) + ) } } /** * Combine 7 monoids into a product monoid */ -class Product7Monoid[X, A, B, C, D, E, F, G](apply: (A, B, C, D, E, F, G) => X, - unapply: X => Option[(A, B, C, D, E, F, G)])( +class Product7Monoid[X, A, B, C, D, E, F, G]( + apply: (A, B, C, D, E, F, G) => X, + unapply: X => Option[(A, B, C, D, E, F, G)] +)( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], dmonoid: Monoid[D], emonoid: Monoid[E], fmonoid: Monoid[F], - gmonoid: Monoid[G]) - extends Product7Semigroup[X, A, B, C, D, E, F, G]( + gmonoid: Monoid[G] +) extends Product7Semigroup[X, A, B, C, D, E, F, G]( apply: (A, B, C, D, E, F, G) => X, - unapply: X => Option[(A, B, C, D, E, F, G)]) + unapply: X => Option[(A, B, C, D, E, F, G)] + ) with Monoid[X] { override def zero = apply(amonoid.zero, bmonoid.zero, cmonoid.zero, dmonoid.zero, emonoid.zero, fmonoid.zero, gmonoid.zero) @@ -560,18 +589,21 @@ class Product7Monoid[X, A, B, C, D, E, F, G](apply: (A, B, C, D, E, F, G) => X, /** * Combine 7 groups into a product group */ -class Product7Group[X, A, B, C, D, E, F, G](apply: (A, B, C, D, E, F, G) => X, - unapply: X => Option[(A, B, C, D, E, F, G)])( +class Product7Group[X, A, B, C, D, E, F, G]( + apply: (A, B, C, D, E, F, G) => X, + unapply: X => Option[(A, B, C, D, E, F, G)] +)( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], dgroup: Group[D], egroup: Group[E], fgroup: Group[F], - ggroup: Group[G]) - extends Product7Monoid[X, A, B, C, D, E, F, G]( + ggroup: Group[G] +) extends Product7Monoid[X, A, B, C, D, E, F, G]( apply: (A, B, C, D, E, F, G) => X, - unapply: X => Option[(A, B, C, D, E, F, G)]) + unapply: X => Option[(A, B, C, D, E, F, G)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -602,18 +634,21 @@ class Product7Group[X, A, B, C, D, E, F, G](apply: (A, B, C, D, E, F, G) => X, /** * Combine 7 rings into a product ring */ -class Product7Ring[X, A, B, C, D, E, F, G](apply: (A, B, C, D, E, F, G) => X, - unapply: X => Option[(A, B, C, D, E, F, G)])( +class Product7Ring[X, A, B, C, D, E, F, G]( + apply: (A, B, C, D, E, F, G) => X, + unapply: X => Option[(A, B, C, D, E, F, G)] +)( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], dring: Ring[D], ering: Ring[E], fring: Ring[F], - gring: Ring[G]) - extends Product7Group[X, A, B, C, D, E, F, G]( + gring: Ring[G] +) extends Product7Group[X, A, B, C, D, E, F, G]( apply: (A, B, C, D, E, F, G) => X, - unapply: X => Option[(A, B, C, D, E, F, G)]) + unapply: X => Option[(A, B, C, D, E, F, G)] + ) with Ring[X] { override def one = apply(aring.one, bring.one, cring.one, dring.one, ering.one, fring.one, gring.one) @@ -634,8 +669,10 @@ class Product7Ring[X, A, B, C, D, E, F, G](apply: (A, B, C, D, E, F, G) => X, /** * Combine 8 semigroups into a product semigroup */ -class Product8Semigroup[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, H) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H)])( +class Product8Semigroup[X, A, B, C, D, E, F, G, H]( + apply: (A, B, C, D, E, F, G, H) => X, + unapply: X => Option[(A, B, C, D, E, F, G, H)] +)( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -643,8 +680,8 @@ class Product8Semigroup[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, esemigroup: Semigroup[E], fsemigroup: Semigroup[F], gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H]) - extends Semigroup[X] { + hsemigroup: Semigroup[H] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -684,15 +721,19 @@ class Product8Semigroup[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, bufE.flush.get, bufF.flush.get, bufG.flush.get, - bufH.flush.get)) + bufH.flush.get + ) + ) } } /** * Combine 8 monoids into a product monoid */ -class Product8Monoid[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, H) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H)])( +class Product8Monoid[X, A, B, C, D, E, F, G, H]( + apply: (A, B, C, D, E, F, G, H) => X, + unapply: X => Option[(A, B, C, D, E, F, G, H)] +)( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -700,10 +741,11 @@ class Product8Monoid[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, H) emonoid: Monoid[E], fmonoid: Monoid[F], gmonoid: Monoid[G], - hmonoid: Monoid[H]) - extends Product8Semigroup[X, A, B, C, D, E, F, G, H]( + hmonoid: Monoid[H] +) extends Product8Semigroup[X, A, B, C, D, E, F, G, H]( apply: (A, B, C, D, E, F, G, H) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H)]) + unapply: X => Option[(A, B, C, D, E, F, G, H)] + ) with Monoid[X] { override def zero = apply( @@ -714,14 +756,17 @@ class Product8Monoid[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, H) emonoid.zero, fmonoid.zero, gmonoid.zero, - hmonoid.zero) + hmonoid.zero + ) } /** * Combine 8 groups into a product group */ -class Product8Group[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, H) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H)])( +class Product8Group[X, A, B, C, D, E, F, G, H]( + apply: (A, B, C, D, E, F, G, H) => X, + unapply: X => Option[(A, B, C, D, E, F, G, H)] +)( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -729,10 +774,11 @@ class Product8Group[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, H) = egroup: Group[E], fgroup: Group[F], ggroup: Group[G], - hgroup: Group[H]) - extends Product8Monoid[X, A, B, C, D, E, F, G, H]( + hgroup: Group[H] +) extends Product8Monoid[X, A, B, C, D, E, F, G, H]( apply: (A, B, C, D, E, F, G, H) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H)]) + unapply: X => Option[(A, B, C, D, E, F, G, H)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -765,8 +811,10 @@ class Product8Group[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, H) = /** * Combine 8 rings into a product ring */ -class Product8Ring[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, H) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H)])( +class Product8Ring[X, A, B, C, D, E, F, G, H]( + apply: (A, B, C, D, E, F, G, H) => X, + unapply: X => Option[(A, B, C, D, E, F, G, H)] +)( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -774,10 +822,11 @@ class Product8Ring[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, H) => ering: Ring[E], fring: Ring[F], gring: Ring[G], - hring: Ring[H]) - extends Product8Group[X, A, B, C, D, E, F, G, H]( + hring: Ring[H] +) extends Product8Group[X, A, B, C, D, E, F, G, H]( apply: (A, B, C, D, E, F, G, H) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H)]) + unapply: X => Option[(A, B, C, D, E, F, G, H)] + ) with Ring[X] { override def one = apply(aring.one, bring.one, cring.one, dring.one, ering.one, fring.one, gring.one, hring.one) @@ -799,8 +848,10 @@ class Product8Ring[X, A, B, C, D, E, F, G, H](apply: (A, B, C, D, E, F, G, H) => /** * Combine 9 semigroups into a product semigroup */ -class Product9Semigroup[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, G, H, I) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I)])( +class Product9Semigroup[X, A, B, C, D, E, F, G, H, I]( + apply: (A, B, C, D, E, F, G, H, I) => X, + unapply: X => Option[(A, B, C, D, E, F, G, H, I)] +)( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -809,8 +860,8 @@ class Product9Semigroup[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, fsemigroup: Semigroup[F], gsemigroup: Semigroup[G], hsemigroup: Semigroup[H], - isemigroup: Semigroup[I]) - extends Semigroup[X] { + isemigroup: Semigroup[I] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -853,15 +904,19 @@ class Product9Semigroup[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, bufF.flush.get, bufG.flush.get, bufH.flush.get, - bufI.flush.get)) + bufI.flush.get + ) + ) } } /** * Combine 9 monoids into a product monoid */ -class Product9Monoid[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, G, H, I) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I)])( +class Product9Monoid[X, A, B, C, D, E, F, G, H, I]( + apply: (A, B, C, D, E, F, G, H, I) => X, + unapply: X => Option[(A, B, C, D, E, F, G, H, I)] +)( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -870,10 +925,11 @@ class Product9Monoid[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, G, fmonoid: Monoid[F], gmonoid: Monoid[G], hmonoid: Monoid[H], - imonoid: Monoid[I]) - extends Product9Semigroup[X, A, B, C, D, E, F, G, H, I]( + imonoid: Monoid[I] +) extends Product9Semigroup[X, A, B, C, D, E, F, G, H, I]( apply: (A, B, C, D, E, F, G, H, I) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I)] + ) with Monoid[X] { override def zero = apply( @@ -885,14 +941,17 @@ class Product9Monoid[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, G, fmonoid.zero, gmonoid.zero, hmonoid.zero, - imonoid.zero) + imonoid.zero + ) } /** * Combine 9 groups into a product group */ -class Product9Group[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, G, H, I) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I)])( +class Product9Group[X, A, B, C, D, E, F, G, H, I]( + apply: (A, B, C, D, E, F, G, H, I) => X, + unapply: X => Option[(A, B, C, D, E, F, G, H, I)] +)( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -901,10 +960,11 @@ class Product9Group[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, G, H fgroup: Group[F], ggroup: Group[G], hgroup: Group[H], - igroup: Group[I]) - extends Product9Monoid[X, A, B, C, D, E, F, G, H, I]( + igroup: Group[I] +) extends Product9Monoid[X, A, B, C, D, E, F, G, H, I]( apply: (A, B, C, D, E, F, G, H, I) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -939,8 +999,10 @@ class Product9Group[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, G, H /** * Combine 9 rings into a product ring */ -class Product9Ring[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, G, H, I) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I)])( +class Product9Ring[X, A, B, C, D, E, F, G, H, I]( + apply: (A, B, C, D, E, F, G, H, I) => X, + unapply: X => Option[(A, B, C, D, E, F, G, H, I)] +)( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -949,10 +1011,11 @@ class Product9Ring[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, G, H, fring: Ring[F], gring: Ring[G], hring: Ring[H], - iring: Ring[I]) - extends Product9Group[X, A, B, C, D, E, F, G, H, I]( + iring: Ring[I] +) extends Product9Group[X, A, B, C, D, E, F, G, H, I]( apply: (A, B, C, D, E, F, G, H, I) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I)] + ) with Ring[X] { override def one = apply(aring.one, bring.one, cring.one, dring.one, ering.one, fring.one, gring.one, hring.one, iring.one) @@ -977,17 +1040,19 @@ class Product9Ring[X, A, B, C, D, E, F, G, H, I](apply: (A, B, C, D, E, F, G, H, */ class Product10Semigroup[X, A, B, C, D, E, F, G, H, I, J]( apply: (A, B, C, D, E, F, G, H, I, J) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)])(implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J]) - extends Semigroup[X] { + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)] +)( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -1034,15 +1099,19 @@ class Product10Semigroup[X, A, B, C, D, E, F, G, H, I, J]( bufG.flush.get, bufH.flush.get, bufI.flush.get, - bufJ.flush.get)) + bufJ.flush.get + ) + ) } } /** * Combine 10 monoids into a product monoid */ -class Product10Monoid[X, A, B, C, D, E, F, G, H, I, J](apply: (A, B, C, D, E, F, G, H, I, J) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)])( +class Product10Monoid[X, A, B, C, D, E, F, G, H, I, J]( + apply: (A, B, C, D, E, F, G, H, I, J) => X, + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)] +)( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -1052,10 +1121,11 @@ class Product10Monoid[X, A, B, C, D, E, F, G, H, I, J](apply: (A, B, C, D, E, F, gmonoid: Monoid[G], hmonoid: Monoid[H], imonoid: Monoid[I], - jmonoid: Monoid[J]) - extends Product10Semigroup[X, A, B, C, D, E, F, G, H, I, J]( + jmonoid: Monoid[J] +) extends Product10Semigroup[X, A, B, C, D, E, F, G, H, I, J]( apply: (A, B, C, D, E, F, G, H, I, J) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)] + ) with Monoid[X] { override def zero = apply( @@ -1068,14 +1138,17 @@ class Product10Monoid[X, A, B, C, D, E, F, G, H, I, J](apply: (A, B, C, D, E, F, gmonoid.zero, hmonoid.zero, imonoid.zero, - jmonoid.zero) + jmonoid.zero + ) } /** * Combine 10 groups into a product group */ -class Product10Group[X, A, B, C, D, E, F, G, H, I, J](apply: (A, B, C, D, E, F, G, H, I, J) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)])( +class Product10Group[X, A, B, C, D, E, F, G, H, I, J]( + apply: (A, B, C, D, E, F, G, H, I, J) => X, + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)] +)( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -1085,10 +1158,11 @@ class Product10Group[X, A, B, C, D, E, F, G, H, I, J](apply: (A, B, C, D, E, F, ggroup: Group[G], hgroup: Group[H], igroup: Group[I], - jgroup: Group[J]) - extends Product10Monoid[X, A, B, C, D, E, F, G, H, I, J]( + jgroup: Group[J] +) extends Product10Monoid[X, A, B, C, D, E, F, G, H, I, J]( apply: (A, B, C, D, E, F, G, H, I, J) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -1125,8 +1199,10 @@ class Product10Group[X, A, B, C, D, E, F, G, H, I, J](apply: (A, B, C, D, E, F, /** * Combine 10 rings into a product ring */ -class Product10Ring[X, A, B, C, D, E, F, G, H, I, J](apply: (A, B, C, D, E, F, G, H, I, J) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)])( +class Product10Ring[X, A, B, C, D, E, F, G, H, I, J]( + apply: (A, B, C, D, E, F, G, H, I, J) => X, + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)] +)( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -1136,10 +1212,11 @@ class Product10Ring[X, A, B, C, D, E, F, G, H, I, J](apply: (A, B, C, D, E, F, G gring: Ring[G], hring: Ring[H], iring: Ring[I], - jring: Ring[J]) - extends Product10Group[X, A, B, C, D, E, F, G, H, I, J]( + jring: Ring[J] +) extends Product10Group[X, A, B, C, D, E, F, G, H, I, J]( apply: (A, B, C, D, E, F, G, H, I, J) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J)] + ) with Ring[X] { override def one = apply( @@ -1152,7 +1229,8 @@ class Product10Ring[X, A, B, C, D, E, F, G, H, I, J](apply: (A, B, C, D, E, F, G gring.one, hring.one, iring.one, - jring.one) + jring.one + ) override def times(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -1175,18 +1253,20 @@ class Product10Ring[X, A, B, C, D, E, F, G, H, I, J](apply: (A, B, C, D, E, F, G */ class Product11Semigroup[X, A, B, C, D, E, F, G, H, I, J, K]( apply: (A, B, C, D, E, F, G, H, I, J, K) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)])(implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K]) - extends Semigroup[X] { + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)] +)( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -1237,7 +1317,8 @@ class Product11Semigroup[X, A, B, C, D, E, F, G, H, I, J, K]( bufI.flush.get, bufJ.flush.get, bufK.flush.get - )) + ) + ) } } @@ -1246,20 +1327,23 @@ class Product11Semigroup[X, A, B, C, D, E, F, G, H, I, J, K]( */ class Product11Monoid[X, A, B, C, D, E, F, G, H, I, J, K]( apply: (A, B, C, D, E, F, G, H, I, J, K) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K]) - extends Product11Semigroup[X, A, B, C, D, E, F, G, H, I, J, K]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)] +)( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K] +) extends Product11Semigroup[X, A, B, C, D, E, F, G, H, I, J, K]( apply: (A, B, C, D, E, F, G, H, I, J, K) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)] + ) with Monoid[X] { override def zero = apply( @@ -1273,7 +1357,8 @@ class Product11Monoid[X, A, B, C, D, E, F, G, H, I, J, K]( hmonoid.zero, imonoid.zero, jmonoid.zero, - kmonoid.zero) + kmonoid.zero + ) } /** @@ -1281,20 +1366,23 @@ class Product11Monoid[X, A, B, C, D, E, F, G, H, I, J, K]( */ class Product11Group[X, A, B, C, D, E, F, G, H, I, J, K]( apply: (A, B, C, D, E, F, G, H, I, J, K) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K]) - extends Product11Monoid[X, A, B, C, D, E, F, G, H, I, J, K]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)] +)( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K] +) extends Product11Monoid[X, A, B, C, D, E, F, G, H, I, J, K]( apply: (A, B, C, D, E, F, G, H, I, J, K) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -1335,20 +1423,23 @@ class Product11Group[X, A, B, C, D, E, F, G, H, I, J, K]( */ class Product11Ring[X, A, B, C, D, E, F, G, H, I, J, K]( apply: (A, B, C, D, E, F, G, H, I, J, K) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K]) - extends Product11Group[X, A, B, C, D, E, F, G, H, I, J, K]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)] +)( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K] +) extends Product11Group[X, A, B, C, D, E, F, G, H, I, J, K]( apply: (A, B, C, D, E, F, G, H, I, J, K) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K)] + ) with Ring[X] { override def one = apply( @@ -1362,7 +1453,8 @@ class Product11Ring[X, A, B, C, D, E, F, G, H, I, J, K]( hring.one, iring.one, jring.one, - kring.one) + kring.one + ) override def times(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -1386,19 +1478,21 @@ class Product11Ring[X, A, B, C, D, E, F, G, H, I, J, K]( */ class Product12Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L]( apply: (A, B, C, D, E, F, G, H, I, J, K, L) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)])(implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L]) - extends Semigroup[X] { + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)] +)( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -1452,7 +1546,8 @@ class Product12Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L]( bufJ.flush.get, bufK.flush.get, bufL.flush.get - )) + ) + ) } } @@ -1461,21 +1556,24 @@ class Product12Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L]( */ class Product12Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L]( apply: (A, B, C, D, E, F, G, H, I, J, K, L) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L]) - extends Product12Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)] +)( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L] +) extends Product12Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L]( apply: (A, B, C, D, E, F, G, H, I, J, K, L) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)] + ) with Monoid[X] { override def zero = apply( @@ -1499,21 +1597,24 @@ class Product12Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L]( */ class Product12Group[X, A, B, C, D, E, F, G, H, I, J, K, L]( apply: (A, B, C, D, E, F, G, H, I, J, K, L) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L]) - extends Product12Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)] +)( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L] +) extends Product12Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L]( apply: (A, B, C, D, E, F, G, H, I, J, K, L) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -1556,21 +1657,24 @@ class Product12Group[X, A, B, C, D, E, F, G, H, I, J, K, L]( */ class Product12Ring[X, A, B, C, D, E, F, G, H, I, J, K, L]( apply: (A, B, C, D, E, F, G, H, I, J, K, L) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L]) - extends Product12Group[X, A, B, C, D, E, F, G, H, I, J, K, L]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)] +)( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L] +) extends Product12Group[X, A, B, C, D, E, F, G, H, I, J, K, L]( apply: (A, B, C, D, E, F, G, H, I, J, K, L) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)] + ) with Ring[X] { override def one = apply( @@ -1585,7 +1689,8 @@ class Product12Ring[X, A, B, C, D, E, F, G, H, I, J, K, L]( iring.one, jring.one, kring.one, - lring.one) + lring.one + ) override def times(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -1610,20 +1715,22 @@ class Product12Ring[X, A, B, C, D, E, F, G, H, I, J, K, L]( */ class Product13Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)])(implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L], - msemigroup: Semigroup[M]) - extends Semigroup[X] { + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)] +)( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L], + msemigroup: Semigroup[M] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -1681,7 +1788,8 @@ class Product13Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( bufK.flush.get, bufL.flush.get, bufM.flush.get - )) + ) + ) } } @@ -1690,22 +1798,25 @@ class Product13Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( */ class Product13Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M]) - extends Product13Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)] +)( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M] +) extends Product13Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)] + ) with Monoid[X] { override def zero = apply( @@ -1730,22 +1841,25 @@ class Product13Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( */ class Product13Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M]) - extends Product13Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)] +)( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M] +) extends Product13Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -1790,22 +1904,25 @@ class Product13Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( */ class Product13Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M]) - extends Product13Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)] +)( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M] +) extends Product13Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)] + ) with Ring[X] { override def one = apply( @@ -1821,7 +1938,8 @@ class Product13Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( jring.one, kring.one, lring.one, - mring.one) + mring.one + ) override def times(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -1847,21 +1965,23 @@ class Product13Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( */ class Product14Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)])(implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L], - msemigroup: Semigroup[M], - nsemigroup: Semigroup[N]) - extends Semigroup[X] { + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] +)( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L], + msemigroup: Semigroup[M], + nsemigroup: Semigroup[N] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -1922,7 +2042,8 @@ class Product14Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( bufL.flush.get, bufM.flush.get, bufN.flush.get - )) + ) + ) } } @@ -1931,23 +2052,26 @@ class Product14Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( */ class Product14Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N]) - extends Product14Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] +)( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N] +) extends Product14Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] + ) with Monoid[X] { override def zero = apply( @@ -1973,23 +2097,26 @@ class Product14Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( */ class Product14Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N]) - extends Product14Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] +)( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N] +) extends Product14Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -2036,23 +2163,26 @@ class Product14Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( */ class Product14Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N]) - extends Product14Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] +)( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N] +) extends Product14Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] + ) with Ring[X] { override def one = apply( @@ -2069,7 +2199,8 @@ class Product14Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( kring.one, lring.one, mring.one, - nring.one) + nring.one + ) override def times(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -2096,27 +2227,29 @@ class Product14Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( */ class Product15Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)])(implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L], - msemigroup: Semigroup[M], - nsemigroup: Semigroup[N], - osemigroup: Semigroup[O]) - extends Semigroup[X] { - override def plus(l: X, r: X) = { - val lTuple = unapply(l).get; val rTuple = unapply(r).get; - apply( - asemigroup.plus(lTuple._1, rTuple._1), - bsemigroup.plus(lTuple._2, rTuple._2), + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] +)( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L], + msemigroup: Semigroup[M], + nsemigroup: Semigroup[N], + osemigroup: Semigroup[O] +) extends Semigroup[X] { + override def plus(l: X, r: X) = { + val lTuple = unapply(l).get; val rTuple = unapply(r).get; + apply( + asemigroup.plus(lTuple._1, rTuple._1), + bsemigroup.plus(lTuple._2, rTuple._2), csemigroup.plus(lTuple._3, rTuple._3), dsemigroup.plus(lTuple._4, rTuple._4), esemigroup.plus(lTuple._5, rTuple._5), @@ -2175,7 +2308,8 @@ class Product15Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( bufM.flush.get, bufN.flush.get, bufO.flush.get - )) + ) + ) } } @@ -2184,24 +2318,27 @@ class Product15Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( */ class Product15Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N], - omonoid: Monoid[O]) - extends Product15Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] +)( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N], + omonoid: Monoid[O] +) extends Product15Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] + ) with Monoid[X] { override def zero = apply( @@ -2228,24 +2365,27 @@ class Product15Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( */ class Product15Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O]) - extends Product15Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] +)( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O] +) extends Product15Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -2294,24 +2434,27 @@ class Product15Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( */ class Product15Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O]) - extends Product15Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] +)( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O] +) extends Product15Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] + ) with Ring[X] { override def one = apply( @@ -2329,7 +2472,8 @@ class Product15Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( lring.one, mring.one, nring.one, - oring.one) + oring.one + ) override def times(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -2357,23 +2501,25 @@ class Product15Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( */ class Product16Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)])(implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L], - msemigroup: Semigroup[M], - nsemigroup: Semigroup[N], - osemigroup: Semigroup[O], - psemigroup: Semigroup[P]) - extends Semigroup[X] { + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] +)( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L], + msemigroup: Semigroup[M], + nsemigroup: Semigroup[N], + osemigroup: Semigroup[O], + psemigroup: Semigroup[P] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -2441,7 +2587,8 @@ class Product16Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( bufN.flush.get, bufO.flush.get, bufP.flush.get - )) + ) + ) } } @@ -2450,25 +2597,28 @@ class Product16Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( */ class Product16Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N], - omonoid: Monoid[O], - pmonoid: Monoid[P]) - extends Product16Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] +)( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N], + omonoid: Monoid[O], + pmonoid: Monoid[P] +) extends Product16Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] + ) with Monoid[X] { override def zero = apply( @@ -2496,25 +2646,28 @@ class Product16Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( */ class Product16Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O], - pgroup: Group[P]) - extends Product16Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] +)( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O], + pgroup: Group[P] +) extends Product16Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -2565,25 +2718,28 @@ class Product16Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( */ class Product16Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P]) - extends Product16Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] +)( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P] +) extends Product16Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] + ) with Ring[X] { override def one = apply( @@ -2632,7 +2788,8 @@ class Product16Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( */ class Product17Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] +)( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -2649,8 +2806,8 @@ class Product17Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( nsemigroup: Semigroup[N], osemigroup: Semigroup[O], psemigroup: Semigroup[P], - qsemigroup: Semigroup[Q]) - extends Semigroup[X] { + qsemigroup: Semigroup[Q] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -2721,7 +2878,8 @@ class Product17Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( bufO.flush.get, bufP.flush.get, bufQ.flush.get - )) + ) + ) } } @@ -2730,26 +2888,29 @@ class Product17Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( */ class Product17Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N], - omonoid: Monoid[O], - pmonoid: Monoid[P], - qmonoid: Monoid[Q]) - extends Product17Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] +)( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N], + omonoid: Monoid[O], + pmonoid: Monoid[P], + qmonoid: Monoid[Q] +) extends Product17Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] + ) with Monoid[X] { override def zero = apply( @@ -2778,26 +2939,29 @@ class Product17Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( */ class Product17Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O], - pgroup: Group[P], - qgroup: Group[Q]) - extends Product17Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] +)( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O], + pgroup: Group[P], + qgroup: Group[Q] +) extends Product17Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -2850,26 +3014,29 @@ class Product17Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( */ class Product17Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P], - qring: Ring[Q]) - extends Product17Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] +)( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P], + qring: Ring[Q] +) extends Product17Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] + ) with Ring[X] { override def one = apply( @@ -2920,7 +3087,8 @@ class Product17Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( */ class Product18Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] +)( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -2938,8 +3106,8 @@ class Product18Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R osemigroup: Semigroup[O], psemigroup: Semigroup[P], qsemigroup: Semigroup[Q], - rsemigroup: Semigroup[R]) - extends Semigroup[X] { + rsemigroup: Semigroup[R] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -3013,7 +3181,8 @@ class Product18Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R bufP.flush.get, bufQ.flush.get, bufR.flush.get - )) + ) + ) } } @@ -3022,27 +3191,30 @@ class Product18Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R */ class Product18Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N], - omonoid: Monoid[O], - pmonoid: Monoid[P], - qmonoid: Monoid[Q], - rmonoid: Monoid[R]) - extends Product18Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] +)( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N], + omonoid: Monoid[O], + pmonoid: Monoid[P], + qmonoid: Monoid[Q], + rmonoid: Monoid[R] +) extends Product18Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] + ) with Monoid[X] { override def zero = apply( @@ -3072,27 +3244,30 @@ class Product18Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( */ class Product18Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O], - pgroup: Group[P], - qgroup: Group[Q], - rgroup: Group[R]) - extends Product18Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] +)( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O], + pgroup: Group[P], + qgroup: Group[Q], + rgroup: Group[R] +) extends Product18Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -3147,27 +3322,30 @@ class Product18Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( */ class Product18Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P], - qring: Ring[Q], - rring: Ring[R]) - extends Product18Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] +)( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P], + qring: Ring[Q], + rring: Ring[R] +) extends Product18Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] + ) with Ring[X] { override def one = apply( @@ -3220,7 +3398,8 @@ class Product18Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( */ class Product19Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] +)( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -3239,8 +3418,8 @@ class Product19Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R psemigroup: Semigroup[P], qsemigroup: Semigroup[Q], rsemigroup: Semigroup[R], - ssemigroup: Semigroup[S]) - extends Semigroup[X] { + ssemigroup: Semigroup[S] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -3318,7 +3497,8 @@ class Product19Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R bufQ.flush.get, bufR.flush.get, bufS.flush.get - )) + ) + ) } } @@ -3327,7 +3507,8 @@ class Product19Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R */ class Product19Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] +)( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -3346,10 +3527,11 @@ class Product19Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S pmonoid: Monoid[P], qmonoid: Monoid[Q], rmonoid: Monoid[R], - smonoid: Monoid[S]) - extends Product19Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( + smonoid: Monoid[S] +) extends Product19Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] + ) with Monoid[X] { override def zero = apply( @@ -3380,7 +3562,8 @@ class Product19Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S */ class Product19Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] +)( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -3399,10 +3582,11 @@ class Product19Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] pgroup: Group[P], qgroup: Group[Q], rgroup: Group[R], - sgroup: Group[S]) - extends Product19Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( + sgroup: Group[S] +) extends Product19Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -3459,28 +3643,31 @@ class Product19Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] */ class Product19Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P], - qring: Ring[Q], - rring: Ring[R], - sring: Ring[S]) - extends Product19Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] +)( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P], + qring: Ring[Q], + rring: Ring[R], + sring: Ring[S] +) extends Product19Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] + ) with Ring[X] { override def one = apply( @@ -3535,7 +3722,8 @@ class Product19Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( */ class Product20Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] +)( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -3555,8 +3743,8 @@ class Product20Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R qsemigroup: Semigroup[Q], rsemigroup: Semigroup[R], ssemigroup: Semigroup[S], - tsemigroup: Semigroup[T]) - extends Semigroup[X] { + tsemigroup: Semigroup[T] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -3637,7 +3825,8 @@ class Product20Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R bufR.flush.get, bufS.flush.get, bufT.flush.get - )) + ) + ) } } @@ -3646,7 +3835,8 @@ class Product20Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R */ class Product20Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] +)( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -3666,10 +3856,11 @@ class Product20Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S qmonoid: Monoid[Q], rmonoid: Monoid[R], smonoid: Monoid[S], - tmonoid: Monoid[T]) - extends Product20Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( + tmonoid: Monoid[T] +) extends Product20Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] + ) with Monoid[X] { override def zero = apply( @@ -3701,7 +3892,8 @@ class Product20Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S */ class Product20Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] +)( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -3721,10 +3913,11 @@ class Product20Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, qgroup: Group[Q], rgroup: Group[R], sgroup: Group[S], - tgroup: Group[T]) - extends Product20Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( + tgroup: Group[T] +) extends Product20Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -3783,7 +3976,8 @@ class Product20Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, */ class Product20Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] +)( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -3803,10 +3997,11 @@ class Product20Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, qring: Ring[Q], rring: Ring[R], sring: Ring[S], - tring: Ring[T]) - extends Product20Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( + tring: Ring[T] +) extends Product20Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] + ) with Ring[X] { override def one = apply( @@ -3863,7 +4058,8 @@ class Product20Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, */ class Product21Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] +)( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -3884,8 +4080,8 @@ class Product21Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R rsemigroup: Semigroup[R], ssemigroup: Semigroup[S], tsemigroup: Semigroup[T], - usemigroup: Semigroup[U]) - extends Semigroup[X] { + usemigroup: Semigroup[U] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -3969,7 +4165,8 @@ class Product21Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R bufS.flush.get, bufT.flush.get, bufU.flush.get - )) + ) + ) } } @@ -3978,7 +4175,8 @@ class Product21Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R */ class Product21Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] +)( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -3999,10 +4197,11 @@ class Product21Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S rmonoid: Monoid[R], smonoid: Monoid[S], tmonoid: Monoid[T], - umonoid: Monoid[U]) - extends Product21Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( + umonoid: Monoid[U] +) extends Product21Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] + ) with Monoid[X] { override def zero = apply( @@ -4035,7 +4234,8 @@ class Product21Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S */ class Product21Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] +)( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -4056,10 +4256,11 @@ class Product21Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, rgroup: Group[R], sgroup: Group[S], tgroup: Group[T], - ugroup: Group[U]) - extends Product21Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( + ugroup: Group[U] +) extends Product21Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -4120,7 +4321,8 @@ class Product21Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, */ class Product21Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] +)( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -4141,10 +4343,11 @@ class Product21Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, rring: Ring[R], sring: Ring[S], tring: Ring[T], - uring: Ring[U]) - extends Product21Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( + uring: Ring[U] +) extends Product21Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] + ) with Ring[X] { override def one = apply( @@ -4203,7 +4406,8 @@ class Product21Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, */ class Product22Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] +)( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4225,8 +4429,8 @@ class Product22Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R ssemigroup: Semigroup[S], tsemigroup: Semigroup[T], usemigroup: Semigroup[U], - vsemigroup: Semigroup[V]) - extends Semigroup[X] { + vsemigroup: Semigroup[V] +) extends Semigroup[X] { override def plus(l: X, r: X) = { val lTuple = unapply(l).get; val rTuple = unapply(r).get; apply( @@ -4314,7 +4518,8 @@ class Product22Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R bufT.flush.get, bufU.flush.get, bufV.flush.get - )) + ) + ) } } @@ -4323,7 +4528,8 @@ class Product22Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R */ class Product22Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] +)( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -4345,10 +4551,11 @@ class Product22Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S smonoid: Monoid[S], tmonoid: Monoid[T], umonoid: Monoid[U], - vmonoid: Monoid[V]) - extends Product22Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( + vmonoid: Monoid[V] +) extends Product22Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] + ) with Monoid[X] { override def zero = apply( @@ -4382,7 +4589,8 @@ class Product22Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S */ class Product22Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] +)( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -4404,10 +4612,11 @@ class Product22Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, sgroup: Group[S], tgroup: Group[T], ugroup: Group[U], - vgroup: Group[V]) - extends Product22Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( + vgroup: Group[V] +) extends Product22Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] + ) with Group[X] { override def negate(v: X) = { val tuple = unapply(v).get; @@ -4470,7 +4679,8 @@ class Product22Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, */ class Product22Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)])( + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] +)( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -4492,10 +4702,11 @@ class Product22Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, sring: Ring[S], tring: Ring[T], uring: Ring[U], - vring: Ring[V]) - extends Product22Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( + vring: Ring[V] +) extends Product22Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( apply: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => X, - unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)]) + unapply: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] + ) with Ring[X] { override def one = apply( @@ -4552,22 +4763,24 @@ class Product22Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, } trait ProductSemigroups { - def apply[X, A, B](applyX: (A, B) => X, unapplyX: X => Option[(A, B)])( - implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B]): Semigroup[X] = + def apply[X, A, B]( + applyX: (A, B) => X, + unapplyX: X => Option[(A, B)] + )(implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B]): Semigroup[X] = new Product2Semigroup[X, A, B](applyX, unapplyX)(asemigroup, bsemigroup) - def apply[X, A, B, C](applyX: (A, B, C) => X, unapplyX: X => Option[(A, B, C)])( - implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C]): Semigroup[X] = + def apply[X, A, B, C]( + applyX: (A, B, C) => X, + unapplyX: X => Option[(A, B, C)] + )(implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C]): Semigroup[X] = new Product3Semigroup[X, A, B, C](applyX, unapplyX)(asemigroup, bsemigroup, csemigroup) def apply[X, A, B, C, D](applyX: (A, B, C, D) => X, unapplyX: X => Option[(A, B, C, D)])( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], - dsemigroup: Semigroup[D]): Semigroup[X] = + dsemigroup: Semigroup[D] + ): Semigroup[X] = new Product4Semigroup[X, A, B, C, D](applyX, unapplyX)(asemigroup, bsemigroup, csemigroup, dsemigroup) def apply[X, A, B, C, D, E](applyX: (A, B, C, D, E) => X, unapplyX: X => Option[(A, B, C, D, E)])( @@ -4575,13 +4788,15 @@ trait ProductSemigroups { bsemigroup: Semigroup[B], csemigroup: Semigroup[C], dsemigroup: Semigroup[D], - esemigroup: Semigroup[E]): Semigroup[X] = + esemigroup: Semigroup[E] + ): Semigroup[X] = new Product5Semigroup[X, A, B, C, D, E](applyX, unapplyX)( asemigroup, bsemigroup, csemigroup, dsemigroup, - esemigroup) + esemigroup + ) def apply[X, A, B, C, D, E, F](applyX: (A, B, C, D, E, F) => X, unapplyX: X => Option[(A, B, C, D, E, F)])( implicit asemigroup: Semigroup[A], @@ -4589,24 +4804,29 @@ trait ProductSemigroups { csemigroup: Semigroup[C], dsemigroup: Semigroup[D], esemigroup: Semigroup[E], - fsemigroup: Semigroup[F]): Semigroup[X] = + fsemigroup: Semigroup[F] + ): Semigroup[X] = new Product6Semigroup[X, A, B, C, D, E, F](applyX, unapplyX)( asemigroup, bsemigroup, csemigroup, dsemigroup, esemigroup, - fsemigroup) + fsemigroup + ) - def apply[X, A, B, C, D, E, F, G](applyX: (A, B, C, D, E, F, G) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G)])( + def apply[X, A, B, C, D, E, F, G]( + applyX: (A, B, C, D, E, F, G) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], dsemigroup: Semigroup[D], esemigroup: Semigroup[E], fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G]): Semigroup[X] = + gsemigroup: Semigroup[G] + ): Semigroup[X] = new Product7Semigroup[X, A, B, C, D, E, F, G](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4614,10 +4834,13 @@ trait ProductSemigroups { dsemigroup, esemigroup, fsemigroup, - gsemigroup) + gsemigroup + ) - def apply[X, A, B, C, D, E, F, G, H](applyX: (A, B, C, D, E, F, G, H) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H)])( + def apply[X, A, B, C, D, E, F, G, H]( + applyX: (A, B, C, D, E, F, G, H) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4625,7 +4848,8 @@ trait ProductSemigroups { esemigroup: Semigroup[E], fsemigroup: Semigroup[F], gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H]): Semigroup[X] = + hsemigroup: Semigroup[H] + ): Semigroup[X] = new Product8Semigroup[X, A, B, C, D, E, F, G, H](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4634,10 +4858,13 @@ trait ProductSemigroups { esemigroup, fsemigroup, gsemigroup, - hsemigroup) + hsemigroup + ) - def apply[X, A, B, C, D, E, F, G, H, I](applyX: (A, B, C, D, E, F, G, H, I) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I)])( + def apply[X, A, B, C, D, E, F, G, H, I]( + applyX: (A, B, C, D, E, F, G, H, I) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4646,7 +4873,8 @@ trait ProductSemigroups { fsemigroup: Semigroup[F], gsemigroup: Semigroup[G], hsemigroup: Semigroup[H], - isemigroup: Semigroup[I]): Semigroup[X] = + isemigroup: Semigroup[I] + ): Semigroup[X] = new Product9Semigroup[X, A, B, C, D, E, F, G, H, I](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4656,10 +4884,13 @@ trait ProductSemigroups { fsemigroup, gsemigroup, hsemigroup, - isemigroup) + isemigroup + ) - def apply[X, A, B, C, D, E, F, G, H, I, J](applyX: (A, B, C, D, E, F, G, H, I, J) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J)])( + def apply[X, A, B, C, D, E, F, G, H, I, J]( + applyX: (A, B, C, D, E, F, G, H, I, J) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4669,7 +4900,8 @@ trait ProductSemigroups { gsemigroup: Semigroup[G], hsemigroup: Semigroup[H], isemigroup: Semigroup[I], - jsemigroup: Semigroup[J]): Semigroup[X] = + jsemigroup: Semigroup[J] + ): Semigroup[X] = new Product10Semigroup[X, A, B, C, D, E, F, G, H, I, J](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4680,10 +4912,13 @@ trait ProductSemigroups { gsemigroup, hsemigroup, isemigroup, - jsemigroup) + jsemigroup + ) - def apply[X, A, B, C, D, E, F, G, H, I, J, K](applyX: (A, B, C, D, E, F, G, H, I, J, K) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K)])( + def apply[X, A, B, C, D, E, F, G, H, I, J, K]( + applyX: (A, B, C, D, E, F, G, H, I, J, K) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4694,7 +4929,8 @@ trait ProductSemigroups { hsemigroup: Semigroup[H], isemigroup: Semigroup[I], jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K]): Semigroup[X] = + ksemigroup: Semigroup[K] + ): Semigroup[X] = new Product11Semigroup[X, A, B, C, D, E, F, G, H, I, J, K](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4706,22 +4942,26 @@ trait ProductSemigroups { hsemigroup, isemigroup, jsemigroup, - ksemigroup) + ksemigroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)])(implicit asemigroup: Semigroup[A], - bsemigroup: Semigroup[B], - csemigroup: Semigroup[C], - dsemigroup: Semigroup[D], - esemigroup: Semigroup[E], - fsemigroup: Semigroup[F], - gsemigroup: Semigroup[G], - hsemigroup: Semigroup[H], - isemigroup: Semigroup[I], - jsemigroup: Semigroup[J], - ksemigroup: Semigroup[K], - lsemigroup: Semigroup[L]): Semigroup[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)] + )( + implicit asemigroup: Semigroup[A], + bsemigroup: Semigroup[B], + csemigroup: Semigroup[C], + dsemigroup: Semigroup[D], + esemigroup: Semigroup[E], + fsemigroup: Semigroup[F], + gsemigroup: Semigroup[G], + hsemigroup: Semigroup[H], + isemigroup: Semigroup[I], + jsemigroup: Semigroup[J], + ksemigroup: Semigroup[K], + lsemigroup: Semigroup[L] + ): Semigroup[X] = new Product12Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4734,11 +4974,13 @@ trait ProductSemigroups { isemigroup, jsemigroup, ksemigroup, - lsemigroup) + lsemigroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4751,7 +4993,8 @@ trait ProductSemigroups { jsemigroup: Semigroup[J], ksemigroup: Semigroup[K], lsemigroup: Semigroup[L], - msemigroup: Semigroup[M]): Semigroup[X] = + msemigroup: Semigroup[M] + ): Semigroup[X] = new Product13Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4765,11 +5008,13 @@ trait ProductSemigroups { jsemigroup, ksemigroup, lsemigroup, - msemigroup) + msemigroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4783,7 +5028,8 @@ trait ProductSemigroups { ksemigroup: Semigroup[K], lsemigroup: Semigroup[L], msemigroup: Semigroup[M], - nsemigroup: Semigroup[N]): Semigroup[X] = + nsemigroup: Semigroup[N] + ): Semigroup[X] = new Product14Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4803,7 +5049,8 @@ trait ProductSemigroups { def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4818,7 +5065,8 @@ trait ProductSemigroups { lsemigroup: Semigroup[L], msemigroup: Semigroup[M], nsemigroup: Semigroup[N], - osemigroup: Semigroup[O]): Semigroup[X] = + osemigroup: Semigroup[O] + ): Semigroup[X] = new Product15Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4839,7 +5087,8 @@ trait ProductSemigroups { def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4855,7 +5104,8 @@ trait ProductSemigroups { msemigroup: Semigroup[M], nsemigroup: Semigroup[N], osemigroup: Semigroup[O], - psemigroup: Semigroup[P]): Semigroup[X] = + psemigroup: Semigroup[P] + ): Semigroup[X] = new Product16Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4877,7 +5127,8 @@ trait ProductSemigroups { def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4894,7 +5145,8 @@ trait ProductSemigroups { nsemigroup: Semigroup[N], osemigroup: Semigroup[O], psemigroup: Semigroup[P], - qsemigroup: Semigroup[Q]): Semigroup[X] = + qsemigroup: Semigroup[Q] + ): Semigroup[X] = new Product17Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4917,7 +5169,8 @@ trait ProductSemigroups { def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4935,7 +5188,8 @@ trait ProductSemigroups { osemigroup: Semigroup[O], psemigroup: Semigroup[P], qsemigroup: Semigroup[Q], - rsemigroup: Semigroup[R]): Semigroup[X] = + rsemigroup: Semigroup[R] + ): Semigroup[X] = new Product18Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](applyX, unapplyX)( asemigroup, bsemigroup, @@ -4959,7 +5213,8 @@ trait ProductSemigroups { def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -4978,7 +5233,8 @@ trait ProductSemigroups { psemigroup: Semigroup[P], qsemigroup: Semigroup[Q], rsemigroup: Semigroup[R], - ssemigroup: Semigroup[S]): Semigroup[X] = + ssemigroup: Semigroup[S] + ): Semigroup[X] = new Product19Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](applyX, unapplyX)( asemigroup, bsemigroup, @@ -5003,7 +5259,8 @@ trait ProductSemigroups { def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -5023,7 +5280,8 @@ trait ProductSemigroups { qsemigroup: Semigroup[Q], rsemigroup: Semigroup[R], ssemigroup: Semigroup[S], - tsemigroup: Semigroup[T]): Semigroup[X] = + tsemigroup: Semigroup[T] + ): Semigroup[X] = new Product20Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](applyX, unapplyX)( asemigroup, bsemigroup, @@ -5049,7 +5307,8 @@ trait ProductSemigroups { def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -5070,10 +5329,12 @@ trait ProductSemigroups { rsemigroup: Semigroup[R], ssemigroup: Semigroup[S], tsemigroup: Semigroup[T], - usemigroup: Semigroup[U]): Semigroup[X] = + usemigroup: Semigroup[U] + ): Semigroup[X] = new Product21Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( applyX, - unapplyX)( + unapplyX + )( asemigroup, bsemigroup, csemigroup, @@ -5099,7 +5360,8 @@ trait ProductSemigroups { def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] + )( implicit asemigroup: Semigroup[A], bsemigroup: Semigroup[B], csemigroup: Semigroup[C], @@ -5121,10 +5383,12 @@ trait ProductSemigroups { ssemigroup: Semigroup[S], tsemigroup: Semigroup[T], usemigroup: Semigroup[U], - vsemigroup: Semigroup[V]): Semigroup[X] = + vsemigroup: Semigroup[V] + ): Semigroup[X] = new Product22Semigroup[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( applyX, - unapplyX)( + unapplyX + )( asemigroup, bsemigroup, csemigroup, @@ -5152,21 +5416,22 @@ trait ProductSemigroups { } trait ProductMonoids { - def apply[X, A, B](applyX: (A, B) => X, unapplyX: X => Option[(A, B)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B]): Monoid[X] = + def apply[X, A, B]( + applyX: (A, B) => X, + unapplyX: X => Option[(A, B)] + )(implicit amonoid: Monoid[A], bmonoid: Monoid[B]): Monoid[X] = new Product2Monoid[X, A, B](applyX, unapplyX)(amonoid, bmonoid) - def apply[X, A, B, C](applyX: (A, B, C) => X, unapplyX: X => Option[(A, B, C)])( - implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C]): Monoid[X] = + def apply[X, A, B, C]( + applyX: (A, B, C) => X, + unapplyX: X => Option[(A, B, C)] + )(implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C]): Monoid[X] = new Product3Monoid[X, A, B, C](applyX, unapplyX)(amonoid, bmonoid, cmonoid) - def apply[X, A, B, C, D](applyX: (A, B, C, D) => X, unapplyX: X => Option[(A, B, C, D)])( - implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D]): Monoid[X] = + def apply[X, A, B, C, D]( + applyX: (A, B, C, D) => X, + unapplyX: X => Option[(A, B, C, D)] + )(implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], dmonoid: Monoid[D]): Monoid[X] = new Product4Monoid[X, A, B, C, D](applyX, unapplyX)(amonoid, bmonoid, cmonoid, dmonoid) def apply[X, A, B, C, D, E](applyX: (A, B, C, D, E) => X, unapplyX: X => Option[(A, B, C, D, E)])( @@ -5174,7 +5439,8 @@ trait ProductMonoids { bmonoid: Monoid[B], cmonoid: Monoid[C], dmonoid: Monoid[D], - emonoid: Monoid[E]): Monoid[X] = + emonoid: Monoid[E] + ): Monoid[X] = new Product5Monoid[X, A, B, C, D, E](applyX, unapplyX)(amonoid, bmonoid, cmonoid, dmonoid, emonoid) def apply[X, A, B, C, D, E, F](applyX: (A, B, C, D, E, F) => X, unapplyX: X => Option[(A, B, C, D, E, F)])( @@ -5183,24 +5449,29 @@ trait ProductMonoids { cmonoid: Monoid[C], dmonoid: Monoid[D], emonoid: Monoid[E], - fmonoid: Monoid[F]): Monoid[X] = + fmonoid: Monoid[F] + ): Monoid[X] = new Product6Monoid[X, A, B, C, D, E, F](applyX, unapplyX)( amonoid, bmonoid, cmonoid, dmonoid, emonoid, - fmonoid) + fmonoid + ) - def apply[X, A, B, C, D, E, F, G](applyX: (A, B, C, D, E, F, G) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G)])( + def apply[X, A, B, C, D, E, F, G]( + applyX: (A, B, C, D, E, F, G) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], dmonoid: Monoid[D], emonoid: Monoid[E], fmonoid: Monoid[F], - gmonoid: Monoid[G]): Monoid[X] = + gmonoid: Monoid[G] + ): Monoid[X] = new Product7Monoid[X, A, B, C, D, E, F, G](applyX, unapplyX)( amonoid, bmonoid, @@ -5208,10 +5479,13 @@ trait ProductMonoids { dmonoid, emonoid, fmonoid, - gmonoid) + gmonoid + ) - def apply[X, A, B, C, D, E, F, G, H](applyX: (A, B, C, D, E, F, G, H) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H)])( + def apply[X, A, B, C, D, E, F, G, H]( + applyX: (A, B, C, D, E, F, G, H) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -5219,7 +5493,8 @@ trait ProductMonoids { emonoid: Monoid[E], fmonoid: Monoid[F], gmonoid: Monoid[G], - hmonoid: Monoid[H]): Monoid[X] = + hmonoid: Monoid[H] + ): Monoid[X] = new Product8Monoid[X, A, B, C, D, E, F, G, H](applyX, unapplyX)( amonoid, bmonoid, @@ -5228,10 +5503,13 @@ trait ProductMonoids { emonoid, fmonoid, gmonoid, - hmonoid) + hmonoid + ) - def apply[X, A, B, C, D, E, F, G, H, I](applyX: (A, B, C, D, E, F, G, H, I) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I)])( + def apply[X, A, B, C, D, E, F, G, H, I]( + applyX: (A, B, C, D, E, F, G, H, I) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -5240,7 +5518,8 @@ trait ProductMonoids { fmonoid: Monoid[F], gmonoid: Monoid[G], hmonoid: Monoid[H], - imonoid: Monoid[I]): Monoid[X] = + imonoid: Monoid[I] + ): Monoid[X] = new Product9Monoid[X, A, B, C, D, E, F, G, H, I](applyX, unapplyX)( amonoid, bmonoid, @@ -5250,10 +5529,13 @@ trait ProductMonoids { fmonoid, gmonoid, hmonoid, - imonoid) + imonoid + ) - def apply[X, A, B, C, D, E, F, G, H, I, J](applyX: (A, B, C, D, E, F, G, H, I, J) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J)])( + def apply[X, A, B, C, D, E, F, G, H, I, J]( + applyX: (A, B, C, D, E, F, G, H, I, J) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -5263,7 +5545,8 @@ trait ProductMonoids { gmonoid: Monoid[G], hmonoid: Monoid[H], imonoid: Monoid[I], - jmonoid: Monoid[J]): Monoid[X] = + jmonoid: Monoid[J] + ): Monoid[X] = new Product10Monoid[X, A, B, C, D, E, F, G, H, I, J](applyX, unapplyX)( amonoid, bmonoid, @@ -5274,10 +5557,13 @@ trait ProductMonoids { gmonoid, hmonoid, imonoid, - jmonoid) + jmonoid + ) - def apply[X, A, B, C, D, E, F, G, H, I, J, K](applyX: (A, B, C, D, E, F, G, H, I, J, K) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K)])( + def apply[X, A, B, C, D, E, F, G, H, I, J, K]( + applyX: (A, B, C, D, E, F, G, H, I, J, K) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -5288,7 +5574,8 @@ trait ProductMonoids { hmonoid: Monoid[H], imonoid: Monoid[I], jmonoid: Monoid[J], - kmonoid: Monoid[K]): Monoid[X] = + kmonoid: Monoid[K] + ): Monoid[X] = new Product11Monoid[X, A, B, C, D, E, F, G, H, I, J, K](applyX, unapplyX)( amonoid, bmonoid, @@ -5300,22 +5587,26 @@ trait ProductMonoids { hmonoid, imonoid, jmonoid, - kmonoid) + kmonoid + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L]): Monoid[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)] + )( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L] + ): Monoid[X] = new Product12Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L](applyX, unapplyX)( amonoid, bmonoid, @@ -5328,23 +5619,27 @@ trait ProductMonoids { imonoid, jmonoid, kmonoid, - lmonoid) + lmonoid + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M]): Monoid[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)] + )( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M] + ): Monoid[X] = new Product13Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M](applyX, unapplyX)( amonoid, bmonoid, @@ -5358,24 +5653,28 @@ trait ProductMonoids { jmonoid, kmonoid, lmonoid, - mmonoid) + mmonoid + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N]): Monoid[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] + )( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N] + ): Monoid[X] = new Product14Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N](applyX, unapplyX)( amonoid, bmonoid, @@ -5390,25 +5689,29 @@ trait ProductMonoids { kmonoid, lmonoid, mmonoid, - nmonoid) + nmonoid + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)])(implicit amonoid: Monoid[A], - bmonoid: Monoid[B], - cmonoid: Monoid[C], - dmonoid: Monoid[D], - emonoid: Monoid[E], - fmonoid: Monoid[F], - gmonoid: Monoid[G], - hmonoid: Monoid[H], - imonoid: Monoid[I], - jmonoid: Monoid[J], - kmonoid: Monoid[K], - lmonoid: Monoid[L], - mmonoid: Monoid[M], - nmonoid: Monoid[N], - omonoid: Monoid[O]): Monoid[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] + )( + implicit amonoid: Monoid[A], + bmonoid: Monoid[B], + cmonoid: Monoid[C], + dmonoid: Monoid[D], + emonoid: Monoid[E], + fmonoid: Monoid[F], + gmonoid: Monoid[G], + hmonoid: Monoid[H], + imonoid: Monoid[I], + jmonoid: Monoid[J], + kmonoid: Monoid[K], + lmonoid: Monoid[L], + mmonoid: Monoid[M], + nmonoid: Monoid[N], + omonoid: Monoid[O] + ): Monoid[X] = new Product15Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](applyX, unapplyX)( amonoid, bmonoid, @@ -5424,11 +5727,13 @@ trait ProductMonoids { lmonoid, mmonoid, nmonoid, - omonoid) + omonoid + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -5444,7 +5749,8 @@ trait ProductMonoids { mmonoid: Monoid[M], nmonoid: Monoid[N], omonoid: Monoid[O], - pmonoid: Monoid[P]): Monoid[X] = + pmonoid: Monoid[P] + ): Monoid[X] = new Product16Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](applyX, unapplyX)( amonoid, bmonoid, @@ -5461,11 +5767,13 @@ trait ProductMonoids { mmonoid, nmonoid, omonoid, - pmonoid) + pmonoid + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -5482,7 +5790,8 @@ trait ProductMonoids { nmonoid: Monoid[N], omonoid: Monoid[O], pmonoid: Monoid[P], - qmonoid: Monoid[Q]): Monoid[X] = + qmonoid: Monoid[Q] + ): Monoid[X] = new Product17Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](applyX, unapplyX)( amonoid, bmonoid, @@ -5500,11 +5809,13 @@ trait ProductMonoids { nmonoid, omonoid, pmonoid, - qmonoid) + qmonoid + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -5522,7 +5833,8 @@ trait ProductMonoids { omonoid: Monoid[O], pmonoid: Monoid[P], qmonoid: Monoid[Q], - rmonoid: Monoid[R]): Monoid[X] = + rmonoid: Monoid[R] + ): Monoid[X] = new Product18Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](applyX, unapplyX)( amonoid, bmonoid, @@ -5541,11 +5853,13 @@ trait ProductMonoids { omonoid, pmonoid, qmonoid, - rmonoid) + rmonoid + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -5564,7 +5878,8 @@ trait ProductMonoids { pmonoid: Monoid[P], qmonoid: Monoid[Q], rmonoid: Monoid[R], - smonoid: Monoid[S]): Monoid[X] = + smonoid: Monoid[S] + ): Monoid[X] = new Product19Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](applyX, unapplyX)( amonoid, bmonoid, @@ -5589,7 +5904,8 @@ trait ProductMonoids { def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -5609,7 +5925,8 @@ trait ProductMonoids { qmonoid: Monoid[Q], rmonoid: Monoid[R], smonoid: Monoid[S], - tmonoid: Monoid[T]): Monoid[X] = + tmonoid: Monoid[T] + ): Monoid[X] = new Product20Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](applyX, unapplyX)( amonoid, bmonoid, @@ -5635,7 +5952,8 @@ trait ProductMonoids { def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -5656,7 +5974,8 @@ trait ProductMonoids { rmonoid: Monoid[R], smonoid: Monoid[S], tmonoid: Monoid[T], - umonoid: Monoid[U]): Monoid[X] = + umonoid: Monoid[U] + ): Monoid[X] = new Product21Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](applyX, unapplyX)( amonoid, bmonoid, @@ -5683,7 +6002,8 @@ trait ProductMonoids { def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] + )( implicit amonoid: Monoid[A], bmonoid: Monoid[B], cmonoid: Monoid[C], @@ -5705,10 +6025,12 @@ trait ProductMonoids { smonoid: Monoid[S], tmonoid: Monoid[T], umonoid: Monoid[U], - vmonoid: Monoid[V]): Monoid[X] = + vmonoid: Monoid[V] + ): Monoid[X] = new Product22Monoid[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( applyX, - unapplyX)( + unapplyX + )( amonoid, bmonoid, cmonoid, @@ -5736,21 +6058,22 @@ trait ProductMonoids { } trait ProductGroups { - def apply[X, A, B](applyX: (A, B) => X, unapplyX: X => Option[(A, B)])(implicit agroup: Group[A], - bgroup: Group[B]): Group[X] = + def apply[X, A, B]( + applyX: (A, B) => X, + unapplyX: X => Option[(A, B)] + )(implicit agroup: Group[A], bgroup: Group[B]): Group[X] = new Product2Group[X, A, B](applyX, unapplyX)(agroup, bgroup) - def apply[X, A, B, C](applyX: (A, B, C) => X, unapplyX: X => Option[(A, B, C)])( - implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C]): Group[X] = + def apply[X, A, B, C]( + applyX: (A, B, C) => X, + unapplyX: X => Option[(A, B, C)] + )(implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C]): Group[X] = new Product3Group[X, A, B, C](applyX, unapplyX)(agroup, bgroup, cgroup) - def apply[X, A, B, C, D](applyX: (A, B, C, D) => X, unapplyX: X => Option[(A, B, C, D)])( - implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D]): Group[X] = + def apply[X, A, B, C, D]( + applyX: (A, B, C, D) => X, + unapplyX: X => Option[(A, B, C, D)] + )(implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], dgroup: Group[D]): Group[X] = new Product4Group[X, A, B, C, D](applyX, unapplyX)(agroup, bgroup, cgroup, dgroup) def apply[X, A, B, C, D, E](applyX: (A, B, C, D, E) => X, unapplyX: X => Option[(A, B, C, D, E)])( @@ -5758,7 +6081,8 @@ trait ProductGroups { bgroup: Group[B], cgroup: Group[C], dgroup: Group[D], - egroup: Group[E]): Group[X] = + egroup: Group[E] + ): Group[X] = new Product5Group[X, A, B, C, D, E](applyX, unapplyX)(agroup, bgroup, cgroup, dgroup, egroup) def apply[X, A, B, C, D, E, F](applyX: (A, B, C, D, E, F) => X, unapplyX: X => Option[(A, B, C, D, E, F)])( @@ -5767,18 +6091,22 @@ trait ProductGroups { cgroup: Group[C], dgroup: Group[D], egroup: Group[E], - fgroup: Group[F]): Group[X] = + fgroup: Group[F] + ): Group[X] = new Product6Group[X, A, B, C, D, E, F](applyX, unapplyX)(agroup, bgroup, cgroup, dgroup, egroup, fgroup) - def apply[X, A, B, C, D, E, F, G](applyX: (A, B, C, D, E, F, G) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G)])( + def apply[X, A, B, C, D, E, F, G]( + applyX: (A, B, C, D, E, F, G) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G)] + )( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], dgroup: Group[D], egroup: Group[E], fgroup: Group[F], - ggroup: Group[G]): Group[X] = + ggroup: Group[G] + ): Group[X] = new Product7Group[X, A, B, C, D, E, F, G](applyX, unapplyX)( agroup, bgroup, @@ -5786,10 +6114,13 @@ trait ProductGroups { dgroup, egroup, fgroup, - ggroup) + ggroup + ) - def apply[X, A, B, C, D, E, F, G, H](applyX: (A, B, C, D, E, F, G, H) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H)])( + def apply[X, A, B, C, D, E, F, G, H]( + applyX: (A, B, C, D, E, F, G, H) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H)] + )( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -5797,7 +6128,8 @@ trait ProductGroups { egroup: Group[E], fgroup: Group[F], ggroup: Group[G], - hgroup: Group[H]): Group[X] = + hgroup: Group[H] + ): Group[X] = new Product8Group[X, A, B, C, D, E, F, G, H](applyX, unapplyX)( agroup, bgroup, @@ -5806,10 +6138,13 @@ trait ProductGroups { egroup, fgroup, ggroup, - hgroup) + hgroup + ) - def apply[X, A, B, C, D, E, F, G, H, I](applyX: (A, B, C, D, E, F, G, H, I) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I)])( + def apply[X, A, B, C, D, E, F, G, H, I]( + applyX: (A, B, C, D, E, F, G, H, I) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I)] + )( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -5818,7 +6153,8 @@ trait ProductGroups { fgroup: Group[F], ggroup: Group[G], hgroup: Group[H], - igroup: Group[I]): Group[X] = + igroup: Group[I] + ): Group[X] = new Product9Group[X, A, B, C, D, E, F, G, H, I](applyX, unapplyX)( agroup, bgroup, @@ -5828,10 +6164,13 @@ trait ProductGroups { fgroup, ggroup, hgroup, - igroup) + igroup + ) - def apply[X, A, B, C, D, E, F, G, H, I, J](applyX: (A, B, C, D, E, F, G, H, I, J) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J)])( + def apply[X, A, B, C, D, E, F, G, H, I, J]( + applyX: (A, B, C, D, E, F, G, H, I, J) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J)] + )( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -5841,7 +6180,8 @@ trait ProductGroups { ggroup: Group[G], hgroup: Group[H], igroup: Group[I], - jgroup: Group[J]): Group[X] = + jgroup: Group[J] + ): Group[X] = new Product10Group[X, A, B, C, D, E, F, G, H, I, J](applyX, unapplyX)( agroup, bgroup, @@ -5852,10 +6192,13 @@ trait ProductGroups { ggroup, hgroup, igroup, - jgroup) + jgroup + ) - def apply[X, A, B, C, D, E, F, G, H, I, J, K](applyX: (A, B, C, D, E, F, G, H, I, J, K) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K)])( + def apply[X, A, B, C, D, E, F, G, H, I, J, K]( + applyX: (A, B, C, D, E, F, G, H, I, J, K) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K)] + )( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -5866,7 +6209,8 @@ trait ProductGroups { hgroup: Group[H], igroup: Group[I], jgroup: Group[J], - kgroup: Group[K]): Group[X] = + kgroup: Group[K] + ): Group[X] = new Product11Group[X, A, B, C, D, E, F, G, H, I, J, K](applyX, unapplyX)( agroup, bgroup, @@ -5878,22 +6222,26 @@ trait ProductGroups { hgroup, igroup, jgroup, - kgroup) + kgroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L]): Group[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)] + )( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L] + ): Group[X] = new Product12Group[X, A, B, C, D, E, F, G, H, I, J, K, L](applyX, unapplyX)( agroup, bgroup, @@ -5906,23 +6254,27 @@ trait ProductGroups { igroup, jgroup, kgroup, - lgroup) + lgroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M]): Group[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)] + )( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M] + ): Group[X] = new Product13Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M](applyX, unapplyX)( agroup, bgroup, @@ -5936,24 +6288,28 @@ trait ProductGroups { jgroup, kgroup, lgroup, - mgroup) + mgroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N]): Group[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] + )( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N] + ): Group[X] = new Product14Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N](applyX, unapplyX)( agroup, bgroup, @@ -5968,25 +6324,29 @@ trait ProductGroups { kgroup, lgroup, mgroup, - ngroup) + ngroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O]): Group[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] + )( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O] + ): Group[X] = new Product15Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](applyX, unapplyX)( agroup, bgroup, @@ -6002,26 +6362,30 @@ trait ProductGroups { lgroup, mgroup, ngroup, - ogroup) + ogroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)])(implicit agroup: Group[A], - bgroup: Group[B], - cgroup: Group[C], - dgroup: Group[D], - egroup: Group[E], - fgroup: Group[F], - ggroup: Group[G], - hgroup: Group[H], - igroup: Group[I], - jgroup: Group[J], - kgroup: Group[K], - lgroup: Group[L], - mgroup: Group[M], - ngroup: Group[N], - ogroup: Group[O], - pgroup: Group[P]): Group[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] + )( + implicit agroup: Group[A], + bgroup: Group[B], + cgroup: Group[C], + dgroup: Group[D], + egroup: Group[E], + fgroup: Group[F], + ggroup: Group[G], + hgroup: Group[H], + igroup: Group[I], + jgroup: Group[J], + kgroup: Group[K], + lgroup: Group[L], + mgroup: Group[M], + ngroup: Group[N], + ogroup: Group[O], + pgroup: Group[P] + ): Group[X] = new Product16Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](applyX, unapplyX)( agroup, bgroup, @@ -6038,11 +6402,13 @@ trait ProductGroups { mgroup, ngroup, ogroup, - pgroup) + pgroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] + )( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -6059,7 +6425,8 @@ trait ProductGroups { ngroup: Group[N], ogroup: Group[O], pgroup: Group[P], - qgroup: Group[Q]): Group[X] = + qgroup: Group[Q] + ): Group[X] = new Product17Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](applyX, unapplyX)( agroup, bgroup, @@ -6077,11 +6444,13 @@ trait ProductGroups { ngroup, ogroup, pgroup, - qgroup) + qgroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] + )( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -6099,7 +6468,8 @@ trait ProductGroups { ogroup: Group[O], pgroup: Group[P], qgroup: Group[Q], - rgroup: Group[R]): Group[X] = + rgroup: Group[R] + ): Group[X] = new Product18Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](applyX, unapplyX)( agroup, bgroup, @@ -6118,11 +6488,13 @@ trait ProductGroups { ogroup, pgroup, qgroup, - rgroup) + rgroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] + )( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -6141,7 +6513,8 @@ trait ProductGroups { pgroup: Group[P], qgroup: Group[Q], rgroup: Group[R], - sgroup: Group[S]): Group[X] = + sgroup: Group[S] + ): Group[X] = new Product19Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](applyX, unapplyX)( agroup, bgroup, @@ -6161,11 +6534,13 @@ trait ProductGroups { pgroup, qgroup, rgroup, - sgroup) + sgroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] + )( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -6185,7 +6560,8 @@ trait ProductGroups { qgroup: Group[Q], rgroup: Group[R], sgroup: Group[S], - tgroup: Group[T]): Group[X] = + tgroup: Group[T] + ): Group[X] = new Product20Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](applyX, unapplyX)( agroup, bgroup, @@ -6206,11 +6582,13 @@ trait ProductGroups { qgroup, rgroup, sgroup, - tgroup) + tgroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] + )( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -6231,7 +6609,8 @@ trait ProductGroups { rgroup: Group[R], sgroup: Group[S], tgroup: Group[T], - ugroup: Group[U]): Group[X] = + ugroup: Group[U] + ): Group[X] = new Product21Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](applyX, unapplyX)( agroup, bgroup, @@ -6253,11 +6632,13 @@ trait ProductGroups { rgroup, sgroup, tgroup, - ugroup) + ugroup + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] + )( implicit agroup: Group[A], bgroup: Group[B], cgroup: Group[C], @@ -6279,7 +6660,8 @@ trait ProductGroups { sgroup: Group[S], tgroup: Group[T], ugroup: Group[U], - vgroup: Group[V]): Group[X] = + vgroup: Group[V] + ): Group[X] = new Product22Group[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](applyX, unapplyX)( agroup, bgroup, @@ -6308,28 +6690,28 @@ trait ProductGroups { } trait ProductRings { - def apply[X, A, B](applyX: (A, B) => X, unapplyX: X => Option[(A, B)])(implicit aring: Ring[A], - bring: Ring[B]): Ring[X] = + def apply[X, A, B]( + applyX: (A, B) => X, + unapplyX: X => Option[(A, B)] + )(implicit aring: Ring[A], bring: Ring[B]): Ring[X] = new Product2Ring[X, A, B](applyX, unapplyX)(aring, bring) - def apply[X, A, B, C](applyX: (A, B, C) => X, unapplyX: X => Option[(A, B, C)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C]): Ring[X] = + def apply[X, A, B, C]( + applyX: (A, B, C) => X, + unapplyX: X => Option[(A, B, C)] + )(implicit aring: Ring[A], bring: Ring[B], cring: Ring[C]): Ring[X] = new Product3Ring[X, A, B, C](applyX, unapplyX)(aring, bring, cring) - def apply[X, A, B, C, D](applyX: (A, B, C, D) => X, unapplyX: X => Option[(A, B, C, D)])( - implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D]): Ring[X] = + def apply[X, A, B, C, D]( + applyX: (A, B, C, D) => X, + unapplyX: X => Option[(A, B, C, D)] + )(implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], dring: Ring[D]): Ring[X] = new Product4Ring[X, A, B, C, D](applyX, unapplyX)(aring, bring, cring, dring) - def apply[X, A, B, C, D, E](applyX: (A, B, C, D, E) => X, unapplyX: X => Option[(A, B, C, D, E)])( - implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E]): Ring[X] = + def apply[X, A, B, C, D, E]( + applyX: (A, B, C, D, E) => X, + unapplyX: X => Option[(A, B, C, D, E)] + )(implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], dring: Ring[D], ering: Ring[E]): Ring[X] = new Product5Ring[X, A, B, C, D, E](applyX, unapplyX)(aring, bring, cring, dring, ering) def apply[X, A, B, C, D, E, F](applyX: (A, B, C, D, E, F) => X, unapplyX: X => Option[(A, B, C, D, E, F)])( @@ -6338,17 +6720,22 @@ trait ProductRings { cring: Ring[C], dring: Ring[D], ering: Ring[E], - fring: Ring[F]): Ring[X] = + fring: Ring[F] + ): Ring[X] = new Product6Ring[X, A, B, C, D, E, F](applyX, unapplyX)(aring, bring, cring, dring, ering, fring) - def apply[X, A, B, C, D, E, F, G](applyX: (A, B, C, D, E, F, G) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G]): Ring[X] = + def apply[X, A, B, C, D, E, F, G]( + applyX: (A, B, C, D, E, F, G) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G)] + )( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G] + ): Ring[X] = new Product7Ring[X, A, B, C, D, E, F, G](applyX, unapplyX)( aring, bring, @@ -6356,10 +6743,13 @@ trait ProductRings { dring, ering, fring, - gring) + gring + ) - def apply[X, A, B, C, D, E, F, G, H](applyX: (A, B, C, D, E, F, G, H) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H)])( + def apply[X, A, B, C, D, E, F, G, H]( + applyX: (A, B, C, D, E, F, G, H) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H)] + )( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -6367,7 +6757,8 @@ trait ProductRings { ering: Ring[E], fring: Ring[F], gring: Ring[G], - hring: Ring[H]): Ring[X] = + hring: Ring[H] + ): Ring[X] = new Product8Ring[X, A, B, C, D, E, F, G, H](applyX, unapplyX)( aring, bring, @@ -6376,10 +6767,13 @@ trait ProductRings { ering, fring, gring, - hring) + hring + ) - def apply[X, A, B, C, D, E, F, G, H, I](applyX: (A, B, C, D, E, F, G, H, I) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I)])( + def apply[X, A, B, C, D, E, F, G, H, I]( + applyX: (A, B, C, D, E, F, G, H, I) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I)] + )( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -6388,7 +6782,8 @@ trait ProductRings { fring: Ring[F], gring: Ring[G], hring: Ring[H], - iring: Ring[I]): Ring[X] = + iring: Ring[I] + ): Ring[X] = new Product9Ring[X, A, B, C, D, E, F, G, H, I](applyX, unapplyX)( aring, bring, @@ -6398,10 +6793,13 @@ trait ProductRings { fring, gring, hring, - iring) + iring + ) - def apply[X, A, B, C, D, E, F, G, H, I, J](applyX: (A, B, C, D, E, F, G, H, I, J) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J)])( + def apply[X, A, B, C, D, E, F, G, H, I, J]( + applyX: (A, B, C, D, E, F, G, H, I, J) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J)] + )( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -6411,7 +6809,8 @@ trait ProductRings { gring: Ring[G], hring: Ring[H], iring: Ring[I], - jring: Ring[J]): Ring[X] = + jring: Ring[J] + ): Ring[X] = new Product10Ring[X, A, B, C, D, E, F, G, H, I, J](applyX, unapplyX)( aring, bring, @@ -6422,10 +6821,13 @@ trait ProductRings { gring, hring, iring, - jring) + jring + ) - def apply[X, A, B, C, D, E, F, G, H, I, J, K](applyX: (A, B, C, D, E, F, G, H, I, J, K) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K)])( + def apply[X, A, B, C, D, E, F, G, H, I, J, K]( + applyX: (A, B, C, D, E, F, G, H, I, J, K) => X, + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K)] + )( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -6436,7 +6838,8 @@ trait ProductRings { hring: Ring[H], iring: Ring[I], jring: Ring[J], - kring: Ring[K]): Ring[X] = + kring: Ring[K] + ): Ring[X] = new Product11Ring[X, A, B, C, D, E, F, G, H, I, J, K](applyX, unapplyX)( aring, bring, @@ -6448,22 +6851,26 @@ trait ProductRings { hring, iring, jring, - kring) + kring + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L]): Ring[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L)] + )( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L] + ): Ring[X] = new Product12Ring[X, A, B, C, D, E, F, G, H, I, J, K, L](applyX, unapplyX)( aring, bring, @@ -6476,23 +6883,27 @@ trait ProductRings { iring, jring, kring, - lring) + lring + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M]): Ring[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M)] + )( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M] + ): Ring[X] = new Product13Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M](applyX, unapplyX)( aring, bring, @@ -6506,24 +6917,28 @@ trait ProductRings { jring, kring, lring, - mring) + mring + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N]): Ring[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)] + )( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N] + ): Ring[X] = new Product14Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N](applyX, unapplyX)( aring, bring, @@ -6538,25 +6953,29 @@ trait ProductRings { kring, lring, mring, - nring) + nring + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O]): Ring[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] + )( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O] + ): Ring[X] = new Product15Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](applyX, unapplyX)( aring, bring, @@ -6572,26 +6991,30 @@ trait ProductRings { lring, mring, nring, - oring) + oring + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P]): Ring[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] + )( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P] + ): Ring[X] = new Product16Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](applyX, unapplyX)( aring, bring, @@ -6608,27 +7031,31 @@ trait ProductRings { mring, nring, oring, - pring) + pring + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)])(implicit aring: Ring[A], - bring: Ring[B], - cring: Ring[C], - dring: Ring[D], - ering: Ring[E], - fring: Ring[F], - gring: Ring[G], - hring: Ring[H], - iring: Ring[I], - jring: Ring[J], - kring: Ring[K], - lring: Ring[L], - mring: Ring[M], - nring: Ring[N], - oring: Ring[O], - pring: Ring[P], - qring: Ring[Q]): Ring[X] = + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] + )( + implicit aring: Ring[A], + bring: Ring[B], + cring: Ring[C], + dring: Ring[D], + ering: Ring[E], + fring: Ring[F], + gring: Ring[G], + hring: Ring[H], + iring: Ring[I], + jring: Ring[J], + kring: Ring[K], + lring: Ring[L], + mring: Ring[M], + nring: Ring[N], + oring: Ring[O], + pring: Ring[P], + qring: Ring[Q] + ): Ring[X] = new Product17Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](applyX, unapplyX)( aring, bring, @@ -6646,11 +7073,13 @@ trait ProductRings { nring, oring, pring, - qring) + qring + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] + )( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -6668,7 +7097,8 @@ trait ProductRings { oring: Ring[O], pring: Ring[P], qring: Ring[Q], - rring: Ring[R]): Ring[X] = + rring: Ring[R] + ): Ring[X] = new Product18Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](applyX, unapplyX)( aring, bring, @@ -6687,11 +7117,13 @@ trait ProductRings { oring, pring, qring, - rring) + rring + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] + )( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -6710,7 +7142,8 @@ trait ProductRings { pring: Ring[P], qring: Ring[Q], rring: Ring[R], - sring: Ring[S]): Ring[X] = + sring: Ring[S] + ): Ring[X] = new Product19Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](applyX, unapplyX)( aring, bring, @@ -6730,11 +7163,13 @@ trait ProductRings { pring, qring, rring, - sring) + sring + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] + )( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -6754,7 +7189,8 @@ trait ProductRings { qring: Ring[Q], rring: Ring[R], sring: Ring[S], - tring: Ring[T]): Ring[X] = + tring: Ring[T] + ): Ring[X] = new Product20Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](applyX, unapplyX)( aring, bring, @@ -6775,11 +7211,13 @@ trait ProductRings { qring, rring, sring, - tring) + tring + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] + )( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -6800,7 +7238,8 @@ trait ProductRings { rring: Ring[R], sring: Ring[S], tring: Ring[T], - uring: Ring[U]): Ring[X] = + uring: Ring[U] + ): Ring[X] = new Product21Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](applyX, unapplyX)( aring, bring, @@ -6822,11 +7261,13 @@ trait ProductRings { rring, sring, tring, - uring) + uring + ) def apply[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]( applyX: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => X, - unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)])( + unapplyX: X => Option[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] + )( implicit aring: Ring[A], bring: Ring[B], cring: Ring[C], @@ -6848,7 +7289,8 @@ trait ProductRings { sring: Ring[S], tring: Ring[T], uring: Ring[U], - vring: Ring[V]): Ring[X] = + vring: Ring[V] + ): Ring[X] = new Product22Ring[X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](applyX, unapplyX)( aring, bring, @@ -6871,6 +7313,7 @@ trait ProductRings { sring, tring, uring, - vring) + vring + ) } diff --git a/algebird-core/src/main/scala/com/twitter/algebird/HyperLogLog.scala b/algebird-core/src/main/scala/com/twitter/algebird/HyperLogLog.scala index 9c41a4f31..99881fe7a 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/HyperLogLog.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/HyperLogLog.scala @@ -338,12 +338,14 @@ sealed abstract class HLL extends java.io.Serializable { * * @return New value of rhoW */ - protected def getModifiedRhoW(currentJ: Int, - currentRhoW: Byte, - reducedBits: Int, - reducedSize: Int, - bitMask: Int, - buf: Array[Byte]): Byte = + protected def getModifiedRhoW( + currentJ: Int, + currentRhoW: Byte, + reducedBits: Int, + reducedSize: Int, + bitMask: Int, + buf: Array[Byte] + ): Byte = if (currentRhoW == 0) // rhoW not set, skip currentRhoW diff --git a/algebird-core/src/main/scala/com/twitter/algebird/Identity.scala b/algebird-core/src/main/scala/com/twitter/algebird/Identity.scala index 5671fabad..43db9378d 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/Identity.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/Identity.scala @@ -37,22 +37,28 @@ object IdentityMonad extends Monad[Identity] { override def joinWith[T, U, V](mt: Identity[T], mu: Identity[U])(fn: (T, U) => V): Identity[V] = Identity(fn(mt.get, mu.get)) - override def join[T1, T2, T3](m1: Identity[T1], - m2: Identity[T2], - m3: Identity[T3]): Identity[(T1, T2, T3)] = + override def join[T1, T2, T3]( + m1: Identity[T1], + m2: Identity[T2], + m3: Identity[T3] + ): Identity[(T1, T2, T3)] = Identity((m1.get, m2.get, m3.get)) - override def join[T1, T2, T3, T4](m1: Identity[T1], - m2: Identity[T2], - m3: Identity[T3], - m4: Identity[T4]): Identity[(T1, T2, T3, T4)] = + override def join[T1, T2, T3, T4]( + m1: Identity[T1], + m2: Identity[T2], + m3: Identity[T3], + m4: Identity[T4] + ): Identity[(T1, T2, T3, T4)] = Identity((m1.get, m2.get, m3.get, m4.get)) - override def join[T1, T2, T3, T4, T5](m1: Identity[T1], - m2: Identity[T2], - m3: Identity[T3], - m4: Identity[T4], - m5: Identity[T5]): Identity[(T1, T2, T3, T4, T5)] = + override def join[T1, T2, T3, T4, T5]( + m1: Identity[T1], + m2: Identity[T2], + m3: Identity[T3], + m4: Identity[T4], + m5: Identity[T5] + ): Identity[(T1, T2, T3, T4, T5)] = Identity((m1.get, m2.get, m3.get, m4.get, m5.get)) } diff --git a/algebird-core/src/main/scala/com/twitter/algebird/Interval.scala b/algebird-core/src/main/scala/com/twitter/algebird/Interval.scala index bba5f9b9d..02a64ab82 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/Interval.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/Interval.scala @@ -386,7 +386,8 @@ case class Intersection[L[t] <: Lower[t], U[t] <: Upper[t], T](lower: L[T], uppe * are other cases). */ def toLeftClosedRightOpen( - implicit s: Successible[T]): Option[Intersection[InclusiveLower, ExclusiveUpper, T]] = + implicit s: Successible[T] + ): Option[Intersection[InclusiveLower, ExclusiveUpper, T]] = for { l <- lower.least g <- upper.strictUpperBound if s.ordering.lt(l, g) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/JavaMonoids.scala b/algebird-core/src/main/scala/com/twitter/algebird/JavaMonoids.scala index 0f644adc4..f6c79e74c 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/JavaMonoids.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/JavaMonoids.scala @@ -121,7 +121,11 @@ class JMapMonoid[K, V: Semigroup] extends Monoid[JMap[K, V]] { }) override def plus(x: JMap[K, V], y: JMap[K, V]) = { val (big, small, bigOnLeft) = - if (x.size > y.size) { (x, y, true) } else { (y, x, false) } + if (x.size > y.size) { + (x, y, true) + } else { + (y, x, false) + } val vsemi = implicitly[Semigroup[V]] val result = new java.util.HashMap[K, V](big.size + small.size) result.putAll(big) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/MapAlgebra.scala b/algebird-core/src/main/scala/com/twitter/algebird/MapAlgebra.scala index 44c57baaf..b3e48d2ea 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/MapAlgebra.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/MapAlgebra.scala @@ -48,7 +48,11 @@ abstract class GenericMapMonoid[K, V, M <: ScMap[K, V]](implicit val semigroup: // Scala maps can reuse internal structure, so don't copy just add into the bigger one: // This really saves computation when adding lots of small maps into big ones (common) val (big, small, bigOnLeft) = - if (x.size > y.size) { (x, y, true) } else { (y, x, false) } + if (x.size > y.size) { + (x, y, true) + } else { + (y, x, false) + } small match { // Mutable maps create new copies of the underlying data on add so don't use the // handleImmutable method. @@ -149,7 +153,11 @@ trait GenericMapRing[K, V, M <: ScMap[K, V]] extends Rng[M] with MapOperations[K override def times(x: M, y: M): M = { val (big, small, bigOnLeft) = - if (x.size > y.size) { (x, y, true) } else { (y, x, false) } + if (x.size > y.size) { + (x, y, true) + } else { + (y, x, false) + } small.foldLeft(zero) { (oldMap, kv) => val bigV = big.getOrElse(kv._1, ring.zero) val newV = @@ -185,8 +193,9 @@ object MapAlgebra { rightContainsLeft(cleanM1, cleanM2) && rightContainsLeft(cleanM2, cleanM1) } - def mergeLookup[T, U, V: Monoid](keys: TraversableOnce[T])(lookup: T => Option[V])( - present: T => U): Map[U, V] = + def mergeLookup[T, U, V: Monoid]( + keys: TraversableOnce[T] + )(lookup: T => Option[V])(present: T => U): Map[U, V] = sumByKey { keys.map { k => present(k) -> lookup(k).getOrElse(Monoid.zero[V]) @@ -254,7 +263,10 @@ object MapAlgebra { */ def invertExact[K, V](m: Map[Option[K], Set[V]]): Map[Option[V], Set[K]] = { def nonEmptyIter[T](i: Iterable[T]): Iterable[Option[T]] = - if (i.isEmpty) Iterable(None) else { i.map { Some(_) } } + if (i.isEmpty) Iterable(None) + else { + i.map { Some(_) } + } Monoid.sum { for { @@ -292,8 +304,9 @@ object MapAlgebra { def cubeSum[K, V](it: TraversableOnce[(K, V)])(implicit c: Cuber[K], sg: Semigroup[V]): Map[c.K, V] = sumByKey(it.toIterator.flatMap { case (k, v) => c(k).map((_, v)) }) - def cubeAggregate[T, K, U, V](it: TraversableOnce[T], agg: Aggregator[T, U, V])(fn: T => K)( - implicit c: Cuber[K]): Map[c.K, V] = + def cubeAggregate[T, K, U, V](it: TraversableOnce[T], agg: Aggregator[T, U, V])( + fn: T => K + )(implicit c: Cuber[K]): Map[c.K, V] = sumByKey(it.toIterator.flatMap { t => c(fn(t)).map((_, agg.prepare(t))) })(agg.semigroup) @@ -318,8 +331,9 @@ object MapAlgebra { def rollupSum[K, V](it: TraversableOnce[(K, V)])(implicit r: Roller[K], sg: Semigroup[V]): Map[r.K, V] = sumByKey(it.toIterator.flatMap { case (k, v) => r(k).map((_, v)) }) - def rollupAggregate[T, K, U, V](it: TraversableOnce[T], agg: Aggregator[T, U, V])(fn: T => K)( - implicit r: Roller[K]): Map[r.K, V] = + def rollupAggregate[T, K, U, V](it: TraversableOnce[T], agg: Aggregator[T, U, V])( + fn: T => K + )(implicit r: Roller[K]): Map[r.K, V] = sumByKey(it.toIterator.flatMap { t => r(fn(t)).map((_, agg.prepare(t))) })(agg.semigroup) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/MinHasher.scala b/algebird-core/src/main/scala/com/twitter/algebird/MinHasher.scala index 3543e5d41..8ef2ee36e 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/MinHasher.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/MinHasher.scala @@ -160,7 +160,8 @@ class MinHasher32(numHashes: Int, numBands: Int) extends MinHasher[Int](numHashe } override protected def buildArray(left: Array[Byte], right: Array[Byte])( - fn: (Int, Int) => Int): Array[Byte] = { + fn: (Int, Int) => Int + ): Array[Byte] = { val leftBuffer = ByteBuffer.wrap(left).asIntBuffer val rightBuffer = ByteBuffer.wrap(right).asIntBuffer buildArray { fn(leftBuffer.get, rightBuffer.get) } @@ -200,7 +201,8 @@ class MinHasher16(numHashes: Int, numBands: Int) extends MinHasher[Char](numHash } override protected def buildArray(left: Array[Byte], right: Array[Byte])( - fn: (Char, Char) => Char): Array[Byte] = { + fn: (Char, Char) => Char + ): Array[Byte] = { val leftBuffer = ByteBuffer.wrap(left).asCharBuffer val rightBuffer = ByteBuffer.wrap(right).asCharBuffer buildArray { fn(leftBuffer.get, rightBuffer.get) } diff --git a/algebird-core/src/main/scala/com/twitter/algebird/Preparer.scala b/algebird-core/src/main/scala/com/twitter/algebird/Preparer.scala index ab0998710..781c0c7b0 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/Preparer.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/Preparer.scala @@ -128,8 +128,9 @@ trait MapPreparer[A, T] extends Preparer[A, T] { * * We really need to generate N versions of this for 3-way, 4-way etc splits. */ - def split[B1, B2, C1, C2](fn: MapPreparer[T, T] => (Aggregator[T, B1, C1], Aggregator[T, B2, C2])) - : Aggregator[A, (B1, B2), (C1, C2)] = { + def split[B1, B2, C1, C2]( + fn: MapPreparer[T, T] => (Aggregator[T, B1, C1], Aggregator[T, B2, C2]) + ): Aggregator[A, (B1, B2), (C1, C2)] = { val (a1, a2) = fn(MapPreparer.identity[T]) aggregate(a1.join(a2)) } @@ -220,9 +221,11 @@ trait FlatMapPreparer[A, T] extends Preparer[A, T] { * We really need to generate N versions of this for 3-way, 4-way etc splits. */ def split[B1, B2, C1, C2]( - fn: FlatMapPreparer[TraversableOnce[T], T] => (MonoidAggregator[TraversableOnce[T], B1, C1], - MonoidAggregator[TraversableOnce[T], B2, C2])) - : Aggregator[A, (B1, B2), (C1, C2)] = { + fn: FlatMapPreparer[TraversableOnce[T], T] => ( + MonoidAggregator[TraversableOnce[T], B1, C1], + MonoidAggregator[TraversableOnce[T], B2, C2] + ) + ): Aggregator[A, (B1, B2), (C1, C2)] = { val (a1, a2) = fn(FlatMapPreparer.identity[T]) a1.join(a2).composePrepare(prepareFn) } diff --git a/algebird-core/src/main/scala/com/twitter/algebird/QTree.scala b/algebird-core/src/main/scala/com/twitter/algebird/QTree.scala index d0229d047..ef4d528e0 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/QTree.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/QTree.scala @@ -57,12 +57,14 @@ object QTree { new QTree(kv._2, kv._1, 0, 1, null, null) } - def apply[A](offset: Long, - level: Int, - count: Long, - sum: A, //the sum at just this node (*not* including its children) - lowerChild: Option[QTree[A]], - upperChild: Option[QTree[A]]): QTree[A] = { + def apply[A]( + offset: Long, + level: Int, + count: Long, + sum: A, //the sum at just this node (*not* including its children) + lowerChild: Option[QTree[A]], + upperChild: Option[QTree[A]] + ): QTree[A] = { require(offset >= 0, "QTree can not accept negative values") new QTree(sum, offset, level, count, lowerChild.orNull, upperChild.orNull) @@ -105,7 +107,8 @@ object QTree { apply(v -> (()), level) private[algebird] def mergePeers[@specialized(Int, Long, Float, Double) A](left: QTree[A], right: QTree[A])( - implicit monoid: Monoid[A]): QTree[A] = { + implicit monoid: Monoid[A] + ): QTree[A] = { assert(right.lowerBound == left.lowerBound, "lowerBound " + right.lowerBound + " != " + left.lowerBound) assert(right.level == left.level, "level " + right.level + " != " + left.level) @@ -120,7 +123,8 @@ object QTree { } private def mergeOptions[A](aNullable: QTree[A], bNullable: QTree[A])( - implicit monoid: Monoid[A]): QTree[A] = + implicit monoid: Monoid[A] + ): QTree[A] = if (aNullable != null) { if (bNullable != null) { mergePeers(aNullable, bNullable) @@ -167,8 +171,8 @@ class QTree[@specialized(Int, Long, Float, Double) A] private[algebird] ( _level: Int, _count: Long, //the total count for this node and all of its children _lowerChildNullable: QTree[A], - _upperChildNullable: QTree[A]) - extends scala.Product6[Long, Int, Long, A, Option[QTree[A]], Option[QTree[A]]] + _upperChildNullable: QTree[A] +) extends scala.Product6[Long, Int, Long, A, Option[QTree[A]], Option[QTree[A]]] with Serializable { import QTree._ @@ -184,12 +188,14 @@ class QTree[@specialized(Int, Long, Float, Double) A] private[algebird] ( def lowerChild: Option[QTree[A]] = Option(_lowerChildNullable) def upperChild: Option[QTree[A]] = Option(_upperChildNullable) - def this(offset: Long, - level: Int, - count: Long, - sum: A, - lowerChild: Option[QTree[A]], - upperChild: Option[QTree[A]]) = + def this( + offset: Long, + level: Int, + count: Long, + sum: A, + lowerChild: Option[QTree[A]], + upperChild: Option[QTree[A]] + ) = this(sum, offset, level, count, lowerChild.orNull, upperChild.orNull) // Helpers to access the nullable ones from inside the QTree work @@ -482,8 +488,8 @@ object QTreeAggregator { * Returns an Intersection which represents the bounded approximation. */ case class QTreeAggregator[T](percentile: Double, k: Int = QTreeAggregator.DefaultK)( - implicit val num: Numeric[T]) - extends Aggregator[T, QTree[Unit], Intersection[InclusiveLower, InclusiveUpper, Double]] + implicit val num: Numeric[T] +) extends Aggregator[T, QTree[Unit], Intersection[InclusiveLower, InclusiveUpper, Double]] with QTreeAggregatorLike[T] { def present(qt: QTree[Unit]) = { @@ -499,8 +505,8 @@ case class QTreeAggregator[T](percentile: Double, k: Int = QTreeAggregator.Defau * Like a QTreeAggregator, the items that are iterated over to produce this approximation cannot be negative. */ case class QTreeAggregatorLowerBound[T](percentile: Double, k: Int = QTreeAggregator.DefaultK)( - implicit val num: Numeric[T]) - extends Aggregator[T, QTree[Unit], Double] + implicit val num: Numeric[T] +) extends Aggregator[T, QTree[Unit], Double] with QTreeAggregatorLike[T] { def present(qt: QTree[Unit]) = qt.quantileBounds(percentile)._1 diff --git a/algebird-core/src/main/scala/com/twitter/algebird/RightFolded2.scala b/algebird-core/src/main/scala/com/twitter/algebird/RightFolded2.scala index 1f686e3c2..98508abf2 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/RightFolded2.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/RightFolded2.scala @@ -41,8 +41,8 @@ object RightFolded2 { } class RightFolded2Monoid[In, Out, Acc](foldfn: (In, Out) => Out, accfn: (Out) => Acc)( - implicit grpAcc: Group[Acc]) - extends Monoid[RightFolded2[In, Out, Acc]] { + implicit grpAcc: Group[Acc] +) extends Monoid[RightFolded2[In, Out, Acc]] { val zero = RightFoldedZero2 def init(i: Out) = RightFoldedValue2[In, Out, Acc](i, accfn(i), Nil) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/SGDMonoid.scala b/algebird-core/src/main/scala/com/twitter/algebird/SGDMonoid.scala index 4115d199d..79038d46d 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/SGDMonoid.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/SGDMonoid.scala @@ -87,9 +87,10 @@ case class SGDPos[+Pos](val pos: List[Pos]) extends SGD[Pos] * before you start adding SGDPos objects. Otherwise you will * just be doing list concatenation. */ -class SGDMonoid[Pos](stepfn: (Long, IndexedSeq[Double]) => Double, - gradient: (IndexedSeq[Double], Pos) => IndexedSeq[Double]) - extends Monoid[SGD[Pos]] { +class SGDMonoid[Pos]( + stepfn: (Long, IndexedSeq[Double]) => Double, + gradient: (IndexedSeq[Double], Pos) => IndexedSeq[Double] +) extends Monoid[SGD[Pos]] { val zero = SGDZero @@ -113,6 +114,7 @@ class SGDMonoid[Pos](stepfn: (Long, IndexedSeq[Double]) => Double, sgdW.weights.view .zip(grad) .map { case (l: Double, r: Double) => l - step * r } - .toIndexedSeq) + .toIndexedSeq + ) } } diff --git a/algebird-core/src/main/scala/com/twitter/algebird/Semigroup.scala b/algebird-core/src/main/scala/com/twitter/algebird/Semigroup.scala index 3361538b6..194218ab4 100755 --- a/algebird-core/src/main/scala/com/twitter/algebird/Semigroup.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/Semigroup.scala @@ -160,7 +160,8 @@ object Semigroup @tailrec private def intTimesRec[T](i: BigInt, v: T, pow: Int, vaccMemo: (T, Vector[T]))( - implicit sg: Semigroup[T]): T = + implicit sg: Semigroup[T] + ): T = if (i == 0) { vaccMemo._1 } else { diff --git a/algebird-core/src/main/scala/com/twitter/algebird/SketchMap.scala b/algebird-core/src/main/scala/com/twitter/algebird/SketchMap.scala index 9581f1497..f869c81e6 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/SketchMap.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/SketchMap.scala @@ -38,9 +38,10 @@ case class SketchMapHash[K](hasher: CMSHash[Long], seed: Int)(implicit serializa /** * Responsible for creating instances of SketchMap. */ -class SketchMapMonoid[K, V](val params: SketchMapParams[K])(implicit valueOrdering: Ordering[V], - monoid: Monoid[V]) - extends Monoid[SketchMap[K, V]] +class SketchMapMonoid[K, V](val params: SketchMapParams[K])( + implicit valueOrdering: Ordering[V], + monoid: Monoid[V] +) extends Monoid[SketchMap[K, V]] with CommutativeMonoid[SketchMap[K, V]] { /** @@ -56,7 +57,8 @@ class SketchMapMonoid[K, V](val params: SketchMapParams[K])(implicit valueOrderi SketchMap( newValuesTable, params.updatedHeavyHitters(newHeavyHitters.toSeq, newValuesTable), - Monoid.plus(left.totalValue, right.totalValue)) + Monoid.plus(left.totalValue, right.totalValue) + ) } override def sumOption(items: TraversableOnce[SketchMap[K, V]]): Option[SketchMap[K, V]] = @@ -73,7 +75,8 @@ class SketchMapMonoid[K, V](val params: SketchMapParams[K])(implicit valueOrderi buffer += SketchMap( newValuesTable, params.updatedHeavyHitters(heavyHittersSet.toSeq, newValuesTable), - newtotalValue) + newtotalValue + ) } items.foreach { sm => @@ -119,8 +122,7 @@ class SketchMapMonoid[K, V](val params: SketchMapParams[K])(implicit valueOrderi def frequencyWithHHCache(sm: SketchMap[K, V]): K => V = { val hhMap: Map[K, V] = heavyHitters(sm).toMap - (k: K) => - hhMap.getOrElse(k, frequency(sm, k)) + (k: K) => hhMap.getOrElse(k, frequency(sm, k)) } /** @@ -136,7 +138,8 @@ class SketchMapMonoid[K, V](val params: SketchMapParams[K])(implicit valueOrderi * Convenience class for holding constant parameters of a Sketch Map. */ case class SketchMapParams[K](seed: Int, width: Int, depth: Int, heavyHittersCount: Int)( - implicit serialization: K => Array[Byte]) { + implicit serialization: K => Array[Byte] +) { assert(0 < width, "width must be greater than 0") assert(0 < depth, "depth must be greater than 0") assert(0 <= heavyHittersCount, "heavyHittersCount must be greater than 0") @@ -148,8 +151,7 @@ case class SketchMapParams[K](seed: Int, width: Int, depth: Int, heavyHittersCou (0 to (numHashes - 1)).map { _ => val smhash: SketchMapHash[K] = SketchMapHash(CMSHash[Long](r.nextInt, 0, numCounters), seed)(serialization) - (k: K) => - smhash(k) + (k: K) => smhash(k) } } @@ -179,7 +181,8 @@ object SketchMapParams { * Overloaded apply method for convenience. */ def apply[K](seed: Int, eps: Double, delta: Double, heavyHittersCount: Int)( - implicit serialization: K => Array[Byte]): SketchMapParams[K] = + implicit serialization: K => Array[Byte] + ): SketchMapParams[K] = SketchMapParams[K](seed, width(eps), depth(delta), heavyHittersCount)(serialization) /** @@ -216,19 +219,22 @@ object SketchMap { * serialization from K to Array[Byte] for hashing, an ordering for V, and a * monoid for V. */ - def monoid[K, V](params: SketchMapParams[K])(implicit valueOrdering: Ordering[V], - monoid: Monoid[V]): SketchMapMonoid[K, V] = + def monoid[K, V]( + params: SketchMapParams[K] + )(implicit valueOrdering: Ordering[V], monoid: Monoid[V]): SketchMapMonoid[K, V] = new SketchMapMonoid(params)(valueOrdering, monoid) - def aggregator[K, V](params: SketchMapParams[K])(implicit valueOrdering: Ordering[V], - monoid: Monoid[V]): SketchMapAggregator[K, V] = + def aggregator[K, V]( + params: SketchMapParams[K] + )(implicit valueOrdering: Ordering[V], monoid: Monoid[V]): SketchMapAggregator[K, V] = SketchMapAggregator(params, SketchMap.monoid(params)) } -case class SketchMap[K, V](val valuesTable: AdaptiveMatrix[V], - val heavyHitterKeys: List[K], - val totalValue: V) - extends java.io.Serializable +case class SketchMap[K, V]( + val valuesTable: AdaptiveMatrix[V], + val heavyHitterKeys: List[K], + val totalValue: V +) extends java.io.Serializable /** * An Aggregator for the SketchMap. @@ -236,8 +242,8 @@ case class SketchMap[K, V](val valuesTable: AdaptiveMatrix[V], */ case class SketchMapAggregator[K, V](params: SketchMapParams[K], skmMonoid: SketchMapMonoid[K, V])( implicit valueOrdering: Ordering[V], - valueMonoid: Monoid[V]) - extends MonoidAggregator[(K, V), SketchMap[K, V], SketchMap[K, V]] { + valueMonoid: Monoid[V] +) extends MonoidAggregator[(K, V), SketchMap[K, V], SketchMap[K, V]] { val monoid = skmMonoid def prepare(value: (K, V)) = monoid.create(value) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/SummingQueue.scala b/algebird-core/src/main/scala/com/twitter/algebird/SummingQueue.scala index 3bbacace2..e386ed068 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/SummingQueue.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/SummingQueue.scala @@ -61,7 +61,9 @@ class SummingQueue[V] private (capacity: Int)(override implicit val semigroup: S None } } - } else { Some(item) } + } else { + Some(item) + } def apply(v: V): Option[V] = put(v) diff --git a/algebird-core/src/main/scala/com/twitter/algebird/TopKMonoid.scala b/algebird-core/src/main/scala/com/twitter/algebird/TopKMonoid.scala index 466c098c2..97e4aeaab 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/TopKMonoid.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/TopKMonoid.scala @@ -23,7 +23,8 @@ object TopKMonoid extends java.io.Serializable { // Does a merge sort and returns the reversed list @tailrec private[algebird] def mergeSortR[T](acc: List[T], list1: List[T], list2: List[T], cnt: Int)( - implicit ord: Ordering[T]): List[T] = + implicit ord: Ordering[T] + ): List[T] = (list1, list2, cnt) match { case (_, _, 0) => acc case (x1 :: t1, x2 :: t2, _) => { diff --git a/algebird-core/src/main/scala/com/twitter/algebird/macros/package.scala b/algebird-core/src/main/scala/com/twitter/algebird/macros/package.scala index e6e48f168..54a37e0ab 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/macros/package.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/macros/package.scala @@ -13,8 +13,9 @@ package object macros { c.abort(c.enclosingPosition, s"${tpe.typeSymbol} is not a case class") } - private[macros] def getParams[T](c: Context)( - implicit T: c.WeakTypeTag[T]): List[c.universe.MethodSymbol] = { + private[macros] def getParams[T]( + c: Context + )(implicit T: c.WeakTypeTag[T]): List[c.universe.MethodSymbol] = { import c.universe._ val tpe = weakTypeOf[T] diff --git a/algebird-core/src/main/scala/com/twitter/algebird/matrix/AdaptiveMatrix.scala b/algebird-core/src/main/scala/com/twitter/algebird/matrix/AdaptiveMatrix.scala index fde84bf5c..228b877a0 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/matrix/AdaptiveMatrix.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/matrix/AdaptiveMatrix.scala @@ -56,16 +56,20 @@ object AdaptiveMatrix { override def plus(a: AdaptiveMatrix[V], b: AdaptiveMatrix[V]) = sumOption(List(a, b)).get - private def denseInsert(rows: Int, - cols: Int, - buff: ArrayBuffer[V], - remainder: Iterator[AdaptiveMatrix[V]]): Option[AdaptiveMatrix[V]] = { + private def denseInsert( + rows: Int, + cols: Int, + buff: ArrayBuffer[V], + remainder: Iterator[AdaptiveMatrix[V]] + ): Option[AdaptiveMatrix[V]] = { remainder.foreach(_.updateInto(buff)) Some(DenseMatrix(rows, cols, buff)) } - private def denseUpdate(current: AdaptiveMatrix[V], - remainder: Iterator[AdaptiveMatrix[V]]): Option[AdaptiveMatrix[V]] = { + private def denseUpdate( + current: AdaptiveMatrix[V], + remainder: Iterator[AdaptiveMatrix[V]] + ): Option[AdaptiveMatrix[V]] = { val rows = current.rows val cols = current.cols val buffer = ArrayBuffer.fill(rows * cols)(innerZero) @@ -83,10 +87,12 @@ object AdaptiveMatrix { } } - private def goDense(rows: Int, - cols: Int, - storage: IndexedSeq[MMap[Int, V]], - remainder: Iterator[AdaptiveMatrix[V]]): Option[AdaptiveMatrix[V]] = { + private def goDense( + rows: Int, + cols: Int, + storage: IndexedSeq[MMap[Int, V]], + remainder: Iterator[AdaptiveMatrix[V]] + ): Option[AdaptiveMatrix[V]] = { val buffer = ArrayBuffer.fill(rows * cols)(innerZero) var row = 0 val iter = storage.iterator diff --git a/algebird-core/src/main/scala/com/twitter/algebird/monad/StateWithError.scala b/algebird-core/src/main/scala/com/twitter/algebird/monad/StateWithError.scala index 21b9eed76..9d37fc2c2 100644 --- a/algebird-core/src/main/scala/com/twitter/algebird/monad/StateWithError.scala +++ b/algebird-core/src/main/scala/com/twitter/algebird/monad/StateWithError.scala @@ -25,14 +25,17 @@ import com.twitter.algebird.{Monad, Semigroup} * to compose carefully. */ sealed trait StateWithError[S, +F, +T] { - def join[F1 >: F, U](that: StateWithError[S, F1, U], - mergeErr: (F1, F1) => F1, - mergeState: (S, S) => S): StateWithError[S, F1, (T, U)] = + def join[F1 >: F, U]( + that: StateWithError[S, F1, U], + mergeErr: (F1, F1) => F1, + mergeState: (S, S) => S + ): StateWithError[S, F1, (T, U)] = join(that)(Semigroup.from(mergeErr), Semigroup.from(mergeState)) def join[F1 >: F, U](that: StateWithError[S, F1, U])( implicit sgf: Semigroup[F1], - sgs: Semigroup[S]): // TODO: deep joins could blow the stack, not yet using trampoline here + sgs: Semigroup[S] + ): // TODO: deep joins could blow the stack, not yet using trampoline here StateWithError[S, F1, (T, U)] = StateFn({ (requested: S) => (run(requested), that.run(requested)) match { diff --git a/algebird-generic/src/main/scala/com/twitter/algebird/generic/EquivOrdering.scala b/algebird-generic/src/main/scala/com/twitter/algebird/generic/EquivOrdering.scala index b1330058a..e164ddd27 100644 --- a/algebird-generic/src/main/scala/com/twitter/algebird/generic/EquivOrdering.scala +++ b/algebird-generic/src/main/scala/com/twitter/algebird/generic/EquivOrdering.scala @@ -3,9 +3,11 @@ package com.twitter.algebird.generic import shapeless._ object EquivOrdering extends EquivOrdering1 { - implicit def hconsOrdering[A, B <: HList](implicit - a: Ordering[A], - lb: Lazy[Ordering[B]]): Ordering[A :: B] = + implicit def hconsOrdering[A, B <: HList]( + implicit + a: Ordering[A], + lb: Lazy[Ordering[B]] + ): Ordering[A :: B] = new Ordering[A :: B] { val b = lb.value def compare(x: A :: B, y: A :: B): Int = { diff --git a/algebird-generic/src/main/scala/com/twitter/algebird/generic/Instances.scala b/algebird-generic/src/main/scala/com/twitter/algebird/generic/Instances.scala index 509fce50b..c8b09164b 100644 --- a/algebird-generic/src/main/scala/com/twitter/algebird/generic/Instances.scala +++ b/algebird-generic/src/main/scala/com/twitter/algebird/generic/Instances.scala @@ -15,9 +15,11 @@ abstract class Shapeless3 extends Shapeless2 { /** * Pairwise ring for arbitrary heterogeneous lists (HList). */ - implicit def hconsRing[A, B <: HList](implicit - a: Ring[A], - lb: Lazy[Ring[B]]): Ring[A :: B] = + implicit def hconsRing[A, B <: HList]( + implicit + a: Ring[A], + lb: Lazy[Ring[B]] + ): Ring[A :: B] = // We use Lazy[Ring[A]] to avoid bogus ambiguous implicits at // the type-level. There is no value-level laziness needed, so we // immediately evaluate la.value. @@ -38,9 +40,11 @@ abstract class Shapeless2 extends Shapeless1 { /** * Pairwise group for arbitrary heterogeneous lists (HList). */ - implicit def hconsGroup[A, B <: HList](implicit - a: Group[A], - lb: Lazy[Group[B]]): Group[A :: B] = + implicit def hconsGroup[A, B <: HList]( + implicit + a: Group[A], + lb: Lazy[Group[B]] + ): Group[A :: B] = // We use Lazy[Group[A]] to avoid bogus ambiguous implicits at // the type-level. There is no value-level laziness needed, so we // immediately evaluate la.value. @@ -61,9 +65,11 @@ abstract class Shapeless1 extends Shapeless0 { /** * Pairwise monoid for arbitrary heterogeneous lists (HList). */ - implicit def hconsMonoid[A, B <: HList](implicit - a: Monoid[A], - lb: Lazy[Monoid[B]]): Monoid[A :: B] = + implicit def hconsMonoid[A, B <: HList]( + implicit + a: Monoid[A], + lb: Lazy[Monoid[B]] + ): Monoid[A :: B] = // We use Lazy[Monoid[A]] to avoid bogus ambiguous implicits at // the type-level. There is no value-level laziness needed, so we // immediately evaluate la.value. @@ -84,9 +90,11 @@ abstract class Shapeless0 { /** * Pairwise monoid for arbitrary heterogeneous lists (HList). */ - implicit def hconsSemigroup[A, B <: HList](implicit - a: Semigroup[A], - lb: Lazy[Semigroup[B]]): Semigroup[A :: B] = + implicit def hconsSemigroup[A, B <: HList]( + implicit + a: Semigroup[A], + lb: Lazy[Semigroup[B]] + ): Semigroup[A :: B] = new HConsSemigroup[A, B](a, lb.value) /** diff --git a/algebird-test/src/main/scala/com/twitter/algebird/ApplicativeLaws.scala b/algebird-test/src/main/scala/com/twitter/algebird/ApplicativeLaws.scala index 039eba66c..e37d2d7f4 100644 --- a/algebird-test/src/main/scala/com/twitter/algebird/ApplicativeLaws.scala +++ b/algebird-test/src/main/scala/com/twitter/algebird/ApplicativeLaws.scala @@ -25,27 +25,33 @@ import org.scalacheck.Prop.forAll object ApplicativeLaws { import BaseProperties.{DefaultHigherEq, HigherEq} - def applyLaw[M[_], T, U](eq: HigherEq[M] = new DefaultHigherEq[M])(implicit - app: Applicative[M], - arb: Arbitrary[T], - arbFn: Arbitrary[T => U]): Prop = + def applyLaw[M[_], T, U](eq: HigherEq[M] = new DefaultHigherEq[M])( + implicit + app: Applicative[M], + arb: Arbitrary[T], + arbFn: Arbitrary[T => U] + ): Prop = forAll { (t: T, fn: T => U) => eq(app.map(app.apply(t))(fn), app.apply(fn(t))) } - def joinLaw[M[_], T, U](eq: HigherEq[M] = new DefaultHigherEq[M])(implicit - app: Applicative[M], - arb1: Arbitrary[T], - arb2: Arbitrary[U]): Prop = + def joinLaw[M[_], T, U](eq: HigherEq[M] = new DefaultHigherEq[M])( + implicit + app: Applicative[M], + arb1: Arbitrary[T], + arb2: Arbitrary[U] + ): Prop = forAll { (t: T, u: U) => eq(app.join(app.apply(t), app.apply(u)), app.apply((t, u))) } // These follow from apply and join: - def sequenceLaw[M[_], T](eq: HigherEq[M] = new DefaultHigherEq[M])(implicit - app: Applicative[M], - arb: Arbitrary[Seq[T]]): Prop = + def sequenceLaw[M[_], T](eq: HigherEq[M] = new DefaultHigherEq[M])( + implicit + app: Applicative[M], + arb: Arbitrary[Seq[T]] + ): Prop = forAll { (ts: Seq[T]) => eq(app.sequence(ts.map { app.apply(_) }), app.apply(ts)) } @@ -55,7 +61,8 @@ object ApplicativeLaws { app: Applicative[M], arbT: Arbitrary[T], arbU: Arbitrary[U], - arbJoinFn: Arbitrary[(T, U) => V]): Prop = + arbJoinFn: Arbitrary[(T, U) => V] + ): Prop = forAll { (t: T, u: U, fn: (T, U) => V) => eq(app.joinWith(app.apply(t), app.apply(u))(fn), app.apply(fn(t, u))) } @@ -67,7 +74,8 @@ object ApplicativeLaws { arbMts: Arbitrary[Seq[T]], arbMu: Arbitrary[U], arbFn: Arbitrary[T => U], - arbJoinFn: Arbitrary[(T, U) => V]): Prop = + arbJoinFn: Arbitrary[(T, U) => V] + ): Prop = applyLaw[M, T, U](eq) && joinLaw[M, T, U](eq) && sequenceLaw[M, T](eq) && diff --git a/algebird-test/src/main/scala/com/twitter/algebird/ApproximateProperty.scala b/algebird-test/src/main/scala/com/twitter/algebird/ApproximateProperty.scala index 04e4b864e..37b294547 100644 --- a/algebird-test/src/main/scala/com/twitter/algebird/ApproximateProperty.scala +++ b/algebird-test/src/main/scala/com/twitter/algebird/ApproximateProperty.scala @@ -32,9 +32,11 @@ object ApproximateProperty { case _ => if (trial <= 0) Nil else genListOf(n, gen, trial - 1) } - private def successesAndProbabilities(a: ApproximateProperty, - objectReps: Int, - inputReps: Int): List[(Int, Double, List[String])] = + private def successesAndProbabilities( + a: ApproximateProperty, + objectReps: Int, + inputReps: Int + ): List[(Int, Double, List[String])] = genListOf(objectReps, a.exactGenerator) .flatMap { exact => val approx = a.makeApproximate(exact) @@ -92,7 +94,9 @@ object ApproximateProperty { List( ( "Omitted results", - s"${zeroProbTests}/${objectReps * inputReps} tests returned an Approximate with probability 0. These tests have been omitted from the calculation.")) + s"${zeroProbTests}/${objectReps * inputReps} tests returned an Approximate with probability 0. These tests have been omitted from the calculation." + ) + ) } else List() results ++ exampleFailures ++ testsReturnedZeroProb @@ -112,10 +116,12 @@ object ApproximateProperty { * TODO use `new Prop` like the above `toProp` method so that we can * have useful error messages. */ - def toProp(a: Seq[ApproximateProperty], - objectReps: Int, - inputReps: Int, - falsePositiveRate: Double): Prop = { + def toProp( + a: Seq[ApproximateProperty], + objectReps: Int, + inputReps: Int, + falsePositiveRate: Double + ): Prop = { require(0 <= falsePositiveRate && falsePositiveRate <= 1) val list = a.flatMap { approximateProp => diff --git a/algebird-test/src/main/scala/com/twitter/algebird/BaseProperties.scala b/algebird-test/src/main/scala/com/twitter/algebird/BaseProperties.scala index eb45535f0..5bd254780 100644 --- a/algebird-test/src/main/scala/com/twitter/algebird/BaseProperties.scala +++ b/algebird-test/src/main/scala/com/twitter/algebird/BaseProperties.scala @@ -275,10 +275,10 @@ object BaseProperties extends MetricProperties { def isDistributiveDifferentTypes[T: Ring: Equiv, U <: T: Arbitrary]: Prop = 'isDistributiveDifferentTypes |: forAll { (a: U, b: U, c: U) => - val rng = implicitly[Ring[T]] - Equiv[T].equiv(rng.times(a, rng.plus(b, c)), rng.plus(rng.times(a, b), rng.times(a, c))) && - Equiv[T].equiv(rng.times(rng.plus(b, c), a), rng.plus(rng.times(b, a), rng.times(c, a))) - } + val rng = implicitly[Ring[T]] + Equiv[T].equiv(rng.times(a, rng.plus(b, c)), rng.plus(rng.times(a, b), rng.times(a, c))) && + Equiv[T].equiv(rng.times(rng.plus(b, c), a), rng.plus(rng.times(b, a), rng.times(c, a))) + } def isDistributive[T: Ring: Arbitrary: Equiv]: Prop = isDistributiveDifferentTypes[T, T] diff --git a/algebird-test/src/main/scala/com/twitter/algebird/BaseVectorSpaceProperties.scala b/algebird-test/src/main/scala/com/twitter/algebird/BaseVectorSpaceProperties.scala index 81f705e9d..905971b91 100644 --- a/algebird-test/src/main/scala/com/twitter/algebird/BaseVectorSpaceProperties.scala +++ b/algebird-test/src/main/scala/com/twitter/algebird/BaseVectorSpaceProperties.scala @@ -23,50 +23,53 @@ import org.scalacheck.Prop.forAll * Base properties for VectorSpace tests. */ object BaseVectorSpaceProperties { - def isEqualIfZero[F, C[_]](eqfn: (C[F], C[F]) => Boolean)(implicit vs: VectorSpace[F, C], - arb: Arbitrary[C[F]]) = + def isEqualIfZero[F, C[_]]( + eqfn: (C[F], C[F]) => Boolean + )(implicit vs: VectorSpace[F, C], arb: Arbitrary[C[F]]) = forAll { (a: C[F]) => eqfn(VectorSpace.scale(vs.field.zero, a), vs.group.zero) } - def distributesWithPlus[F, C[_]](eqfn: (C[F], C[F]) => Boolean)(implicit vs: VectorSpace[F, C], - arbC: Arbitrary[C[F]], - arbF: Arbitrary[F]) = + def distributesWithPlus[F, C[_]]( + eqfn: (C[F], C[F]) => Boolean + )(implicit vs: VectorSpace[F, C], arbC: Arbitrary[C[F]], arbF: Arbitrary[F]) = forAll { (a: C[F], b: C[F], c: F) => val v1 = VectorSpace.scale(c, vs.group.plus(a, b)) val v2 = vs.group.plus(VectorSpace.scale(c, a), VectorSpace.scale(c, b)) eqfn(v1, v2) } - def isAssociative[F, C[_]](eqfn: (C[F], C[F]) => Boolean)(implicit vs: VectorSpace[F, C], - arbC: Arbitrary[C[F]], - arbF: Arbitrary[F]) = + def isAssociative[F, C[_]]( + eqfn: (C[F], C[F]) => Boolean + )(implicit vs: VectorSpace[F, C], arbC: Arbitrary[C[F]], arbF: Arbitrary[F]) = forAll { (a: C[F], b: F, c: F) => val v1 = VectorSpace.scale(c, VectorSpace.scale(b, a)) val v2 = VectorSpace.scale(vs.field.times(c, b), a) eqfn(v1, v2) } - def identityOne[F, C[_]](eqfn: (C[F], C[F]) => Boolean)(implicit vs: VectorSpace[F, C], - arb: Arbitrary[C[F]]) = + def identityOne[F, C[_]]( + eqfn: (C[F], C[F]) => Boolean + )(implicit vs: VectorSpace[F, C], arb: Arbitrary[C[F]]) = forAll { (a: C[F]) => eqfn(VectorSpace.scale(vs.field.one, a), a) } - def distributesOverScalarPlus[F, C[_]](eqfn: (C[F], C[F]) => Boolean)(implicit vs: VectorSpace[F, C], - arbC: Arbitrary[C[F]], - arbF: Arbitrary[F]) = + def distributesOverScalarPlus[F, C[_]]( + eqfn: (C[F], C[F]) => Boolean + )(implicit vs: VectorSpace[F, C], arbC: Arbitrary[C[F]], arbF: Arbitrary[F]) = forAll { (a: C[F], b: F, c: F) => val v1 = VectorSpace.scale(vs.field.plus(b, c), a) val v2 = vs.group.plus(VectorSpace.scale(b, a), VectorSpace.scale(c, a)) eqfn(v1, v2) } - def vectorSpaceLaws[F, C[_]](eqfn: (C[F], C[F]) => Boolean)(implicit vs: VectorSpace[F, C], - arbC: Arbitrary[C[F]], - arbF: Arbitrary[F]) = + def vectorSpaceLaws[F, C[_]]( + eqfn: (C[F], C[F]) => Boolean + )(implicit vs: VectorSpace[F, C], arbC: Arbitrary[C[F]], arbF: Arbitrary[F]) = isEqualIfZero(eqfn) && distributesWithPlus(eqfn) && isAssociative(eqfn) && identityOne(eqfn) && distributesOverScalarPlus( - eqfn) + eqfn + ) def beCloseTo(a: Double, b: Double) = a == b || (math.abs(a - b) / math.abs(a)) < 1e-10 || (a.isInfinite && b.isInfinite) || a.isNaN || b.isNaN diff --git a/algebird-test/src/main/scala/com/twitter/algebird/FunctorLaws.scala b/algebird-test/src/main/scala/com/twitter/algebird/FunctorLaws.scala index 6e75c8254..d07c967d2 100644 --- a/algebird-test/src/main/scala/com/twitter/algebird/FunctorLaws.scala +++ b/algebird-test/src/main/scala/com/twitter/algebird/FunctorLaws.scala @@ -25,29 +25,35 @@ import org.scalacheck.Prop.forAll object FunctorLaws { import BaseProperties.{DefaultHigherEq, HigherEq} - def identityLaw[M[_], V](eq: HigherEq[M] = new DefaultHigherEq[M])(implicit - functor: Functor[M], - arb: Arbitrary[M[V]]): Prop = + def identityLaw[M[_], V](eq: HigherEq[M] = new DefaultHigherEq[M])( + implicit + functor: Functor[M], + arb: Arbitrary[M[V]] + ): Prop = forAll { (mv: M[V]) => eq(functor.map(mv) { x => x }, mv) } - def composeLaw[M[_], T, U, V](eq: HigherEq[M] = new DefaultHigherEq[M])(implicit - functor: Functor[M], - arb: Arbitrary[M[T]], - arbFn1: Arbitrary[T => U], - arbFn2: Arbitrary[U => V]): Prop = + def composeLaw[M[_], T, U, V](eq: HigherEq[M] = new DefaultHigherEq[M])( + implicit + functor: Functor[M], + arb: Arbitrary[M[T]], + arbFn1: Arbitrary[T => U], + arbFn2: Arbitrary[U => V] + ): Prop = forAll { (mt: M[T], fn1: T => U, fn2: U => V) => eq(functor.map(mt)(fn1.andThen(fn2)), functor.map(functor.map(mt)(fn1))(fn2)) } - def functorLaws[M[_], T, U, V](eq: HigherEq[M] = new DefaultHigherEq[M])(implicit - functor: Functor[M], - arbMt: Arbitrary[M[T]], - arbMv: Arbitrary[M[V]], - arbFn1: Arbitrary[T => U], - arbFn2: Arbitrary[U => V]): Prop = + def functorLaws[M[_], T, U, V](eq: HigherEq[M] = new DefaultHigherEq[M])( + implicit + functor: Functor[M], + arbMt: Arbitrary[M[T]], + arbMv: Arbitrary[M[V]], + arbFn1: Arbitrary[T => U], + arbFn2: Arbitrary[U => V] + ): Prop = identityLaw[M, V](eq) && composeLaw[M, T, U, V](eq) } diff --git a/algebird-test/src/main/scala/com/twitter/algebird/MonadLaws.scala b/algebird-test/src/main/scala/com/twitter/algebird/MonadLaws.scala index 23b88f617..8ad55b5d5 100644 --- a/algebird-test/src/main/scala/com/twitter/algebird/MonadLaws.scala +++ b/algebird-test/src/main/scala/com/twitter/algebird/MonadLaws.scala @@ -32,11 +32,13 @@ object MonadLaws { } @deprecated("use leftIdentity[T]", since = "0.13.0") - def leftIdentityEquiv[M[_], T, U](implicit - monad: Monad[M], - arb: Arbitrary[T], - arbfn: Arbitrary[(T) => M[U]], - equiv: Equiv[M[U]]) = + def leftIdentityEquiv[M[_], T, U]( + implicit + monad: Monad[M], + arb: Arbitrary[T], + arbfn: Arbitrary[(T) => M[U]], + equiv: Equiv[M[U]] + ) = leftIdentity[M, T, U] @deprecated("use rightIdentity[T]", since = "0.13.0") @@ -44,46 +46,53 @@ object MonadLaws { rightIdentity[M, T] @deprecated("use associative[T]", since = "0.13.0") - def associativeEquiv[M[_], T, U, V](implicit monad: Monad[M], - arb: Arbitrary[M[T]], - fn1: Arbitrary[(T) => M[U]], - fn2: Arbitrary[U => M[V]], - equiv: Equiv[M[V]]) = + def associativeEquiv[M[_], T, U, V]( + implicit monad: Monad[M], + arb: Arbitrary[M[T]], + fn1: Arbitrary[(T) => M[U]], + fn2: Arbitrary[U => M[V]], + equiv: Equiv[M[V]] + ) = associative[M, T, U, V] // Just generate a map and use that as a function: - implicit def fnArb[M[_], T, U](implicit - map: Arbitrary[Map[T, M[U]]], - arbu: Arbitrary[M[U]]): Arbitrary[T => M[U]] = + implicit def fnArb[M[_], T, U]( + implicit + map: Arbitrary[Map[T, M[U]]], + arbu: Arbitrary[M[U]] + ): Arbitrary[T => M[U]] = Arbitrary { for { m <- implicitly[Arbitrary[Map[T, M[U]]]].arbitrary defu <- implicitly[Arbitrary[M[U]]].arbitrary - } yield - ({ (t: T) => - m.getOrElse(t, defu) - }) + } yield ({ (t: T) => + m.getOrElse(t, defu) + }) } @deprecated("use monadLaws[T]", since = "0.13.0") - def monadLawsEquiv[M[_], T, U, R](implicit - monad: Monad[M], - arb: Arbitrary[M[T]], - equivT: Equiv[M[T]], - equivU: Equiv[M[U]], - equivR: Equiv[M[R]], - fn1: Arbitrary[(T) => M[U]], - arbr: Arbitrary[M[R]], - fn2: Arbitrary[U => M[R]], - arbu: Arbitrary[U]) = + def monadLawsEquiv[M[_], T, U, R]( + implicit + monad: Monad[M], + arb: Arbitrary[M[T]], + equivT: Equiv[M[T]], + equivU: Equiv[M[U]], + equivR: Equiv[M[R]], + fn1: Arbitrary[(T) => M[U]], + arbr: Arbitrary[M[R]], + fn2: Arbitrary[U => M[R]], + arbu: Arbitrary[U] + ) = monadLaws[M, T, U, R] // $COVERAGE-ON$ - def leftIdentity[M[_], T, U](implicit - monad: Monad[M], - arb: Arbitrary[T], - arbfn: Arbitrary[(T) => M[U]], - equiv: Equiv[M[U]]) = + def leftIdentity[M[_], T, U]( + implicit + monad: Monad[M], + arb: Arbitrary[T], + arbfn: Arbitrary[(T) => M[U]], + equiv: Equiv[M[U]] + ) = forAll { (t: T, fn: T => M[U]) => Equiv[M[U]].equiv(t.pure[M].flatMap(fn), fn(t)) } @@ -93,26 +102,30 @@ object MonadLaws { Equiv[M[T]].equiv(mt.flatMap { _.pure[M] }, mt) } - def associative[M[_], T, U, V](implicit monad: Monad[M], - arb: Arbitrary[M[T]], - fn1: Arbitrary[(T) => M[U]], - fn2: Arbitrary[U => M[V]], - equiv: Equiv[M[V]]) = forAll { (mt: M[T], f1: T => M[U], f2: U => M[V]) => + def associative[M[_], T, U, V]( + implicit monad: Monad[M], + arb: Arbitrary[M[T]], + fn1: Arbitrary[(T) => M[U]], + fn2: Arbitrary[U => M[V]], + equiv: Equiv[M[V]] + ) = forAll { (mt: M[T], f1: T => M[U], f2: U => M[V]) => Equiv[M[V]].equiv(mt.flatMap(f1).flatMap(f2), mt.flatMap { t => f1(t).flatMap(f2) }) } - def monadLaws[M[_], T, U, R](implicit - monad: Monad[M], - arb: Arbitrary[M[T]], - equivT: Equiv[M[T]], - equivU: Equiv[M[U]], - equivR: Equiv[M[R]], - fn1: Arbitrary[(T) => M[U]], - arbr: Arbitrary[M[R]], - fn2: Arbitrary[U => M[R]], - arbu: Arbitrary[U]) = + def monadLaws[M[_], T, U, R]( + implicit + monad: Monad[M], + arb: Arbitrary[M[T]], + equivT: Equiv[M[T]], + equivU: Equiv[M[U]], + equivR: Equiv[M[R]], + fn1: Arbitrary[(T) => M[U]], + arbr: Arbitrary[M[R]], + fn2: Arbitrary[U => M[R]], + arbu: Arbitrary[U] + ) = associative[M, T, U, R] && rightIdentity[M, R] && leftIdentity[M, U, R] implicit def indexedSeqA[T](implicit arbl: Arbitrary[List[T]]): Arbitrary[IndexedSeq[T]] = diff --git a/algebird-test/src/main/scala/com/twitter/algebird/scalacheck/IntervalInstances.scala b/algebird-test/src/main/scala/com/twitter/algebird/scalacheck/IntervalInstances.scala index c97e1b233..f879357c1 100644 --- a/algebird-test/src/main/scala/com/twitter/algebird/scalacheck/IntervalInstances.scala +++ b/algebird-test/src/main/scala/com/twitter/algebird/scalacheck/IntervalInstances.scala @@ -65,7 +65,9 @@ trait IntervalArb { genExclusiveLower[T], genInclusiveUpper[T], genExclusiveUpper[T], - genIntersection[T])) + genIntersection[T] + ) + ) implicit def lowerIntArb[T: Arbitrary: Ordering]: Arbitrary[Lower[T]] = Arbitrary(genLower) diff --git a/algebird-test/src/test/scala/com/twitter/algebird/AggregatorLaws.scala b/algebird-test/src/test/scala/com/twitter/algebird/AggregatorLaws.scala index 3821d9b76..f4c5b19d3 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/AggregatorLaws.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/AggregatorLaws.scala @@ -21,18 +21,19 @@ import org.scalacheck.Prop._ class AggregatorLaws extends CheckProperties { - implicit def aggregator[A, B, C](implicit prepare: Arbitrary[A => B], - sg: Semigroup[B], - present: Arbitrary[B => C]): Arbitrary[Aggregator[A, B, C]] = Arbitrary { + implicit def aggregator[A, B, C]( + implicit prepare: Arbitrary[A => B], + sg: Semigroup[B], + present: Arbitrary[B => C] + ): Arbitrary[Aggregator[A, B, C]] = Arbitrary { for { pp <- prepare.arbitrary ps <- present.arbitrary - } yield - new Aggregator[A, B, C] { - def prepare(a: A) = pp(a) - def semigroup = sg - def present(b: B) = ps(b) - } + } yield new Aggregator[A, B, C] { + def prepare(a: A) = pp(a) + def semigroup = sg + def present(b: B) = ps(b) + } } property("composing before Aggregator is correct") { @@ -66,9 +67,11 @@ class AggregatorLaws extends CheckProperties { property("Aggregator.zip composing two Aggregators is correct") { forAll { - (in: List[(Int, String)], - ag1: Aggregator[Int, Int, Int], - ag2: Aggregator[String, Set[String], Double]) => + ( + in: List[(Int, String)], + ag1: Aggregator[Int, Int, Int], + ag2: Aggregator[String, Set[String], Double] + ) => val c = ag1.zip(ag2) val (as, bs) = in.unzip in.isEmpty || c(in) == ((ag1(as), ag2(bs))) @@ -98,19 +101,20 @@ class AggregatorLaws extends CheckProperties { checkNumericSum[Float] } - implicit def monoidAggregator[A, B, C](implicit prepare: Arbitrary[A => B], - m: Monoid[B], - present: Arbitrary[B => C]): Arbitrary[MonoidAggregator[A, B, C]] = + implicit def monoidAggregator[A, B, C]( + implicit prepare: Arbitrary[A => B], + m: Monoid[B], + present: Arbitrary[B => C] + ): Arbitrary[MonoidAggregator[A, B, C]] = Arbitrary { for { pp <- prepare.arbitrary ps <- present.arbitrary - } yield - new MonoidAggregator[A, B, C] { - def prepare(a: A) = pp(a) - def monoid = m - def present(b: B) = ps(b) - } + } yield new MonoidAggregator[A, B, C] { + def prepare(a: A) = pp(a) + def monoid = m + def present(b: B) = ps(b) + } } property("Aggregator.count is like List.count") { diff --git a/algebird-test/src/test/scala/com/twitter/algebird/AppendAggregatorTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/AppendAggregatorTest.scala index 1b6d050cc..46cecf843 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/AppendAggregatorTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/AppendAggregatorTest.scala @@ -7,10 +7,12 @@ class AppendAggregatorTest extends WordSpec with Matchers { val mpty = Vector.empty[Int] // test the methods that appendSemigroup method defines or overrides - def testMethodsSemigroup[E, M, P](agg1: Aggregator[E, M, P], - agg2: Aggregator[E, M, P], - data: Seq[E], - empty: Seq[E]) { + def testMethodsSemigroup[E, M, P]( + agg1: Aggregator[E, M, P], + agg2: Aggregator[E, M, P], + data: Seq[E], + empty: Seq[E] + ) { val n = data.length val (half1, half2) = data.splitAt(n / 2) @@ -35,10 +37,12 @@ class AppendAggregatorTest extends WordSpec with Matchers { } // test the methods that appendMonoid method defines or overrides - def testMethodsMonoid[E, M, P](agg1: MonoidAggregator[E, M, P], - agg2: MonoidAggregator[E, M, P], - data: Seq[E], - empty: Seq[E]) { + def testMethodsMonoid[E, M, P]( + agg1: MonoidAggregator[E, M, P], + agg2: MonoidAggregator[E, M, P], + data: Seq[E], + empty: Seq[E] + ) { testMethodsSemigroup(agg1, agg2, data, empty) diff --git a/algebird-test/src/test/scala/com/twitter/algebird/ApproximateTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/ApproximateTest.scala index 070aeec50..dde6fb2b9 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/ApproximateTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/ApproximateTest.scala @@ -59,7 +59,9 @@ class ApproximateLaws extends CheckProperties { trueGen, falseGen, Gen.const(ApproximateBoolean.exact(true)), - Gen.const(ApproximateBoolean.exact(false)))) + Gen.const(ApproximateBoolean.exact(false)) + ) + ) property("Boolean: &&") { forAll { (a: ApproximateBoolean) => diff --git a/algebird-test/src/test/scala/com/twitter/algebird/BloomFilterTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/BloomFilterTest.scala index 618e12b5a..96dff5dbd 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/BloomFilterTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/BloomFilterTest.scala @@ -70,7 +70,8 @@ class BloomFilterLaws extends CheckProperties { property( "the distance between a filter and an empty filter should be the number of bits" + - "set in the existing filter") { + "set in the existing filter" + ) { forAll { (a: BF[String]) => a.hammingDistance(bfMonoid.zero) == a.numBits } @@ -193,7 +194,8 @@ class BFHashIndices extends CheckProperties { } property( - "Indices of the two versions of BFHashes are the same, unless the first one contains negative index") { + "Indices of the two versions of BFHashes are the same, unless the first one contains negative index" + ) { forAll { (pair: (BFHash[String], NegativeBFHash), v: Long) => val s = v.toString val (hash, negativeHash) = pair diff --git a/algebird-test/src/test/scala/com/twitter/algebird/CollectionSpecification.scala b/algebird-test/src/test/scala/com/twitter/algebird/CollectionSpecification.scala index d89204ee4..13d14edbb 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/CollectionSpecification.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/CollectionSpecification.scala @@ -139,9 +139,10 @@ class CollectionSpecification extends CheckProperties { } property("MMap[Int,Int] Monoid laws") { - isAssociativeDifferentTypes[ScMap[Int, Int], MMap[Int, Int]] && weakZeroDifferentTypes[ - ScMap[Int, Int], - MMap[Int, Int]] + isAssociativeDifferentTypes[ScMap[Int, Int], MMap[Int, Int]] && weakZeroDifferentTypes[ScMap[Int, Int], MMap[ + Int, + Int + ]] } property("Map[Int,Int] has -") { @@ -165,9 +166,10 @@ class CollectionSpecification extends CheckProperties { } property("MMap[Int,String] Monoid laws") { - isAssociativeDifferentTypes[ScMap[Int, Int], MMap[Int, Int]] && weakZeroDifferentTypes[ - ScMap[Int, Int], - MMap[Int, Int]] + isAssociativeDifferentTypes[ScMap[Int, Int], MMap[Int, Int]] && weakZeroDifferentTypes[ScMap[Int, Int], MMap[ + Int, + Int + ]] } // We haven't implemented ring.one yet for the Map, so skip the one property @@ -316,9 +318,11 @@ class CollectionSpecification extends CheckProperties { forAll { (items: Set[Int]) => (mapEq.equiv( MapAlgebra.mergeLookup[Int, Option[Int], Int](items)(square)(_ => None), - Map((None: Option[Int]) -> Monoid.sum(items.map(x => square(x).getOrElse(0))))) && mapEq.equiv( + Map((None: Option[Int]) -> Monoid.sum(items.map(x => square(x).getOrElse(0)))) + ) && mapEq.equiv( MapAlgebra.mergeLookup[Int, Int, Int](items)(square)(identity), - MapAlgebra.sumByKey(items.map(x => x -> square(x).getOrElse(0))))) + MapAlgebra.sumByKey(items.map(x => x -> square(x).getOrElse(0))) + )) } } @@ -329,10 +333,9 @@ class CollectionSpecification extends CheckProperties { } yield AdaptiveVector.fromVector(Vector(l: _*), sparse), for { m <- Arbitrary.arbitrary[Map[Int, T]] - } yield - AdaptiveVector.fromMap(m.filter { - case (k, _) => (k < 1000) && (k >= 0) - }, sparse, 1000), + } yield AdaptiveVector.fromMap(m.filter { + case (k, _) => (k < 1000) && (k >= 0) + }, sparse, 1000), for { size <- Gen.posNum[Int] } yield AdaptiveVector.fromMap(Map.empty, sparse, size) diff --git a/algebird-test/src/test/scala/com/twitter/algebird/CountMinSketchTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/CountMinSketchTest.scala index 523ea0989..a3d2c4cf6 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/CountMinSketchTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/CountMinSketchTest.scala @@ -14,7 +14,7 @@ object CmsLaws { class CmsLaws extends CheckProperties { import BaseProperties._ - val DELTA = 1E-8 + val DELTA = 1e-8 val EPS = 0.005 val SEED = 1 @@ -81,7 +81,7 @@ class CmsLaws extends CheckProperties { class TopPctCmsLaws extends CheckProperties { import BaseProperties._ - val DELTA = 1E-8 + val DELTA = 1e-8 val EPS = 0.005 val SEED = 1 val HEAVY_HITTERS_PCT = 0.1 @@ -148,7 +148,7 @@ class SparseCMSTest extends WordSpec with Matchers with GeneratorDrivenPropertyC import BaseProperties._ - val DELTA = 1E-8 + val DELTA = 1e-8 val EPS = 0.005 val SEED = 1 @@ -167,7 +167,7 @@ class CMSInstanceTest extends WordSpec with Matchers with GeneratorDrivenPropert import BaseProperties._ - val DELTA = 1E-8 + val DELTA = 1e-8 val EPS = 0.005 val SEED = 1 @@ -217,7 +217,7 @@ class CMSContraMapSpec extends WordSpec with Matchers with GeneratorDrivenProper // When we create a monoid for L implicit val hasherBytes = sourceHasher.contramap((d: Seq[Byte]) => f(d)) val bytesMonoid: CMSMonoid[Seq[Byte]] = { - val anyDelta = 1E-10 + val anyDelta = 1e-10 val anyEps = 0.001 val anySeed = 1 CMS.monoid[Seq[Byte]](anyEps, anyDelta, anySeed) @@ -279,13 +279,15 @@ class CMSContraMapSpec extends WordSpec with Matchers with GeneratorDrivenProper fiveKey, fiveKey, fiveKey, - fiveKey) + fiveKey + ) val minWidth = data1.distinct.size forAll( (Gen.choose(1, 70), "depth"), (Gen.choose(minWidth, 1000), "width"), - (Gen.choose(Int.MinValue, Int.MaxValue), "seed")) { (depth: Int, width: Int, seed: Int) => + (Gen.choose(Int.MinValue, Int.MaxValue), "seed") + ) { (depth: Int, width: Int, seed: Int) => val cms1: TopCMS[Seq[Byte]] = TopPctCMS.monoid[Seq[Byte]](depth, width, seed, 0.01).create(data1) cms1.heavyHitters should be(Set(oneKey, twoKey, threeKey, fourKey, fiveKey)) @@ -316,7 +318,7 @@ class CMSBytesTest extends CMSTest[Bytes](CmsLaws.int2Bytes(_)) abstract class CmsProperty[K] extends ApproximateProperty object CmsProperty { - val delta = 1E-10 + val delta = 1e-10 val eps = 0.001 val seed = 1 @@ -418,7 +420,7 @@ abstract class CMSTest[K: CMSHasher](toK: Int => K) with Matchers with GeneratorDrivenPropertyChecks { - val DELTA = 1E-10 + val DELTA = 1e-10 val EPS = 0.001 val SEED = 1 @@ -652,7 +654,8 @@ abstract class CMSTest[K: CMSHasher](toK: Int => K) forAll( (Gen.choose(minDepth, maxDepth), "depth"), (Gen.choose(minWidth, maxWidth), "width"), - (Gen.choose(Int.MinValue, Int.MaxValue), "seed")) { (depth: Int, width: Int, seed: Int) => + (Gen.choose(Int.MinValue, Int.MaxValue), "seed") + ) { (depth: Int, width: Int, seed: Int) => val cms1 = TopPctCMS.monoid[K](depth, width, seed, 0.01).create(data1) cms1.heavyHitters should be(Set(1, 2, 3, 4, 5).map(toK)) @@ -976,7 +979,8 @@ class CMSFunctionsSpec extends PropSpec with PropertyChecks with Matchers { CMSFunctions.delta(invalidDepth) } (exception.getMessage should fullyMatch).regex( - """requirement failed: depth must be smaller as it causes precision errors when computing delta \(\d+ led to an invalid delta of 0.0\)""") + """requirement failed: depth must be smaller as it causes precision errors when computing delta \(\d+ led to an invalid delta of 0.0\)""" + ) } } } @@ -996,7 +1000,7 @@ class CMSFunctionsSpec extends PropSpec with PropertyChecks with Matchers { class CMSParamsSpec extends PropSpec with PropertyChecks with Matchers { val AnyEps = 0.001 - val AnyDelta = 1E-5 + val AnyDelta = 1e-5 val AnyHashes = { val AnySeed = 1 CMSFunctions.generateHashes[Long](AnyEps, AnyDelta, AnySeed) diff --git a/algebird-test/src/test/scala/com/twitter/algebird/DecayedVectorProperties.scala b/algebird-test/src/test/scala/com/twitter/algebird/DecayedVectorProperties.scala index 1fd1fca8e..143ccabda 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/DecayedVectorProperties.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/DecayedVectorProperties.scala @@ -29,8 +29,10 @@ class DecayedVectorProperties extends CheckProperties { } // TODO: we won't need this when we have an Equatable trait - def decayedMapEqFn(a: DecayedVector[({ type x[a] = Map[Int, a] })#x], - b: DecayedVector[({ type x[a] = Map[Int, a] })#x]) = { + def decayedMapEqFn( + a: DecayedVector[({ type x[a] = Map[Int, a] })#x], + b: DecayedVector[({ type x[a] = Map[Int, a] })#x] + ) = { def beCloseTo(a: Double, b: Double, eps: Double = 1e-6) = a == b || (math.abs(a - b) / math.abs(a)) < eps || (a.isInfinite && b.isInfinite) || a.isNaN || b.isNaN val mapsAreClose = (a.vector.keySet ++ b.vector.keySet).forall { key => diff --git a/algebird-test/src/test/scala/com/twitter/algebird/EventuallyTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/EventuallyTest.scala index 18954c09c..39f10850a 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/EventuallyTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/EventuallyTest.scala @@ -101,41 +101,51 @@ class EventuallyTest extends WordSpec with Matchers { "sumOption L,L,L" in { assert( - eventuallyMonoid.sum(List(Left(short.length), Left(short.length), Left(short.length))) == Left( - 3 * short.length)) + eventuallyMonoid + .sum(List(Left(short.length), Left(short.length), Left(short.length))) == Left(3 * short.length) + ) assert( eventuallyMonoid.sum(List(Left(long.length), Left(short.length), Left(short.length))) == Left( - 2 * short.length + long.length)) + 2 * short.length + long.length + ) + ) } "sumOption L,R,L" in { assert( - eventuallyMonoid.sum(List(Left(short.length), Right(short), Left(short.length))) == Left( - 3 * short.length)) + eventuallyMonoid + .sum(List(Left(short.length), Right(short), Left(short.length))) == Left(3 * short.length) + ) assert( eventuallyMonoid.sum(List(Left(long.length), Right(short), Left(short.length))) == Left( - 2 * short.length + long.length)) + 2 * short.length + long.length + ) + ) } "sumOption R,R,R" in { assert( eventuallyMonoid - .sum(List(Right(short), Right(short), Right(short))) == Right(short + short + short)) + .sum(List(Right(short), Right(short), Right(short))) == Right(short + short + short) + ) assert( eventuallyMonoid - .sum(List(Right(long), Right(short), Right(short))) == Left(2 * short.length + long.length)) + .sum(List(Right(long), Right(short), Right(short))) == Left(2 * short.length + long.length) + ) } "sumOption 1010 R, L ,R" in { assert( eventuallyMonoid - .sum(listOfRights :+ Left(short.length) :+ Right(short)) == Left(1012 * short.length)) + .sum(listOfRights :+ Left(short.length) :+ Right(short)) == Left(1012 * short.length) + ) } "sumOption 1010 L, R ,L" in { assert( eventuallyMonoid - .sum(listOfLefts :+ Right(short) :+ Left(short.length)) == Left(1012 * short.length)) + .sum(listOfLefts :+ Right(short) :+ Left(short.length)) == Left(1012 * short.length) + ) } } @@ -143,23 +153,25 @@ class EventuallyTest extends WordSpec with Matchers { } class EventuallyAggregatorLaws extends PropSpec with PropertyChecks with Matchers { - implicit def aggregator[A, B, C](implicit - prepare: Arbitrary[A => B], - sg: Semigroup[B], - present: Arbitrary[B => C]): Arbitrary[Aggregator[A, B, C]] = Arbitrary { + implicit def aggregator[A, B, C]( + implicit + prepare: Arbitrary[A => B], + sg: Semigroup[B], + present: Arbitrary[B => C] + ): Arbitrary[Aggregator[A, B, C]] = Arbitrary { for { pp <- prepare.arbitrary ps <- present.arbitrary - } yield - new Aggregator[A, B, C] { - def prepare(a: A) = pp(a) - def semigroup = sg - def present(b: B) = ps(b) - } + } yield new Aggregator[A, B, C] { + def prepare(a: A) = pp(a) + def semigroup = sg + def present(b: B) = ps(b) + } } - def eventuallyAggregator(rightAg: Aggregator[Int, List[Int], Int])( - pred: (List[Int] => Boolean)): EventuallyAggregator[Int, Double, List[Int], String] = + def eventuallyAggregator( + rightAg: Aggregator[Int, List[Int], Int] + )(pred: (List[Int] => Boolean)): EventuallyAggregator[Int, Double, List[Int], String] = new EventuallyAggregator[Int, Double, List[Int], String] { def presentLeft(e: Double) = "Left" diff --git a/algebird-test/src/test/scala/com/twitter/algebird/ExpHistLaws.scala b/algebird-test/src/test/scala/com/twitter/algebird/ExpHistLaws.scala index c88cb6375..db64cec6c 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/ExpHistLaws.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/ExpHistLaws.scala @@ -160,7 +160,8 @@ class ExpHistLaws extends PropSpec with PropertyChecks { ExpHist .empty(conf) .add(bucket.size, bucket.timestamp) - .upperBoundSum == bucket.size) + .upperBoundSum == bucket.size + ) } } diff --git a/algebird-test/src/test/scala/com/twitter/algebird/FoldTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/FoldTest.scala index 499bcc2e8..aa0e1122e 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/FoldTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/FoldTest.scala @@ -37,7 +37,8 @@ class FoldTest extends WordSpec { Zero(Seq.empty), One(1, Seq(1)), Many(Seq(1, 2, 3), Seq(1, 2, 3)), - Many(Seq(2, 1, 3), Seq(2, 1, 3))) + Many(Seq(2, 1, 3), Seq(2, 1, 3)) + ) } "const" in { @@ -49,7 +50,8 @@ class FoldTest extends WordSpec { Fold.first, Zero(None), One("1", Some("1")), - Many(Seq("1", "2", "3"), Some("1"))) + Many(Seq("1", "2", "3"), Some("1")) + ) } "last" in { @@ -57,7 +59,8 @@ class FoldTest extends WordSpec { Fold.last, Zero(None), One("1", Some("1")), - Many(Seq("1", "2", "3"), Some("3"))) + Many(Seq("1", "2", "3"), Some("3")) + ) } "max" in { @@ -66,7 +69,8 @@ class FoldTest extends WordSpec { Zero(None), One(1, Some(1)), Many(Seq(1, 2, 3), Some(3)), - Many(Seq(1, 3, 2), Some(3))) + Many(Seq(1, 3, 2), Some(3)) + ) } "min" in { @@ -75,7 +79,8 @@ class FoldTest extends WordSpec { Zero(None), One(1, Some(1)), Many(Seq(1, 2, 3), Some(1)), - Many(Seq(2, 1, 3), Some(1))) + Many(Seq(2, 1, 3), Some(1)) + ) } "sum" in { diff --git a/algebird-test/src/test/scala/com/twitter/algebird/GeneratedAbstractAlgebraLaws.scala b/algebird-test/src/test/scala/com/twitter/algebird/GeneratedAbstractAlgebraLaws.scala index c3e094baa..e26f6bb19 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/GeneratedAbstractAlgebraLaws.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/GeneratedAbstractAlgebraLaws.scala @@ -82,52 +82,56 @@ class GeneratedAbstractAlgebraLaws extends CheckProperties { ringLaws[T] && isCommutative[T] } property("tuple21 is a ring") { - type T = (Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int) + type T = ( + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ) ringLaws[T] && isCommutative[T] } property("tuple22 is a ring") { - type T = (Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int) + type T = ( + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ) ringLaws[T] && isCommutative[T] } } diff --git a/algebird-test/src/test/scala/com/twitter/algebird/GeneratedProductAlgebraLaws.scala b/algebird-test/src/test/scala/com/twitter/algebird/GeneratedProductAlgebraLaws.scala index de5d41327..3b0c88894 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/GeneratedProductAlgebraLaws.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/GeneratedProductAlgebraLaws.scala @@ -78,14 +78,16 @@ class GeneratedProductAlgebraLaws extends CheckProperties { (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int) implicit val ring = Ring[T, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]( Tuple14.apply, - Tuple14.unapply) + Tuple14.unapply + ) ringLaws[T] && isCommutative[T] } property("Product15Ring is a ring") { type T = (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int) implicit val ring = Ring[T, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]( Tuple15.apply, - Tuple15.unapply) + Tuple15.unapply + ) ringLaws[T] && isCommutative[T] } property("Product16Ring is a ring") { @@ -93,7 +95,8 @@ class GeneratedProductAlgebraLaws extends CheckProperties { implicit val ring = Ring[T, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]( Tuple16.apply, - Tuple16.unapply) + Tuple16.unapply + ) ringLaws[T] && isCommutative[T] } property("Product17Ring is a ring") { @@ -101,7 +104,8 @@ class GeneratedProductAlgebraLaws extends CheckProperties { implicit val ring = Ring[T, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]( Tuple17.apply, - Tuple17.unapply) + Tuple17.unapply + ) ringLaws[T] && isCommutative[T] } property("Product18Ring is a ring") { @@ -109,7 +113,8 @@ class GeneratedProductAlgebraLaws extends CheckProperties { implicit val ring = Ring[T, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]( Tuple18.apply, - Tuple18.unapply) + Tuple18.unapply + ) ringLaws[T] && isCommutative[T] } property("Product19Ring is a ring") { @@ -117,7 +122,8 @@ class GeneratedProductAlgebraLaws extends CheckProperties { implicit val ring = Ring[T, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]( Tuple19.apply, - Tuple19.unapply) + Tuple19.unapply + ) ringLaws[T] && isCommutative[T] } property("Product20Ring is a ring") { @@ -144,31 +150,34 @@ class GeneratedProductAlgebraLaws extends CheckProperties { Int, Int, Int, - Int](Tuple20.apply, Tuple20.unapply) + Int + ](Tuple20.apply, Tuple20.unapply) ringLaws[T] && isCommutative[T] } property("Product21Ring is a ring") { - type T = (Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int) + type T = ( + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ) implicit val ring = Ring[ T, Int, @@ -191,32 +200,35 @@ class GeneratedProductAlgebraLaws extends CheckProperties { Int, Int, Int, - Int](Tuple21.apply, Tuple21.unapply) + Int + ](Tuple21.apply, Tuple21.unapply) ringLaws[T] && isCommutative[T] } property("Product22Ring is a ring") { - type T = (Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int) + type T = ( + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ) implicit val ring = Ring[ T, Int, @@ -240,7 +252,8 @@ class GeneratedProductAlgebraLaws extends CheckProperties { Int, Int, Int, - Int](Tuple22.apply, Tuple22.unapply) + Int + ](Tuple22.apply, Tuple22.unapply) ringLaws[T] && isCommutative[T] } } diff --git a/algebird-test/src/test/scala/com/twitter/algebird/HyperLogLogTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/HyperLogLogTest.scala index 6e6c737f5..a91dacf55 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/HyperLogLogTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/HyperLogLogTest.scala @@ -19,7 +19,8 @@ object ReferenceHyperLogLog { .map { bi => (bi._1, bi._2 * 8) } - .flatMap { byteToIndicator(_) }: _*) + .flatMap { byteToIndicator(_) }: _* + ) def byteToIndicator(bi: (Byte, Int)): Seq[Int] = (0 to 7).flatMap { i => if (((bi._1 >> (7 - i)) & 1) == 1) { @@ -270,20 +271,20 @@ class SetSizeAggregatorProperties extends ApproximateProperties("SetSizeAggregat for (bits <- List(5, 7, 8, 10)) { property( - s"work as an Aggregator and return exact size when <= maxSetSize for $bits bits, using conversion to Array[Byte]") = - toProp(new SmallBytesSetSizeAggregatorProperty[Int](bits), 100, 1, 0.01) + s"work as an Aggregator and return exact size when <= maxSetSize for $bits bits, using conversion to Array[Byte]" + ) = toProp(new SmallBytesSetSizeAggregatorProperty[Int](bits), 100, 1, 0.01) property( - s"work as an Aggregator and return exact size when <= maxSetSize for $bits bits, using Hash128") = - toProp(new SmallSetSizeHashAggregatorProperty[Int](bits), 100, 1, 0.01) + s"work as an Aggregator and return exact size when <= maxSetSize for $bits bits, using Hash128" + ) = toProp(new SmallSetSizeHashAggregatorProperty[Int](bits), 100, 1, 0.01) } for (bits <- List(5, 7, 8, 10)) { property( - s"work as an Aggregator and return approximate size when > maxSetSize for $bits bits, using conversion to Array[Byte]") = - toProp(new LargeBytesSetSizeAggregatorProperty[Int](bits), 100, 1, 0.01) + s"work as an Aggregator and return approximate size when > maxSetSize for $bits bits, using conversion to Array[Byte]" + ) = toProp(new LargeBytesSetSizeAggregatorProperty[Int](bits), 100, 1, 0.01) property( - s"work as an Aggregator and return approximate size when > maxSetSize for $bits bits, using Hash128") = - toProp(new LargeSetSizeHashAggregatorProperty[Int](bits), 100, 1, 0.01) + s"work as an Aggregator and return approximate size when > maxSetSize for $bits bits, using Hash128" + ) = toProp(new LargeSetSizeHashAggregatorProperty[Int](bits), 100, 1, 0.01) } } diff --git a/algebird-test/src/test/scala/com/twitter/algebird/MinMaxAggregatorSpec.scala b/algebird-test/src/test/scala/com/twitter/algebird/MinMaxAggregatorSpec.scala index ce7afe98e..46d054511 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/MinMaxAggregatorSpec.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/MinMaxAggregatorSpec.scala @@ -8,15 +8,17 @@ class MinMaxAggregatorSpec extends WordSpec with Matchers { case object TestElementB extends TestElementParent case object TestElementC extends TestElementParent - implicit val testOrdering = Ordering.fromLessThan[TestElementParent]((x, y) => - (x, y) match { - case (TestElementA, TestElementA) => false - case (TestElementA, _) => true - case (TestElementB, TestElementB) => false - case (TestElementB, TestElementA) => false - case (TestElementB, TestElementC) => true - case (TestElementC, _) => false - }) + implicit val testOrdering = Ordering.fromLessThan[TestElementParent]( + (x, y) => + (x, y) match { + case (TestElementA, TestElementA) => false + case (TestElementA, _) => true + case (TestElementB, TestElementB) => false + case (TestElementB, TestElementA) => false + case (TestElementB, TestElementC) => true + case (TestElementC, _) => false + } + ) val data = List(TestElementC, TestElementA, TestElementB) diff --git a/algebird-test/src/test/scala/com/twitter/algebird/NumericSpecification.scala b/algebird-test/src/test/scala/com/twitter/algebird/NumericSpecification.scala index 84484ec7f..42a02e57f 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/NumericSpecification.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/NumericSpecification.scala @@ -39,7 +39,8 @@ class NumericSpecification extends PropSpec with PropertyChecks with Matchers { (a == mon.plus(mon.zero, a)) && (a == mon.plus(a, mon.zero)) && (a == grp.minus(a, grp.zero)) && - (mon.nonZeroOption(a) == Some(a).filter { _ != num.zero })) + (mon.nonZeroOption(a) == Some(a).filter { _ != num.zero }) + ) } def zeroProps[T: Monoid: Numeric] = { @@ -47,7 +48,8 @@ class NumericSpecification extends PropSpec with PropertyChecks with Matchers { val num = implicitly[Numeric[T]] assert( (num.zero == mon.zero) && (!mon.isNonZero(mon.zero)) && (mon - .nonZeroOption(mon.zero) == None)) + .nonZeroOption(mon.zero) == None) + ) } property("Int zero") { @@ -97,7 +99,8 @@ class NumericSpecification extends PropSpec with PropertyChecks with Matchers { val num = implicitly[Numeric[T]] assert( (num.one == ring.one) && (a == ring.times(a, ring.one)) && (a == ring - .times(ring.one, a))) + .times(ring.one, a)) + ) } property("Int one") { oneNumericProp[Int] diff --git a/algebird-test/src/test/scala/com/twitter/algebird/PreparerLaws.scala b/algebird-test/src/test/scala/com/twitter/algebird/PreparerLaws.scala index f15d23e65..073fa1aef 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/PreparerLaws.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/PreparerLaws.scala @@ -21,18 +21,19 @@ import org.scalacheck.Prop._ class PreparerLaws extends CheckProperties { - implicit def aggregator[A, B, C](implicit prepare: Arbitrary[A => B], - sg: Semigroup[B], - present: Arbitrary[B => C]): Arbitrary[Aggregator[A, B, C]] = Arbitrary { + implicit def aggregator[A, B, C]( + implicit prepare: Arbitrary[A => B], + sg: Semigroup[B], + present: Arbitrary[B => C] + ): Arbitrary[Aggregator[A, B, C]] = Arbitrary { for { pp <- prepare.arbitrary ps <- present.arbitrary - } yield - new Aggregator[A, B, C] { - def prepare(a: A) = pp(a) - def semigroup = sg - def present(b: B) = ps(b) - } + } yield new Aggregator[A, B, C] { + def prepare(a: A) = pp(a) + def semigroup = sg + def present(b: B) = ps(b) + } } property("mapping before aggregate is correct") { @@ -51,19 +52,20 @@ class PreparerLaws extends CheckProperties { } } - implicit def monoidAggregator[A, B, C](implicit prepare: Arbitrary[A => B], - m: Monoid[B], - present: Arbitrary[B => C]): Arbitrary[MonoidAggregator[A, B, C]] = + implicit def monoidAggregator[A, B, C]( + implicit prepare: Arbitrary[A => B], + m: Monoid[B], + present: Arbitrary[B => C] + ): Arbitrary[MonoidAggregator[A, B, C]] = Arbitrary { for { pp <- prepare.arbitrary ps <- present.arbitrary - } yield - new MonoidAggregator[A, B, C] { - def prepare(a: A) = pp(a) - def monoid = m - def present(b: B) = ps(b) - } + } yield new MonoidAggregator[A, B, C] { + def prepare(a: A) = pp(a) + def monoid = m + def present(b: B) = ps(b) + } } property("flatten before aggregate is correct") { diff --git a/algebird-test/src/test/scala/com/twitter/algebird/QTreeTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/QTreeTest.scala index d7b407bf6..e5f89a965 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/QTreeTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/QTreeTest.scala @@ -121,7 +121,7 @@ class QTreeTest extends WordSpec with Matchers { assert(interval.contains(truth)) } "work as an aggregator for longs with a small stream" in { - val list = randomList(10000).map(i => (i * 1000l).toLong) + val list = randomList(10000).map(i => (i * 1000L).toLong) val agg = QTreeAggregator(quantile)(implicitly[Numeric[Long]]) val interval = agg(list) val truth = trueQuantile(list, quantile) diff --git a/algebird-test/src/test/scala/com/twitter/algebird/RightFolded2Test.scala b/algebird-test/src/test/scala/com/twitter/algebird/RightFolded2Test.scala index d7620f42f..3af7bf4d9 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/RightFolded2Test.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/RightFolded2Test.scala @@ -16,17 +16,21 @@ class RightFolded2Test extends CheckProperties { def rightFolded2Value[In, Out, Acc]( implicit arbout: Arbitrary[Out], - mon: RightFolded2Monoid[In, Out, Acc]): Gen[RightFoldedValue2[In, Out, Acc]] = + mon: RightFolded2Monoid[In, Out, Acc] + ): Gen[RightFoldedValue2[In, Out, Acc]] = for (v <- arbout.arbitrary) yield mon.init(v) - def rightFolded2ToFold[In, Out, Acc](implicit arbin: Arbitrary[In], - mon: RightFolded2Monoid[In, Out, Acc]): Gen[RightFoldedToFold2[In]] = + def rightFolded2ToFold[In, Out, Acc]( + implicit arbin: Arbitrary[In], + mon: RightFolded2Monoid[In, Out, Acc] + ): Gen[RightFoldedToFold2[In]] = for (v <- arbin.arbitrary) yield mon.toFold(v) implicit def rightFolded2[In, Out, Acc]( implicit arbin: Arbitrary[In], arbout: Arbitrary[Out], - mon: RightFolded2Monoid[In, Out, Acc]): Arbitrary[RightFolded2[In, Out, Acc]] = + mon: RightFolded2Monoid[In, Out, Acc] + ): Arbitrary[RightFolded2[In, Out, Acc]] = Arbitrary { Gen.oneOf(rightFolded2Value[In, Out, Acc], rightFolded2ToFold[In, Out, Acc]) } @@ -54,13 +58,15 @@ class RightFolded2Test extends CheckProperties { Some( l.dropRight(1) .flatMap { _.asInstanceOf[RightFoldedToFold2[In]].in } - .foldRight(v)(foldfn)) + .foldRight(v)(foldfn) + ) } case _ => None } - def sum[In, Out, Acc: Group](l: List[RightFolded2[In, Out, Acc]])(foldfn: (In, Out) => Out)( - mapfn: (Out) => Acc): Acc = { + def sum[In, Out, Acc: Group]( + l: List[RightFolded2[In, Out, Acc]] + )(foldfn: (In, Out) => Out)(mapfn: (Out) => Acc): Acc = { def notIsVal(rf: RightFolded2[In, Out, Acc]) = rf match { case RightFoldedValue2(_, _, _) => false case _ => true diff --git a/algebird-test/src/test/scala/com/twitter/algebird/SketchMapTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/SketchMapTest.scala index f34101704..20191cfa1 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/SketchMapTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/SketchMapTest.scala @@ -5,7 +5,7 @@ import org.scalatest.prop.PropertyChecks import org.scalacheck.{Arbitrary, Gen} object SketchMapTestImplicits { - val DELTA = 1E-6 + val DELTA = 1e-6 val EPS = 0.001 val SEED = 1 val HEAVY_HITTERS_COUNT = 10 diff --git a/algebird-test/src/test/scala/com/twitter/algebird/SpaceSaverTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/SpaceSaverTest.scala index 482cd83ae..e3701d1b9 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/SpaceSaverTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/SpaceSaverTest.scala @@ -27,7 +27,8 @@ class SpaceSaverLaws extends CheckProperties { Arbitrary.arbitrary[SSOne[Int]], Gen .nonEmptyContainerOf[List, SSOne[Int]](Arbitrary.arbitrary[SSOne[Int]]) - .map(_.reduce(sg.plus))) + .map(_.reduce(sg.plus)) + ) } implicit def equiv[T]: Equiv[SpaceSaver[T]] = diff --git a/algebird-test/src/test/scala/com/twitter/algebird/TopKTests.scala b/algebird-test/src/test/scala/com/twitter/algebird/TopKTests.scala index ae2d27a70..bacce91ab 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/TopKTests.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/TopKTests.scala @@ -79,7 +79,8 @@ class TopKTests extends CheckProperties { tkmonoid.build(l) }) .items, - correct) + correct + ) } } diff --git a/algebird-test/src/test/scala/com/twitter/algebird/TupleAggregatorsTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/TupleAggregatorsTest.scala index cb869eee6..96739daf7 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/TupleAggregatorsTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/TupleAggregatorsTest.scala @@ -46,49 +46,100 @@ class TupleAggregatorsTest extends WordSpec with Matchers { } "Create an aggregator from a tuple of 7 aggregators" in { - val agg: Aggregator[Int, - Tuple7[Int, Int, Int, Int, Int, Int, Int], - Tuple7[Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple7[Int, Int, Int, Int, Int, Int, Int], Tuple7[ + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple7(MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg) assert(agg(data) == Tuple7(0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 8 aggregators" in { - val agg: Aggregator[Int, - Tuple8[Int, Int, Int, Int, Int, Int, Int, Int], - Tuple8[Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple8[Int, Int, Int, Int, Int, Int, Int, Int], Tuple8[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple8(MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg) assert(agg(data) == Tuple8(0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 9 aggregators" in { - val agg: Aggregator[Int, - Tuple9[Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple9[Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple9[Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple9[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple9(MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg) assert(agg(data) == Tuple9(0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 10 aggregators" in { - val agg: Aggregator[Int, - Tuple10[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple10[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple10[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple10[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple10(MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg) assert(agg(data) == Tuple10(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 11 aggregators" in { - val agg: Aggregator[Int, - Tuple11[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple11[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple11[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple11[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple11(MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg) assert(agg(data) == Tuple11(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 12 aggregators" in { - val agg: Aggregator[Int, - Tuple12[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple12[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple12[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple12[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple12( MinAgg, MinAgg, @@ -101,14 +152,28 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg) + MinAgg + ) assert(agg(data) == Tuple12(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 13 aggregators" in { - val agg: Aggregator[Int, - Tuple13[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple13[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = Tuple13( + val agg + : Aggregator[Int, Tuple13[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple13[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple13( MinAgg, MinAgg, MinAgg, @@ -121,14 +186,28 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg) + MinAgg + ) assert(agg(data) == Tuple13(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 14 aggregators" in { - val agg: Aggregator[Int, - Tuple14[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple14[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple14[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple14[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple14( MinAgg, MinAgg, @@ -143,15 +222,29 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg) + MinAgg + ) assert(agg(data) == Tuple14(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 15 aggregators" in { - val agg - : Aggregator[Int, - Tuple15[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple15[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple15[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple15[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = Tuple15( MinAgg, MinAgg, @@ -167,15 +260,30 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg) + MinAgg + ) assert(agg(data) == Tuple15(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 16 aggregators" in { - val agg: Aggregator[ + val agg: Aggregator[Int, Tuple16[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, Int, - Tuple16[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple16[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = Tuple16( + Int, + Int, + Int, + Int + ], Tuple16[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = Tuple16( MinAgg, MinAgg, MinAgg, @@ -191,15 +299,31 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg) + MinAgg + ) assert(agg(data) == Tuple16(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 17 aggregators" in { - val agg: Aggregator[ + val agg: Aggregator[Int, Tuple17[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, Int, - Tuple17[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple17[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + Int, + Int, + Int, + Int, + Int + ], Tuple17[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = Tuple17( MinAgg, MinAgg, @@ -217,15 +341,32 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg) + MinAgg + ) assert(agg(data) == Tuple17(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 18 aggregators" in { - val agg: Aggregator[ + val agg: Aggregator[Int, Tuple18[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, Int, - Tuple18[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple18[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple18[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = Tuple18( MinAgg, MinAgg, @@ -244,50 +385,53 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg) + MinAgg + ) assert(agg(data) == Tuple18(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 19 aggregators" in { - val agg: Aggregator[Int, - Tuple19[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Tuple19[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int]] = Tuple19( + val agg: Aggregator[Int, Tuple19[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple19[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple19( MinAgg, MinAgg, MinAgg, @@ -306,52 +450,55 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg) + MinAgg + ) assert(agg(data) == Tuple19(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 20 aggregators" in { - val agg: Aggregator[Int, - Tuple20[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Tuple20[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int]] = Tuple20( + val agg: Aggregator[Int, Tuple20[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple20[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple20( MinAgg, MinAgg, MinAgg, @@ -371,54 +518,57 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg) + MinAgg + ) assert(agg(data) == Tuple20(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 21 aggregators" in { - val agg: Aggregator[Int, - Tuple21[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Tuple21[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int]] = Tuple21( + val agg: Aggregator[Int, Tuple21[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple21[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple21( MinAgg, MinAgg, MinAgg, @@ -439,58 +589,61 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg) + MinAgg + ) assert(agg(data) == Tuple21(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 22 aggregators" in { - val agg: Aggregator[Int, - Tuple22[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Tuple22[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int]] = Tuple22( - MinAgg, - MinAgg, + val agg: Aggregator[Int, Tuple22[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple22[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = Tuple22( + MinAgg, + MinAgg, MinAgg, MinAgg, MinAgg, @@ -550,59 +703,125 @@ class TupleAggregatorsTest extends WordSpec with Matchers { } "Create an aggregator from a tuple of 7 aggregators" in { - val agg: Aggregator[Int, - Tuple7[Int, Int, Int, Int, Int, Int, Int], - Tuple7[Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple7[Int, Int, Int, Int, Int, Int, Int], Tuple7[ + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator((MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg)) assert(agg(data) == Tuple7(0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 8 aggregators" in { - val agg: Aggregator[Int, - Tuple8[Int, Int, Int, Int, Int, Int, Int, Int], - Tuple8[Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple8[Int, Int, Int, Int, Int, Int, Int, Int], Tuple8[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator((MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg)) assert(agg(data) == Tuple8(0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 9 aggregators" in { - val agg: Aggregator[Int, - Tuple9[Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple9[Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple9[Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple9[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator((MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg)) assert(agg(data) == Tuple9(0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 10 aggregators" in { - val agg: Aggregator[Int, - Tuple10[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple10[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple10[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple10[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator((MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg)) assert(agg(data) == Tuple10(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 11 aggregators" in { - val agg: Aggregator[Int, - Tuple11[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple11[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple11[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple11[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator( - (MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg)) + (MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg) + ) assert(agg(data) == Tuple11(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 12 aggregators" in { - val agg: Aggregator[Int, - Tuple12[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple12[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple12[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple12[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator( - (MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg)) + (MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg, MinAgg) + ) assert(agg(data) == Tuple12(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 13 aggregators" in { - val agg: Aggregator[Int, - Tuple13[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple13[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg + : Aggregator[Int, Tuple13[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple13[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator( ( MinAgg, @@ -617,14 +836,29 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg)) + MinAgg + ) + ) assert(agg(data) == Tuple13(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 14 aggregators" in { - val agg: Aggregator[Int, - Tuple14[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple14[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple14[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Tuple14[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator( ( MinAgg, @@ -640,15 +874,30 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg)) + MinAgg + ) + ) assert(agg(data) == Tuple14(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 15 aggregators" in { - val agg - : Aggregator[Int, - Tuple15[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple15[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + val agg: Aggregator[Int, Tuple15[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple15[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = MultiAggregator( ( MinAgg, @@ -665,15 +914,31 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg)) + MinAgg + ) + ) assert(agg(data) == Tuple15(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 16 aggregators" in { - val agg: Aggregator[ + val agg: Aggregator[Int, Tuple16[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, Int, - Tuple16[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple16[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple16[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = MultiAggregator( ( MinAgg, @@ -691,15 +956,32 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg)) + MinAgg + ) + ) assert(agg(data) == Tuple16(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 17 aggregators" in { - val agg: Aggregator[ + val agg: Aggregator[Int, Tuple17[ Int, - Tuple17[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple17[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple17[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = MultiAggregator( ( MinAgg, @@ -718,15 +1000,33 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg)) + MinAgg + ) + ) assert(agg(data) == Tuple17(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 18 aggregators" in { - val agg: Aggregator[ + val agg: Aggregator[Int, Tuple18[ Int, - Tuple18[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Tuple18[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple18[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]] = MultiAggregator( ( MinAgg, @@ -746,50 +1046,54 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg)) + MinAgg + ) + ) assert(agg(data) == Tuple18(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 19 aggregators" in { - val agg: Aggregator[Int, - Tuple19[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Tuple19[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int]] = MultiAggregator( + val agg: Aggregator[Int, Tuple19[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple19[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator( ( MinAgg, MinAgg, @@ -809,52 +1113,56 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg)) + MinAgg + ) + ) assert(agg(data) == Tuple19(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 20 aggregators" in { - val agg: Aggregator[Int, - Tuple20[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Tuple20[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int]] = MultiAggregator( + val agg: Aggregator[Int, Tuple20[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple20[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator( ( MinAgg, MinAgg, @@ -875,55 +1183,59 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg)) + MinAgg + ) + ) assert(agg(data) == Tuple20(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 21 aggregators" in { - val agg: Aggregator[Int, - Tuple21[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Tuple21[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int]] = MultiAggregator( - ( + val agg: Aggregator[Int, Tuple21[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple21[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator( + ( MinAgg, MinAgg, MinAgg, @@ -944,56 +1256,60 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg)) + MinAgg + ) + ) assert(agg(data) == Tuple21(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } "Create an aggregator from a tuple of 22 aggregators" in { - val agg: Aggregator[Int, - Tuple22[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Tuple22[Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int]] = MultiAggregator( + val agg: Aggregator[Int, Tuple22[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Tuple22[ + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ]] = MultiAggregator( ( MinAgg, MinAgg, @@ -1016,7 +1332,9 @@ class TupleAggregatorsTest extends WordSpec with Matchers { MinAgg, MinAgg, MinAgg, - MinAgg)) + MinAgg + ) + ) assert(agg(data) == Tuple22(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) } @@ -1039,67 +1357,129 @@ class TupleAggregatorsTest extends WordSpec with Matchers { } "Create a MonoidAggregator from a tuple of 5 MonoidAggregators" in { - val agg - : MonoidAggregator[Long, Tuple5[Long, Long, Long, Long, Long], Tuple5[Long, Long, Long, Long, Long]] = + val agg: MonoidAggregator[Long, Tuple5[Long, Long, Long, Long, Long], Tuple5[ + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator((SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg)) assert(agg(longData) == Tuple5(6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 6 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple6[Long, Long, Long, Long, Long, Long], - Tuple6[Long, Long, Long, Long, Long, Long]] = + val agg: MonoidAggregator[Long, Tuple6[Long, Long, Long, Long, Long, Long], Tuple6[ + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator((SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg)) assert(agg(longData) == Tuple6(6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 7 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple7[Long, Long, Long, Long, Long, Long, Long], - Tuple7[Long, Long, Long, Long, Long, Long, Long]] = + val agg: MonoidAggregator[Long, Tuple7[Long, Long, Long, Long, Long, Long, Long], Tuple7[ + Long, + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator((SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg)) assert(agg(longData) == Tuple7(6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 8 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple8[Long, Long, Long, Long, Long, Long, Long, Long], - Tuple8[Long, Long, Long, Long, Long, Long, Long, Long]] = + val agg: MonoidAggregator[Long, Tuple8[Long, Long, Long, Long, Long, Long, Long, Long], Tuple8[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator((SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg)) assert(agg(longData) == Tuple8(6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 9 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple9[Long, Long, Long, Long, Long, Long, Long, Long, Long], - Tuple9[Long, Long, Long, Long, Long, Long, Long, Long, Long]] = + val agg: MonoidAggregator[Long, Tuple9[Long, Long, Long, Long, Long, Long, Long, Long, Long], Tuple9[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator((SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg)) assert(agg(longData) == Tuple9(6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 10 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple10[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long], - Tuple10[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long]] = + val agg: MonoidAggregator[Long, Tuple10[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long], Tuple10[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator( - (SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg)) + (SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg) + ) assert(agg(longData) == Tuple10(6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 11 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple11[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long], - Tuple11[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long]] = + val agg: MonoidAggregator[Long, Tuple11[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ], Tuple11[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long]] = MultiAggregator( - (SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg)) + (SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg, SizeAgg) + ) assert(agg(longData) == Tuple11(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 12 MonoidAggregators" in { - val agg - : MonoidAggregator[Long, - Tuple12[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long], - Tuple12[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long]] = + val agg: MonoidAggregator[Long, Tuple12[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ], Tuple12[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long]] = MultiAggregator( ( SizeAgg, @@ -1113,15 +1493,28 @@ class TupleAggregatorsTest extends WordSpec with Matchers { SizeAgg, SizeAgg, SizeAgg, - SizeAgg)) + SizeAgg + ) + ) assert(agg(longData) == Tuple12(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 13 MonoidAggregators" in { - val agg: MonoidAggregator[ + val agg: MonoidAggregator[Long, Tuple13[ + Long, + Long, Long, - Tuple13[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long], - Tuple13[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long]] = + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ], Tuple13[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long]] = MultiAggregator( ( SizeAgg, @@ -1136,15 +1529,29 @@ class TupleAggregatorsTest extends WordSpec with Matchers { SizeAgg, SizeAgg, SizeAgg, - SizeAgg)) + SizeAgg + ) + ) assert(agg(longData) == Tuple13(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 14 MonoidAggregators" in { - val agg: MonoidAggregator[ + val agg: MonoidAggregator[Long, Tuple14[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, Long, - Tuple14[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long], - Tuple14[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long]] = + Long, + Long + ], Tuple14[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long]] = MultiAggregator( ( SizeAgg, @@ -1160,15 +1567,30 @@ class TupleAggregatorsTest extends WordSpec with Matchers { SizeAgg, SizeAgg, SizeAgg, - SizeAgg)) + SizeAgg + ) + ) assert(agg(longData) == Tuple14(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 15 MonoidAggregators" in { - val agg: MonoidAggregator[ + val agg: MonoidAggregator[Long, Tuple15[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, Long, - Tuple15[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long], - Tuple15[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long]] = + Long, + Long, + Long, + Long, + Long + ], Tuple15[Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long, Long]] = MultiAggregator( ( SizeAgg, @@ -1185,44 +1607,48 @@ class TupleAggregatorsTest extends WordSpec with Matchers { SizeAgg, SizeAgg, SizeAgg, - SizeAgg)) + SizeAgg + ) + ) assert(agg(longData) == Tuple15(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 16 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple16[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long], - Tuple16[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long]] = MultiAggregator( + val agg: MonoidAggregator[Long, Tuple16[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ], Tuple16[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator( ( SizeAgg, SizeAgg, @@ -1239,46 +1665,50 @@ class TupleAggregatorsTest extends WordSpec with Matchers { SizeAgg, SizeAgg, SizeAgg, - SizeAgg)) + SizeAgg + ) + ) assert(agg(longData) == Tuple16(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 17 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple17[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long], - Tuple17[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long]] = MultiAggregator( + val agg: MonoidAggregator[Long, Tuple17[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ], Tuple17[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator( ( SizeAgg, SizeAgg, @@ -1296,48 +1726,52 @@ class TupleAggregatorsTest extends WordSpec with Matchers { SizeAgg, SizeAgg, SizeAgg, - SizeAgg)) + SizeAgg + ) + ) assert(agg(longData) == Tuple17(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 18 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple18[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long], - Tuple18[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long]] = MultiAggregator( + val agg: MonoidAggregator[Long, Tuple18[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ], Tuple18[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator( ( SizeAgg, SizeAgg, @@ -1356,50 +1790,54 @@ class TupleAggregatorsTest extends WordSpec with Matchers { SizeAgg, SizeAgg, SizeAgg, - SizeAgg)) + SizeAgg + ) + ) assert(agg(longData) == Tuple18(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 19 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple19[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long], - Tuple19[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long]] = MultiAggregator( + val agg: MonoidAggregator[Long, Tuple19[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ], Tuple19[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator( ( SizeAgg, SizeAgg, @@ -1419,52 +1857,56 @@ class TupleAggregatorsTest extends WordSpec with Matchers { SizeAgg, SizeAgg, SizeAgg, - SizeAgg)) + SizeAgg + ) + ) assert(agg(longData) == Tuple19(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 20 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple20[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long], - Tuple20[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long]] = MultiAggregator( + val agg: MonoidAggregator[Long, Tuple20[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ], Tuple20[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator( ( SizeAgg, SizeAgg, @@ -1485,54 +1927,58 @@ class TupleAggregatorsTest extends WordSpec with Matchers { SizeAgg, SizeAgg, SizeAgg, - SizeAgg)) + SizeAgg + ) + ) assert(agg(longData) == Tuple20(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 21 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple21[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long], - Tuple21[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long]] = MultiAggregator( + val agg: MonoidAggregator[Long, Tuple21[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ], Tuple21[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator( ( SizeAgg, SizeAgg, @@ -1554,56 +2000,60 @@ class TupleAggregatorsTest extends WordSpec with Matchers { SizeAgg, SizeAgg, SizeAgg, - SizeAgg)) + SizeAgg + ) + ) assert(agg(longData) == Tuple21(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } "Create a MonoidAggregator from a tuple of 22 MonoidAggregators" in { - val agg: MonoidAggregator[Long, - Tuple22[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long], - Tuple22[Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long, - Long]] = MultiAggregator( + val agg: MonoidAggregator[Long, Tuple22[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ], Tuple22[ + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long, + Long + ]] = MultiAggregator( ( SizeAgg, SizeAgg, @@ -1626,7 +2076,9 @@ class TupleAggregatorsTest extends WordSpec with Matchers { SizeAgg, SizeAgg, SizeAgg, - SizeAgg)) + SizeAgg + ) + ) assert(agg(longData) == Tuple22(6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6)) } } @@ -1675,7 +2127,8 @@ class TupleAggregatorsTest extends WordSpec with Matchers { ("key2", MinLongAgg), ("key3", MinLongAgg), ("key4", MinLongAgg), - ("key5", MinLongAgg)) + ("key5", MinLongAgg) + ) val expectedMap = Map("key1" -> 6, "key2" -> 0, "key3" -> 0, "key4" -> 0, "key5" -> 0) assert(agg(data) == expectedMap) @@ -1689,7 +2142,8 @@ class TupleAggregatorsTest extends WordSpec with Matchers { ("key3", MinLongAgg), ("key4", MinLongAgg), ("key5", MinLongAgg), - ("key6", MinLongAgg)) + ("key6", MinLongAgg) + ) val expectedMap = Map("key1" -> 6, "key2" -> 0, "key3" -> 0, "key4" -> 0, "key5" -> 0, "key6" -> 0) assert(agg(data) == expectedMap) } @@ -1703,7 +2157,8 @@ class TupleAggregatorsTest extends WordSpec with Matchers { ("key4", MinLongAgg), ("key5", MinLongAgg), ("key6", MinLongAgg), - ("key7", MinLongAgg)) + ("key7", MinLongAgg) + ) val expectedMap = Map("key1" -> 6, "key2" -> 0, "key3" -> 0, "key4" -> 0, "key5" -> 0, "key6" -> 0, "key7" -> 0) assert(agg(data) == expectedMap) @@ -1729,7 +2184,8 @@ class TupleAggregatorsTest extends WordSpec with Matchers { "key5" -> 0, "key6" -> 0, "key7" -> 0, - "key8" -> 0) + "key8" -> 0 + ) assert(agg(data) == expectedMap) } @@ -1755,13 +2211,14 @@ class TupleAggregatorsTest extends WordSpec with Matchers { "key6" -> 0, "key7" -> 0, "key8" -> 0, - "key9" -> 0) + "key9" -> 0 + ) assert(agg(data) == expectedMap) } "Create an aggregator from 10 (key, aggregator) pairs" in { val agg - : Aggregator[Int, Tuple10[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int], Map[String, Long]] = + : Aggregator[Int, Tuple10[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int], Map[String, Long]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), @@ -1784,14 +2241,16 @@ class TupleAggregatorsTest extends WordSpec with Matchers { "key7" -> 0, "key8" -> 0, "key9" -> 0, - "key10" -> 0) + "key10" -> 0 + ) assert(agg(data) == expectedMap) } "Create an aggregator from 11 (key, aggregator) pairs" in { - val agg: Aggregator[Int, - Tuple11[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Map[String, Long]] = MapAggregator( + val agg: Aggregator[Int, Tuple11[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Map[ + String, + Long + ]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), @@ -1815,14 +2274,16 @@ class TupleAggregatorsTest extends WordSpec with Matchers { "key8" -> 0, "key9" -> 0, "key10" -> 0, - "key11" -> 0) + "key11" -> 0 + ) assert(agg(data) == expectedMap) } "Create an aggregator from 12 (key, aggregator) pairs" in { - val agg: Aggregator[Int, - Tuple12[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Map[String, Long]] = MapAggregator( + val agg: Aggregator[Int, Tuple12[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Map[ + String, + Long + ]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), @@ -1848,14 +2309,16 @@ class TupleAggregatorsTest extends WordSpec with Matchers { "key9" -> 0, "key10" -> 0, "key11" -> 0, - "key12" -> 0) + "key12" -> 0 + ) assert(agg(data) == expectedMap) } "Create an aggregator from 13 (key, aggregator) pairs" in { - val agg: Aggregator[Int, - Tuple13[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Map[String, Long]] = MapAggregator( + val agg: Aggregator[Int, Tuple13[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Map[ + String, + Long + ]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), @@ -1883,14 +2346,16 @@ class TupleAggregatorsTest extends WordSpec with Matchers { "key10" -> 0, "key11" -> 0, "key12" -> 0, - "key13" -> 0) + "key13" -> 0 + ) assert(agg(data) == expectedMap) } "Create an aggregator from 14 (key, aggregator) pairs" in { - val agg: Aggregator[Int, - Tuple14[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Map[String, Long]] = MapAggregator( + val agg: Aggregator[Int, Tuple14[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], Map[ + String, + Long + ]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), @@ -1920,14 +2385,29 @@ class TupleAggregatorsTest extends WordSpec with Matchers { "key11" -> 0, "key12" -> 0, "key13" -> 0, - "key14" -> 0) + "key14" -> 0 + ) assert(agg(data) == expectedMap) } "Create an aggregator from 15 (key, aggregator) pairs" in { - val agg: Aggregator[Int, - Tuple15[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Map[String, Long]] = MapAggregator( + val agg: Aggregator[Int, Tuple15[ + Long, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Map[String, Long]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), @@ -1965,10 +2445,24 @@ class TupleAggregatorsTest extends WordSpec with Matchers { } "Create an aggregator from 16 (key, aggregator) pairs" in { - val agg - : Aggregator[Int, - Tuple16[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Map[String, Long]] = MapAggregator( + val agg: Aggregator[Int, Tuple16[ + Long, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Map[String, Long]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), @@ -2008,10 +2502,25 @@ class TupleAggregatorsTest extends WordSpec with Matchers { } "Create an aggregator from 17 (key, aggregator) pairs" in { - val agg: Aggregator[ + val agg: Aggregator[Int, Tuple17[ + Long, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, Int, - Tuple17[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Map[String, Long]] = MapAggregator( + Int, + Int, + Int + ], Map[String, Long]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), @@ -2053,10 +2562,26 @@ class TupleAggregatorsTest extends WordSpec with Matchers { } "Create an aggregator from 18 (key, aggregator) pairs" in { - val agg: Aggregator[ + val agg: Aggregator[Int, Tuple18[ + Long, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, Int, - Tuple18[Long, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int], - Map[String, Long]] = MapAggregator( + Int, + Int, + Int + ], Map[String, Long]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), @@ -2100,27 +2625,27 @@ class TupleAggregatorsTest extends WordSpec with Matchers { } "Create an aggregator from 19 (key, aggregator) pairs" in { - val agg: Aggregator[Int, - Tuple19[Long, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Map[String, Long]] = MapAggregator( + val agg: Aggregator[Int, Tuple19[ + Long, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Map[String, Long]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), @@ -2166,28 +2691,28 @@ class TupleAggregatorsTest extends WordSpec with Matchers { } "Create an aggregator from 20 (key, aggregator) pairs" in { - val agg: Aggregator[Int, - Tuple20[Long, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Map[String, Long]] = MapAggregator( + val agg: Aggregator[Int, Tuple20[ + Long, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Map[String, Long]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), @@ -2235,29 +2760,29 @@ class TupleAggregatorsTest extends WordSpec with Matchers { } "Create an aggregator from 21 (key, aggregator) pairs" in { - val agg: Aggregator[Int, - Tuple21[Long, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Map[String, Long]] = MapAggregator( + val agg: Aggregator[Int, Tuple21[ + Long, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Map[String, Long]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), @@ -2307,30 +2832,30 @@ class TupleAggregatorsTest extends WordSpec with Matchers { } "Create an aggregator from 22 (key, aggregator) pairs" in { - val agg: Aggregator[Int, - Tuple22[Long, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int, - Int], - Map[String, Long]] = MapAggregator( + val agg: Aggregator[Int, Tuple22[ + Long, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int, + Int + ], Map[String, Long]] = MapAggregator( ("key1", SizeAgg), ("key2", MinLongAgg), ("key3", MinLongAgg), diff --git a/algebird-test/src/test/scala/com/twitter/algebird/VectorSpaceProperties.scala b/algebird-test/src/test/scala/com/twitter/algebird/VectorSpaceProperties.scala index 0b85c4b12..537e9a9b2 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/VectorSpaceProperties.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/VectorSpaceProperties.scala @@ -32,7 +32,7 @@ class VectorSpaceProperties extends CheckProperties { } } - implicit val genDouble = Arbitrary { Gen.choose(-1.0E50, 1.0E50) } + implicit val genDouble = Arbitrary { Gen.choose(-1.0e50, 1.0e50) } property("map int double scaling") { vectorSpaceLaws[Double, ({ type x[a] = Map[Int, a] })#x](mapEqFn(_, _)) diff --git a/algebird-test/src/test/scala/com/twitter/algebird/statistics/StatisticsTests.scala b/algebird-test/src/test/scala/com/twitter/algebird/statistics/StatisticsTests.scala index 3038e7962..3309c123c 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/statistics/StatisticsTests.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/statistics/StatisticsTests.scala @@ -50,14 +50,16 @@ class StatisticsTest extends WordSpec with Matchers { assert(statsMonoid.getSumCallCount == 3000) assert(statsMonoid.getSumCallTime > 0L) statsMonoid.toString.contains( - "sum calls: <1: 0, <2: 1, <4: 2, <8: 4, <16: 8, <32: 16, <64: 32, <128: 64, <256: 128, <512: 256, >: 2489, avg=1500.5 count=3000") + "sum calls: <1: 0, <2: 1, <4: 2, <8: 4, <16: 8, <32: 16, <64: 32, <128: 64, <256: 128, <512: 256, >: 2489, avg=1500.5 count=3000" + ) } "count sumOption calls" in { assert(statsMonoid.getSumOptionCallCount == 2000) assert(statsMonoid.getSumOptionCallTime > 0L) statsMonoid.toString.contains( - "sumOption calls: <1: 0, <2: 1, <4: 2, <8: 4, <16: 8, <32: 16, <64: 32, <128: 64, <256: 128, <512: 256, >: 1489, avg=1000.5 count=2000") + "sumOption calls: <1: 0, <2: 1, <4: 2, <8: 4, <16: 8, <32: 16, <64: 32, <128: 64, <256: 128, <512: 256, >: 1489, avg=1000.5 count=2000" + ) } } diff --git a/algebird-util/src/main/scala/com/twitter/algebird/util/TunnelMonoid.scala b/algebird-util/src/main/scala/com/twitter/algebird/util/TunnelMonoid.scala index 092319d68..49504b067 100644 --- a/algebird-util/src/main/scala/com/twitter/algebird/util/TunnelMonoid.scala +++ b/algebird-util/src/main/scala/com/twitter/algebird/util/TunnelMonoid.scala @@ -92,7 +92,8 @@ object Tunnel { assert( oldV == newV, "Cannot set a promise multiple times with different values." - + " Old value: %s New value: %s".format(oldV, newV)) + + " Old value: %s New value: %s".format(oldV, newV) + ) } } diff --git a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncListMMapSum.scala b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncListMMapSum.scala index 2de4400e6..7842d7f01 100644 --- a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncListMMapSum.scala +++ b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncListMMapSum.scala @@ -26,15 +26,17 @@ import scala.collection.breakOut * This is a simple asyncronous summer, where a shared mutable map is used between all readers/writers. * When flushing it acquires the lock, drains the mutable map but does the compaction without holding the lock. */ -class AsyncListMMapSum[Key, Value](bufferSize: BufferSize, - override val flushFrequency: FlushFrequency, - override val softMemoryFlush: MemoryFlushPercent, - override val memoryIncr: Incrementor, - override val timeoutIncr: Incrementor, - tuplesOut: Incrementor, - insertOp: Incrementor, - sizeIncr: Incrementor, - workPool: FuturePool)(implicit sg: Semigroup[Value]) +class AsyncListMMapSum[Key, Value]( + bufferSize: BufferSize, + override val flushFrequency: FlushFrequency, + override val softMemoryFlush: MemoryFlushPercent, + override val memoryIncr: Incrementor, + override val timeoutIncr: Incrementor, + tuplesOut: Incrementor, + insertOp: Incrementor, + sizeIncr: Incrementor, + workPool: FuturePool +)(implicit sg: Semigroup[Value]) extends AsyncSummer[(Key, Value), Map[Key, Value]] with WithFlushConditions[(Key, Value), Map[Key, Value]] { require(bufferSize.v > 0, "Use the Null summer for an empty async summer") diff --git a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncListSum.scala b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncListSum.scala index c0dd44186..4fb03afe5 100644 --- a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncListSum.scala +++ b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncListSum.scala @@ -28,19 +28,21 @@ import com.twitter.algebird.util.UtilAlgebras._ /** * @author Ian O Connell */ -class AsyncListSum[Key, Value](bufferSize: BufferSize, - override val flushFrequency: FlushFrequency, - override val softMemoryFlush: MemoryFlushPercent, - override val memoryIncr: Incrementor, - override val timeoutIncr: Incrementor, - insertOp: Incrementor, - insertFails: Incrementor, - sizeIncr: Incrementor, - tuplesIn: Incrementor, - tuplesOut: Incrementor, - workPool: FuturePool, - compact: Compact, - compatSize: CompactionSize)(implicit sg: Semigroup[Value]) +class AsyncListSum[Key, Value]( + bufferSize: BufferSize, + override val flushFrequency: FlushFrequency, + override val softMemoryFlush: MemoryFlushPercent, + override val memoryIncr: Incrementor, + override val timeoutIncr: Incrementor, + insertOp: Incrementor, + insertFails: Incrementor, + sizeIncr: Incrementor, + tuplesIn: Incrementor, + tuplesOut: Incrementor, + workPool: FuturePool, + compact: Compact, + compatSize: CompactionSize +)(implicit sg: Semigroup[Value]) extends AsyncSummer[(Key, Value), Map[Key, Value]] with WithFlushConditions[(Key, Value), Map[Key, Value]] { diff --git a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncMapSum.scala b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncMapSum.scala index 4da7a2f63..2ea9c70de 100644 --- a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncMapSum.scala +++ b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncMapSum.scala @@ -24,15 +24,17 @@ import scala.collection.JavaConverters._ /** * @author Ian O Connell */ -class AsyncMapSum[Key, Value](bufferSize: BufferSize, - override val flushFrequency: FlushFrequency, - override val softMemoryFlush: MemoryFlushPercent, - override val memoryIncr: Incrementor, - override val timeoutIncr: Incrementor, - insertOp: Incrementor, - tuplesOut: Incrementor, - sizeIncr: Incrementor, - workPool: FuturePool)(implicit semigroup: Semigroup[Value]) +class AsyncMapSum[Key, Value]( + bufferSize: BufferSize, + override val flushFrequency: FlushFrequency, + override val softMemoryFlush: MemoryFlushPercent, + override val memoryIncr: Incrementor, + override val timeoutIncr: Incrementor, + insertOp: Incrementor, + tuplesOut: Incrementor, + sizeIncr: Incrementor, + workPool: FuturePool +)(implicit semigroup: Semigroup[Value]) extends AsyncSummer[(Key, Value), Map[Key, Value]] with WithFlushConditions[(Key, Value), Map[Key, Value]] { diff --git a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/HeavyHittersCachingSummer.scala b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/HeavyHittersCachingSummer.scala index d3f85ad88..d423fd720 100644 --- a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/HeavyHittersCachingSummer.scala +++ b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/HeavyHittersCachingSummer.scala @@ -152,8 +152,10 @@ class ApproxHHTracker(hhPct: HeavyHittersPercent, updateFreq: UpdateFrequency, r } // Tuples returned are (hh, non-HH) - final def splitTraversableOnce[T](t: TraversableOnce[T], - extractor: T => Int): (ListBuffer[T], ListBuffer[T]) = { + final def splitTraversableOnce[T]( + t: TraversableOnce[T], + extractor: T => Int + ): (ListBuffer[T], ListBuffer[T]) = { val hh = new ListBuffer[T] val nonHH = new ListBuffer[T] @@ -173,14 +175,16 @@ object HeavyHittersCachingSummer { val DEFAULT_ROLL_OVER_FREQUENCY = RollOverFrequency(1000000L) val DEFAULT_UPDATE_FREQUENCY = UpdateFrequency(2) - def apply[Key, Value](flushFrequency: FlushFrequency, - softMemoryFlush: MemoryFlushPercent, - memoryIncr: Incrementor, - timeoutIncr: Incrementor, - tuplesOut: Incrementor, - insertOp: Incrementor, - sizeIncr: Incrementor, - backingSummer: AsyncSummer[(Key, Value), Iterable[(Key, Value)]]) = + def apply[Key, Value]( + flushFrequency: FlushFrequency, + softMemoryFlush: MemoryFlushPercent, + memoryIncr: Incrementor, + timeoutIncr: Incrementor, + tuplesOut: Incrementor, + insertOp: Incrementor, + sizeIncr: Incrementor, + backingSummer: AsyncSummer[(Key, Value), Iterable[(Key, Value)]] + ) = new HeavyHittersCachingSummer[Key, Value]( DEFAULT_HH_PERCENT, DEFAULT_UPDATE_FREQUENCY, @@ -190,19 +194,22 @@ object HeavyHittersCachingSummer { memoryIncr, timeoutIncr, insertOp, - backingSummer) - - def apply[Key, Value](hhPct: HeavyHittersPercent, - updateFreq: UpdateFrequency, - roFreq: RollOverFrequency, - flushFrequency: FlushFrequency, - softMemoryFlush: MemoryFlushPercent, - memoryIncr: Incrementor, - timeoutIncr: Incrementor, - tuplesOut: Incrementor, - insertOp: Incrementor, - sizeIncr: Incrementor, - backingSummer: AsyncSummer[(Key, Value), Iterable[(Key, Value)]]) = + backingSummer + ) + + def apply[Key, Value]( + hhPct: HeavyHittersPercent, + updateFreq: UpdateFrequency, + roFreq: RollOverFrequency, + flushFrequency: FlushFrequency, + softMemoryFlush: MemoryFlushPercent, + memoryIncr: Incrementor, + timeoutIncr: Incrementor, + tuplesOut: Incrementor, + insertOp: Incrementor, + sizeIncr: Incrementor, + backingSummer: AsyncSummer[(Key, Value), Iterable[(Key, Value)]] + ) = new HeavyHittersCachingSummer[Key, Value]( hhPct, updateFreq, @@ -212,20 +219,22 @@ object HeavyHittersCachingSummer { memoryIncr, timeoutIncr, insertOp, - backingSummer) + backingSummer + ) } -class HeavyHittersCachingSummer[K, V](hhPct: HeavyHittersPercent, - updateFreq: UpdateFrequency, - roFreq: RollOverFrequency, - override val flushFrequency: FlushFrequency, - override val softMemoryFlush: MemoryFlushPercent, - override val memoryIncr: Incrementor, - override val timeoutIncr: Incrementor, - insertOp: Incrementor, - backingSummer: AsyncSummer[(K, V), Iterable[(K, V)]]) - extends AsyncSummer[(K, V), Iterable[(K, V)]] +class HeavyHittersCachingSummer[K, V]( + hhPct: HeavyHittersPercent, + updateFreq: UpdateFrequency, + roFreq: RollOverFrequency, + override val flushFrequency: FlushFrequency, + override val softMemoryFlush: MemoryFlushPercent, + override val memoryIncr: Incrementor, + override val timeoutIncr: Incrementor, + insertOp: Incrementor, + backingSummer: AsyncSummer[(K, V), Iterable[(K, V)]] +) extends AsyncSummer[(K, V), Iterable[(K, V)]] with WithFlushConditions[(K, V), Iterable[(K, V)]] { type T = (K, V) // We only treat the K, V types as a pair almost exclusively in this class. diff --git a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/NullSummer.scala b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/NullSummer.scala index 7de7446ce..144d5e361 100644 --- a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/NullSummer.scala +++ b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/NullSummer.scala @@ -22,8 +22,8 @@ import com.twitter.util.Future * @author Ian O Connell */ class NullSummer[Key, Value](tuplesIn: Incrementor, tuplesOut: Incrementor)( - implicit semigroup: Semigroup[Value]) - extends AsyncSummer[(Key, Value), Map[Key, Value]] { + implicit semigroup: Semigroup[Value] +) extends AsyncSummer[(Key, Value), Map[Key, Value]] { def flush: Future[Map[Key, Value]] = Future.value(Map.empty) def tick: Future[Map[Key, Value]] = Future.value(Map.empty) def addAll(vals: TraversableOnce[(Key, Value)]): Future[Map[Key, Value]] = { diff --git a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/SyncSummingQueue.scala b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/SyncSummingQueue.scala index 50a83c4cb..df927e668 100644 --- a/algebird-util/src/main/scala/com/twitter/algebird/util/summer/SyncSummingQueue.scala +++ b/algebird-util/src/main/scala/com/twitter/algebird/util/summer/SyncSummingQueue.scala @@ -26,15 +26,17 @@ import scala.collection.mutable.ListBuffer /** * @author Ian O Connell */ -case class SyncSummingQueue[Key, Value](bufferSize: BufferSize, - override val flushFrequency: FlushFrequency, - override val softMemoryFlush: MemoryFlushPercent, - override val memoryIncr: Incrementor, - override val timeoutIncr: Incrementor, - sizeIncr: Incrementor, - insertOps: Incrementor, - tuplesIn: Incrementor, - tuplesOut: Incrementor)(implicit semigroup: Semigroup[Value]) +case class SyncSummingQueue[Key, Value]( + bufferSize: BufferSize, + override val flushFrequency: FlushFrequency, + override val softMemoryFlush: MemoryFlushPercent, + override val memoryIncr: Incrementor, + override val timeoutIncr: Incrementor, + sizeIncr: Incrementor, + insertOps: Incrementor, + tuplesIn: Incrementor, + tuplesOut: Incrementor +)(implicit semigroup: Semigroup[Value]) extends AsyncSummer[(Key, Value), Map[Key, Value]] with WithFlushConditions[(Key, Value), Map[Key, Value]] { @@ -65,8 +67,8 @@ case class SyncSummingQueue[Key, Value](bufferSize: BufferSize, } class CustomSummingQueue[V](capacity: Int, sizeIncr: Incrementor, putCalls: Incrementor)( - override implicit val semigroup: Semigroup[V]) - extends StatefulSummer[V] { + override implicit val semigroup: Semigroup[V] +) extends StatefulSummer[V] { private val queueOption: Option[ArrayBlockingQueue[V]] = if (capacity > 0) Some(new ArrayBlockingQueue[V](capacity, true)) else None @@ -89,7 +91,9 @@ class CustomSummingQueue[V](capacity: Int, sizeIncr: Incrementor, putCalls: Incr None } } - } else { Some(item) } + } else { + Some(item) + } def apply(v: V): Option[V] = put(v) diff --git a/algebird-util/src/test/scala/com/twitter/algebird/util/TunnelMonoidProperties.scala b/algebird-util/src/test/scala/com/twitter/algebird/util/TunnelMonoidProperties.scala index 7d481fe38..238b45c43 100644 --- a/algebird-util/src/test/scala/com/twitter/algebird/util/TunnelMonoidProperties.scala +++ b/algebird-util/src/test/scala/com/twitter/algebird/util/TunnelMonoidProperties.scala @@ -21,12 +21,15 @@ import com.twitter.util.{Await, Future} import scala.util.Random object TunnelMonoidProperties { - def testTunnelMonoid[I, V](makeRandomInput: Int => I, - makeTunnel: I => V, - collapseFinalValues: (V, Seq[V], I) => Seq[Future[I]])( + def testTunnelMonoid[I, V]( + makeRandomInput: Int => I, + makeTunnel: I => V, + collapseFinalValues: (V, Seq[V], I) => Seq[Future[I]] + )( implicit monoid: Monoid[I], - superMonoid: Monoid[V]) = { + superMonoid: Monoid[V] + ) = { val r = new Random val numbers = (1 to 40).map { _ => makeRandomInput(r.nextInt) diff --git a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncListMMapSumProperties.scala b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncListMMapSumProperties.scala index 4d0319f2c..6a4695ce9 100644 --- a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncListMMapSumProperties.scala +++ b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncListMMapSumProperties.scala @@ -25,10 +25,12 @@ class AsyncListMMapSumProperties extends CheckProperties { property("Summing with and without the summer should match") { forAll { - (inputs: List[List[(Int, Long)]], - flushFrequency: FlushFrequency, - bufferSize: BufferSize, - memoryFlushPercent: MemoryFlushPercent) => + ( + inputs: List[List[(Int, Long)]], + flushFrequency: FlushFrequency, + bufferSize: BufferSize, + memoryFlushPercent: MemoryFlushPercent + ) => val timeOutCounter = Counter("timeOut") val sizeCounter = Counter("size") val memoryCounter = Counter("memory") @@ -43,7 +45,8 @@ class AsyncListMMapSumProperties extends CheckProperties { tuplesOut, insertOp, sizeCounter, - workPool) + workPool + ) summingWithAndWithoutSummerShouldMatch(summer, inputs) } } diff --git a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncListSumProperties.scala b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncListSumProperties.scala index cdfb7eafa..2ac2639fc 100644 --- a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncListSumProperties.scala +++ b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncListSumProperties.scala @@ -25,10 +25,12 @@ class AsyncListSumProperties extends CheckProperties { property("NonCompactingList Summing with and without the summer should match") { forAll { - (inputs: List[List[(Int, Long)]], - flushFrequency: FlushFrequency, - bufferSize: BufferSize, - memoryFlushPercent: MemoryFlushPercent) => + ( + inputs: List[List[(Int, Long)]], + flushFrequency: FlushFrequency, + bufferSize: BufferSize, + memoryFlushPercent: MemoryFlushPercent + ) => val timeOutCounter = Counter("timeOut") val sizeCounter = Counter("size") val memoryCounter = Counter("memory") @@ -57,11 +59,13 @@ class AsyncListSumProperties extends CheckProperties { property("CompactingList Summing with and without the summer should match") { forAll { - (inputs: List[List[(Int, Long)]], - flushFrequency: FlushFrequency, - bufferSize: BufferSize, - memoryFlushPercent: MemoryFlushPercent, - compactionSize: CompactionSize) => + ( + inputs: List[List[(Int, Long)]], + flushFrequency: FlushFrequency, + bufferSize: BufferSize, + memoryFlushPercent: MemoryFlushPercent, + compactionSize: CompactionSize + ) => val timeOutCounter = Counter("timeOut") val sizeCounter = Counter("size") val memoryCounter = Counter("memory") diff --git a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncMapSumProperties.scala b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncMapSumProperties.scala index 3c7a586a2..c1c2a19d8 100644 --- a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncMapSumProperties.scala +++ b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncMapSumProperties.scala @@ -24,10 +24,12 @@ class AsyncMapSumProperties extends CheckProperties { property("Summing with and without the summer should match") { forAll { - (inputs: List[List[(Int, Long)]], - flushFrequency: FlushFrequency, - bufferSize: BufferSize, - memoryFlushPercent: MemoryFlushPercent) => + ( + inputs: List[List[(Int, Long)]], + flushFrequency: FlushFrequency, + bufferSize: BufferSize, + memoryFlushPercent: MemoryFlushPercent + ) => val timeOutCounter = Counter("timeOut") val sizeCounter = Counter("size") val memoryCounter = Counter("memory") @@ -43,7 +45,8 @@ class AsyncMapSumProperties extends CheckProperties { insertOp, tuplesOut, sizeCounter, - workPool) + workPool + ) (summingWithAndWithoutSummerShouldMatch(summer, inputs)) } } diff --git a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncSummerLaws.scala b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncSummerLaws.scala index f400413b7..7dcb3f8c9 100644 --- a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncSummerLaws.scala +++ b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/AsyncSummerLaws.scala @@ -67,7 +67,8 @@ object AsyncSummerLaws { def summingWithAndWithoutSummerShouldMatch[K, V: Semigroup]( asyncSummer: AsyncSummer[(K, V), Iterable[(K, V)]], - inputs: List[List[(K, V)]]) = { + inputs: List[List[(K, V)]] + ) = { val reference = MapAlgebra.sumByKey(inputs.flatten) val resA = Await .result(Future.collect(inputs.map { i => diff --git a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/HeavyHittersCachingSummerProperties.scala b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/HeavyHittersCachingSummerProperties.scala index 479d5baf6..ff005d81e 100644 --- a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/HeavyHittersCachingSummerProperties.scala +++ b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/HeavyHittersCachingSummerProperties.scala @@ -24,10 +24,12 @@ class HeavyHittersCachingSummerProperties extends CheckProperties { property("Summing with and without the summer should match") { forAll { - (inputs: List[List[(Int, Long)]], - flushFrequency: FlushFrequency, - bufferSize: BufferSize, - memoryFlushPercent: MemoryFlushPercent) => + ( + inputs: List[List[(Int, Long)]], + flushFrequency: FlushFrequency, + bufferSize: BufferSize, + memoryFlushPercent: MemoryFlushPercent + ) => val timeOutCounter = Counter("timeOut") val sizeCounter = Counter("size") val memoryCounter = Counter("memory") @@ -60,7 +62,8 @@ class HeavyHittersCachingSummerProperties extends CheckProperties { tuplesOut, insertOp, sizeCounter, - summer) + summer + ) (summingWithAndWithoutSummerShouldMatch(heavyHittersCachingSummer, inputs)) } } diff --git a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/SyncSummingQueueProperties.scala b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/SyncSummingQueueProperties.scala index 73c5e59ff..7b21079ce 100644 --- a/algebird-util/src/test/scala/com/twitter/algebird/util/summer/SyncSummingQueueProperties.scala +++ b/algebird-util/src/test/scala/com/twitter/algebird/util/summer/SyncSummingQueueProperties.scala @@ -23,10 +23,12 @@ class SyncSummingQueueProperties extends PropSpec with PropertyChecks with Match import AsyncSummerLaws._ property("Summing with and without the summer should match") { forAll { - (inputs: List[List[(Int, Long)]], - flushFrequency: FlushFrequency, - bufferSize: BufferSize, - memoryFlushPercent: MemoryFlushPercent) => + ( + inputs: List[List[(Int, Long)]], + flushFrequency: FlushFrequency, + bufferSize: BufferSize, + memoryFlushPercent: MemoryFlushPercent + ) => val timeOutCounter = Counter("timeOut") val sizeCounter = Counter("size") val memoryCounter = Counter("memory") @@ -42,7 +44,8 @@ class SyncSummingQueueProperties extends PropSpec with PropertyChecks with Match sizeCounter, putCounter, tuplesIn, - tuplesOut) + tuplesOut + ) assert(summingWithAndWithoutSummerShouldMatch(summer, inputs)) } } diff --git a/build.sbt b/build.sbt index f32f067a1..800dcfa4d 100644 --- a/build.sbt +++ b/build.sbt @@ -15,82 +15,80 @@ val utilVersion212 = "6.39.0" val sparkVersion = "2.4.0" def scalaBinaryVersion(scalaVersion: String) = scalaVersion match { - case version if version startsWith "2.10" => "2.10" - case version if version startsWith "2.11" => "2.11" - case version if version startsWith "2.12" => "2.12" - case _ => sys.error("unknown error") + case version if version.startsWith("2.10") => "2.10" + case version if version.startsWith("2.11") => "2.11" + case version if version.startsWith("2.12") => "2.12" + case _ => sys.error("unknown error") } def isScala210x(scalaVersion: String) = scalaBinaryVersion(scalaVersion) == "2.10" def isScala212x(scalaVersion: String) = scalaBinaryVersion(scalaVersion) == "2.12" /** - * Remove 2.10 projects from doc generation, as the macros used in the projects - * cause problems generating the documentation on scala 2.10. As the APIs for 2.10 - * and 2.11 are the same this has no effect on the resultant documentation, though - * it does mean that the scaladocs cannot be generated when the build is in 2.10 mode. - */ + * Remove 2.10 projects from doc generation, as the macros used in the projects + * cause problems generating the documentation on scala 2.10. As the APIs for 2.10 + * and 2.11 are the same this has no effect on the resultant documentation, though + * it does mean that the scaladocs cannot be generated when the build is in 2.10 mode. + */ def docsSourcesAndProjects(sv: String): (Boolean, Seq[ProjectReference]) = CrossVersion.partialVersion(sv) match { case Some((2, 10)) => (false, Nil) - case _ => (true, Seq( - algebirdTest, - algebirdCore, - algebirdUtil, - algebirdBijection, - algebirdSpark - )) + case _ => + ( + true, + Seq( + algebirdTest, + algebirdCore, + algebirdUtil, + algebirdBijection, + algebirdSpark + ) + ) } val sharedSettings = Seq( organization := "com.twitter", scalaVersion := "2.11.12", crossScalaVersions := Seq("2.10.6", "2.11.12", "2.12.10"), - resolvers ++= Seq( Opts.resolver.sonatypeSnapshots, Opts.resolver.sonatypeReleases ), - parallelExecution in Test := true, - scalacOptions ++= Seq( "-unchecked", "-deprecation", "-Xlint", "-language:implicitConversions", "-language:higherKinds", - "-language:existentials"), - + "-language:existentials" + ), scalacOptions ++= { - if (scalaVersion.value startsWith "2.10") + if (scalaVersion.value.startsWith("2.10")) Seq("-Xdivergence211") else Seq() }, - scalacOptions ++= { - if (scalaVersion.value startsWith "2.12") + if (scalaVersion.value.startsWith("2.12")) Seq("-opt:l:inline", "-opt-inline-from:com.twitter.algebird.**") else Seq("-optimize") }, - javacOptions ++= Seq("-target", "1.6", "-source", "1.6"), - libraryDependencies ++= Seq( "junit" % "junit" % "4.11" % Test, "com.novocode" % "junit-interface" % "0.11" % Test ), - // Publishing options: releaseCrossBuild := true, releasePublishArtifactsAction := PgpKeys.publishSigned.value, releaseVersionBump := sbtrelease.Version.Bump.Minor, // need to tweak based on mima results publishMavenStyle := true, publishArtifact in Test := false, - pomIncludeRepository := { x => false }, - + pomIncludeRepository := { x => + false + }, releaseProcess := Seq[ReleaseStep]( checkSnapshotDependencies, inquireVersions, @@ -103,25 +101,21 @@ val sharedSettings = Seq( setNextVersion, commitNextVersion, ReleaseStep(action = releaseStepCommand("sonatypeReleaseAll")), - pushChanges), - - + pushChanges + ), publishTo := Some( - if (version.value.trim.endsWith("SNAPSHOT")) - Opts.resolver.sonatypeSnapshots - else - Opts.resolver.sonatypeStaging - ), - + if (version.value.trim.endsWith("SNAPSHOT")) + Opts.resolver.sonatypeSnapshots + else + Opts.resolver.sonatypeStaging + ), scmInfo := Some( ScmInfo( url("https://github.com/twitter/algebird"), "scm:git@github.com:twitter/algebird.git" ) ), - - pomExtra := ( - https://github.com/twitter/algebird + pomExtra := (https://github.com/twitter/algebird Apache 2 @@ -152,19 +146,19 @@ lazy val noPublishSettings = Seq( ) /** - * This returns the previous jar we released that is compatible with - * the current. - */ + * This returns the previous jar we released that is compatible with + * the current. + */ val noBinaryCompatCheck = Set[String]("benchmark", "caliper", "generic", "spark") def previousVersion(subProj: String) = Some(subProj) .filterNot(noBinaryCompatCheck.contains) - .map { s => "com.twitter" %% ("algebird-" + s) % "0.13.5" } + .map { s => + "com.twitter" %% ("algebird-" + s) % "0.13.5" + } -lazy val algebird = Project( - id = "algebird", - base = file(".")) +lazy val algebird = Project(id = "algebird", base = file(".")) .settings(sharedSettings) .settings(noPublishSettings) .settings( @@ -174,10 +168,19 @@ lazy val algebird = Project( .aggregate( { // workaround: https://github.com/sbt/sbt/issues/4181, simple workaround .settings(crossScalaVersions := List()) doesn't work - val projects = if (Option(sys.props("TRAVIS_SCALA_VERSION")).forall(_.startsWith("2.10."))) - Seq(algebirdCore, algebirdTest, algebirdUtil, algebirdBijection, algebirdBenchmark, algebirdGeneric) - else - Seq(algebirdCore, algebirdTest, algebirdUtil, algebirdBijection, algebirdBenchmark, algebirdGeneric, algebirdSpark) + val projects = + if (Option(sys.props("TRAVIS_SCALA_VERSION")).forall(_.startsWith("2.10."))) + Seq(algebirdCore, algebirdTest, algebirdUtil, algebirdBijection, algebirdBenchmark, algebirdGeneric) + else + Seq( + algebirdCore, + algebirdTest, + algebirdUtil, + algebirdBijection, + algebirdBenchmark, + algebirdGeneric, + algebirdSpark + ) projects.map(p => LocalProject(p.id)) }: _* @@ -185,10 +188,8 @@ lazy val algebird = Project( def module(name: String) = { val id = "algebird-%s".format(name) - Project(id = id, base = file(id)).settings(sharedSettings ++ Seq( - Keys.name := id, - mimaPreviousArtifacts := previousVersion(name).toSet) - ) + Project(id = id, base = file(id)) + .settings(sharedSettings ++ Seq(Keys.name := id, mimaPreviousArtifacts := previousVersion(name).toSet)) } lazy val algebirdCore = module("core").settings( @@ -196,69 +197,87 @@ lazy val algebirdCore = module("core").settings( import com.twitter.algebird._ """.stripMargin('|'), libraryDependencies ++= - Seq("com.googlecode.javaewah" % "JavaEWAH" % javaEwahVersion, - "org.typelevel" %% "algebra" % algebraVersion, - "org.scala-lang" % "scala-reflect" % scalaVersion.value, - "org.scalatest" %% "scalatest" % scalaTestVersion % "test") ++ { + Seq( + "com.googlecode.javaewah" % "JavaEWAH" % javaEwahVersion, + "org.typelevel" %% "algebra" % algebraVersion, + "org.scala-lang" % "scala-reflect" % scalaVersion.value, + "org.scalatest" %% "scalatest" % scalaTestVersion % "test" + ) ++ { if (isScala210x(scalaVersion.value)) Seq("org.scalamacros" %% "quasiquotes" % quasiquotesVersion) else Seq() }, sourceGenerators in Compile += Def.task { - GenTupleAggregators.gen((sourceManaged in Compile).value) - }.taskValue, - addCompilerPlugin("org.scalamacros" % "paradise" % paradiseVersion cross CrossVersion.full), - + GenTupleAggregators.gen((sourceManaged in Compile).value) + }.taskValue, + addCompilerPlugin(("org.scalamacros" % "paradise" % paradiseVersion).cross(CrossVersion.full)), // Scala 2.12's doc task was failing. - sources in (Compile, doc) ~= (_ filterNot (_.absolutePath.contains("javaapi"))), + sources in (Compile, doc) ~= (_.filterNot(_.absolutePath.contains("javaapi"))), testOptions in Test := Seq(Tests.Argument(TestFrameworks.JUnit, "-a")) ) -lazy val algebirdTest = module("test").settings( - testOptions in Test ++= Seq(Tests.Argument(TestFrameworks.ScalaCheck, "-verbosity", "4")), - libraryDependencies ++= - Seq("org.scalacheck" %% "scalacheck" % scalacheckVersion, - "org.scalatest" %% "scalatest" % scalaTestVersion) ++ { - if (isScala210x(scalaVersion.value)) - Seq("org.scalamacros" %% "quasiquotes" % quasiquotesVersion) - else - Seq() - }, addCompilerPlugin("org.scalamacros" % "paradise" % paradiseVersion cross CrossVersion.full) -).dependsOn(algebirdCore) +lazy val algebirdTest = module("test") + .settings( + testOptions in Test ++= Seq(Tests.Argument(TestFrameworks.ScalaCheck, "-verbosity", "4")), + libraryDependencies ++= + Seq( + "org.scalacheck" %% "scalacheck" % scalacheckVersion, + "org.scalatest" %% "scalatest" % scalaTestVersion + ) ++ { + if (isScala210x(scalaVersion.value)) + Seq("org.scalamacros" %% "quasiquotes" % quasiquotesVersion) + else + Seq() + }, + addCompilerPlugin(("org.scalamacros" % "paradise" % paradiseVersion).cross(CrossVersion.full)) + ) + .dependsOn(algebirdCore) lazy val algebirdBenchmark = module("benchmark") - .settings(JmhPlugin.projectSettings:_*) + .settings(JmhPlugin.projectSettings: _*) .settings(noPublishSettings) .settings( - coverageExcludedPackages := "com\\.twitter\\.algebird\\.benchmark.*", - libraryDependencies ++= Seq("com.twitter" %% "bijection-core" % bijectionVersion) -).dependsOn(algebirdCore, algebirdUtil, algebirdTest % "test->compile").enablePlugins(JmhPlugin) + coverageExcludedPackages := "com\\.twitter\\.algebird\\.benchmark.*", + libraryDependencies ++= Seq("com.twitter" %% "bijection-core" % bijectionVersion) + ) + .dependsOn(algebirdCore, algebirdUtil, algebirdTest % "test->compile") + .enablePlugins(JmhPlugin) -lazy val algebirdUtil = module("util").settings( +lazy val algebirdUtil = module("util") + .settings( libraryDependencies ++= { val utilV = if (isScala212x(scalaVersion.value)) utilVersion212 else utilVersion Seq("com.twitter" %% "util-core" % utilV) } -).dependsOn(algebirdCore, algebirdTest % "test->test") + ) + .dependsOn(algebirdCore, algebirdTest % "test->test") -lazy val algebirdBijection = module("bijection").settings( - libraryDependencies += "com.twitter" %% "bijection-core" % bijectionVersion -).dependsOn(algebirdCore, algebirdTest % "test->test") +lazy val algebirdBijection = module("bijection") + .settings( + libraryDependencies += "com.twitter" %% "bijection-core" % bijectionVersion + ) + .dependsOn(algebirdCore, algebirdTest % "test->test") -lazy val algebirdSpark = module("spark").settings( +lazy val algebirdSpark = module("spark") + .settings( libraryDependencies += "org.apache.spark" %% "spark-core" % sparkVersion % "provided", crossScalaVersions := crossScalaVersions.value.filterNot(isScala210x), - scalacOptions := scalacOptions.value.filterNot(_.contains("inline")) // Disable optimizations for now: https://github.com/scala/bug/issues/11247 -).dependsOn(algebirdCore, algebirdTest % "test->test") + scalacOptions := scalacOptions.value + .filterNot(_.contains("inline")) // Disable optimizations for now: https://github.com/scala/bug/issues/11247 + ) + .dependsOn(algebirdCore, algebirdTest % "test->test") -lazy val algebirdGeneric = module("generic").settings( - addCompilerPlugin("org.scalamacros" % "paradise" % paradiseVersion cross CrossVersion.full), +lazy val algebirdGeneric = module("generic") + .settings( + addCompilerPlugin(("org.scalamacros" % "paradise" % paradiseVersion).cross(CrossVersion.full)), libraryDependencies ++= Seq( "com.chuusai" %% "shapeless" % "2.3.3", - "com.github.alexarchambault" %% "scalacheck-shapeless_1.13" % "1.1.6") - ).dependsOn(algebirdCore, algebirdTest % "test->test") + "com.github.alexarchambault" %% "scalacheck-shapeless_1.13" % "1.1.6" + ) + ) + .dependsOn(algebirdCore, algebirdTest % "test->test") lazy val docsMappingsAPIDir = settingKey[String]("Name of subdirectory in site target directory for api docs") @@ -271,7 +290,9 @@ lazy val docSettings = Seq( micrositeBaseUrl := "algebird", micrositeDocumentationUrl := "api", micrositeGithubOwner := "twitter", - micrositeExtraMdFiles := Map(file("CONTRIBUTING.md") -> microsites.ExtraMdFileConfig("contributing.md", "contributing")), + micrositeExtraMdFiles := Map( + file("CONTRIBUTING.md") -> microsites.ExtraMdFileConfig("contributing.md", "contributing") + ), micrositeGithubRepo := "algebird", micrositePalette := Map( "brand-primary" -> "#5B5988", @@ -281,18 +302,21 @@ lazy val docSettings = Seq( "gray" -> "#7B7B7E", "gray-light" -> "#E5E5E6", "gray-lighter" -> "#F4F3F4", - "white-color" -> "#FFFFFF"), + "white-color" -> "#FFFFFF" + ), autoAPIMappings := true, unidocProjectFilter in (ScalaUnidoc, unidoc) := - inProjects(docsSourcesAndProjects(scalaVersion.value)._2:_*), + inProjects(docsSourcesAndProjects(scalaVersion.value)._2: _*), docsMappingsAPIDir := "api", addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), docsMappingsAPIDir), ghpagesNoJekyll := false, fork in tut := true, fork in (ScalaUnidoc, unidoc) := true, scalacOptions in (ScalaUnidoc, unidoc) ++= Seq( - "-doc-source-url", "https://github.com/twitter/algebird/tree/develop€{FILE_PATH}.scala", - "-sourcepath", baseDirectory.in(LocalRootProject).value.getAbsolutePath, + "-doc-source-url", + "https://github.com/twitter/algebird/tree/develop€{FILE_PATH}.scala", + "-sourcepath", + baseDirectory.in(LocalRootProject).value.getAbsolutePath, "-diagrams" ), git.remoteRepo := "git@github.com:twitter/algebird.git", @@ -309,6 +333,6 @@ lazy val docs = project .settings(docSettings) .settings( scalacOptions in Tut ~= (_.filterNot(Set("-Ywarn-unused-import", "-Ywarn-dead-code"))), - sources in (ScalaUnidoc, unidoc) ~= (_ filterNot (_.absolutePath.contains("javaapi"))) + sources in (ScalaUnidoc, unidoc) ~= (_.filterNot(_.absolutePath.contains("javaapi"))) ) .dependsOn(algebirdCore) diff --git a/project/GenTupleAggregators.scala b/project/GenTupleAggregators.scala index 7e31e1bdc..b4fe230fc 100644 --- a/project/GenTupleAggregators.scala +++ b/project/GenTupleAggregators.scala @@ -12,7 +12,8 @@ object GenTupleAggregators { object GeneratedTupleAggregator extends GeneratedTupleAggregator trait GeneratedTupleAggregator { -""" + genMethods(22, "implicit def", None) + "\n" + "}") +""" + genMethods(22, "implicit def", None) + "\n" + "}" + ) val multiAggPlace = dir / "com" / "twitter" / "algebird" / "MultiAggregator.scala" IO.write( @@ -22,7 +23,8 @@ trait GeneratedTupleAggregator { object MultiAggregator { """ + genMethods(22, "def", Some("apply")) + "\n" + - genMethods(22, "def", Some("apply"), true) + "\n" + "}") + genMethods(22, "def", Some("apply"), true) + "\n" + "}" + ) val mapAggPlace = dir / "com" / "twitter" / "algebird" / "MapAggregator.scala" IO.write( @@ -42,41 +44,57 @@ object MultiAggregator { | ${genMapMethods(22)} | ${genMapMethods(22, isMonoid = true)} |} - """.stripMargin) + """.stripMargin + ) Seq(tupleAggPlace, multiAggPlace, mapAggPlace) } - def genMethods(max: Int, defStr: String, name: Option[String], isMonoid: Boolean = false): String = { - (2 to max).map(i => { - val methodName = name.getOrElse("from%d".format(i)) - val aggType = if (isMonoid) "Monoid" else "" - val nums = (1 to i) - val bs = nums.map("B" + _).mkString(", ") - val cs = nums.map("C" + _).mkString(", ") - val aggs = nums.map(x => "%sAggregator[A, B%s, C%s]".format(aggType, x, x)).mkString(", ") - val prepares = nums.map(x => "aggs._%s.prepare(a)".format(x)).mkString(", ") - val semiType = if (isMonoid) "monoid" else "semigroup" - val semigroups = nums.map(x => "aggs._%s.%s".format(x, semiType)).mkString(", ") - val semigroup = "new Tuple%d%s()(%s)".format(i, semiType.capitalize, semigroups) - val present = nums.map(x => "aggs._%s.present(b._%s)".format(x, x)).mkString(", ") - val tupleBs = "Tuple%d[%s]".format(i, bs) - val tupleCs = "Tuple%d[%s]".format(i, cs) - - """ + def genMethods(max: Int, defStr: String, name: Option[String], isMonoid: Boolean = false): String = + (2 to max) + .map(i => { + val methodName = name.getOrElse("from%d".format(i)) + val aggType = if (isMonoid) "Monoid" else "" + val nums = (1 to i) + val bs = nums.map("B" + _).mkString(", ") + val cs = nums.map("C" + _).mkString(", ") + val aggs = nums.map(x => "%sAggregator[A, B%s, C%s]".format(aggType, x, x)).mkString(", ") + val prepares = nums.map(x => "aggs._%s.prepare(a)".format(x)).mkString(", ") + val semiType = if (isMonoid) "monoid" else "semigroup" + val semigroups = nums.map(x => "aggs._%s.%s".format(x, semiType)).mkString(", ") + val semigroup = "new Tuple%d%s()(%s)".format(i, semiType.capitalize, semigroups) + val present = nums.map(x => "aggs._%s.present(b._%s)".format(x, x)).mkString(", ") + val tupleBs = "Tuple%d[%s]".format(i, bs) + val tupleCs = "Tuple%d[%s]".format(i, cs) + + """ %s %s[A, %s, %s](aggs: Tuple%d[%s]): %sAggregator[A, %s, %s] = { new %sAggregator[A, %s, %s] { def prepare(a: A) = (%s) val %s = %s def present(b: %s) = (%s) } -}""".format(defStr, methodName, bs, cs, i, aggs, aggType, tupleBs, tupleCs, - aggType, tupleBs, tupleCs, - prepares, - semiType, semigroup, - tupleBs, present) - }).mkString("\n") - } +}""".format( + defStr, + methodName, + bs, + cs, + i, + aggs, + aggType, + tupleBs, + tupleCs, + aggType, + tupleBs, + tupleCs, + prepares, + semiType, + semigroup, + tupleBs, + present + ) + }) + .mkString("\n") def genMapMethods(max: Int, isMonoid: Boolean = false): String = { val inputAggregatorType = if (isMonoid) "MonoidAggregator" else "Aggregator" @@ -97,15 +115,16 @@ object MultiAggregator { |} """.stripMargin - (2 to max).map(aggrCount => { - val aggrNums = 1 to aggrCount + (2 to max) + .map(aggrCount => { + val aggrNums = 1 to aggrCount - val inputAggs = aggrNums.map(i => s"agg$i: (K, ${inputAggregatorType}[A, B$i, C])").mkString(", ") + val inputAggs = aggrNums.map(i => s"agg$i: (K, ${inputAggregatorType}[A, B$i, C])").mkString(", ") - val bs = aggrNums.map("B" + _).mkString(", ") - val tupleBs = s"Tuple${aggrCount}[$bs]" + val bs = aggrNums.map("B" + _).mkString(", ") + val tupleBs = s"Tuple${aggrCount}[$bs]" - s""" + s""" |def apply[K, A, $bs, C]($inputAggs): ${mapAggregatorType}[A, $tupleBs, K, C] = { | new ${mapAggregatorType}[A, $tupleBs, K, C] { | def prepare(a: A) = ( @@ -123,6 +142,7 @@ object MultiAggregator { | ) | } |}""".stripMargin - }).mkString("\n") + aggregatorForOneItem + }) + .mkString("\n") + aggregatorForOneItem } } diff --git a/project/plugins.sbt b/project/plugins.sbt index 81b6063e2..2b4daa8bb 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,16 +1,17 @@ resolvers ++= Seq( - "jgit-repo" at "https://download.eclipse.org/jgit/maven", - Resolver.url("bintray-sbt-plugin-releases", - url("https://dl.bintray.com/content/sbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns) - ) + "jgit-repo".at("https://download.eclipse.org/jgit/maven"), + Resolver.url("bintray-sbt-plugin-releases", url("https://dl.bintray.com/content/sbt/sbt-plugin-releases"))( + Resolver.ivyStylePatterns + ) +) -addSbtPlugin("com.47deg" % "sbt-microsites" % "0.9.4") -addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.2") -addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.11") -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0") -addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.15") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.0") -addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.7") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.7") +addSbtPlugin("com.47deg" % "sbt-microsites" % "0.9.4") +addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.2") +addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.11") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.0.4") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.0") +addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.7") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.7")