Skip to content

Commit b99a854

Browse files
committed
Format after update
1 parent a1acf85 commit b99a854

File tree

269 files changed

+3996
-3156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

269 files changed

+3996
-3156
lines changed

alleycats-core/src/main/scala/alleycats/ConsK.scala

+12-10
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,23 @@ object ConsK {
3232
trait ToConsKOps {
3333
implicit def toConsKOps[F[_], A](target: F[A])(implicit tc: ConsK[F]): Ops[F, A] {
3434
type TypeClassType = ConsK[F]
35-
} = new Ops[F, A] {
36-
type TypeClassType = ConsK[F]
37-
val self: F[A] = target
38-
val typeClassInstance: TypeClassType = tc
39-
}
35+
} =
36+
new Ops[F, A] {
37+
type TypeClassType = ConsK[F]
38+
val self: F[A] = target
39+
val typeClassInstance: TypeClassType = tc
40+
}
4041
}
4142
object nonInheritedOps extends ToConsKOps
4243
object ops {
4344
implicit def toAllConsKOps[F[_], A](target: F[A])(implicit tc: ConsK[F]): AllOps[F, A] {
4445
type TypeClassType = ConsK[F]
45-
} = new AllOps[F, A] {
46-
type TypeClassType = ConsK[F]
47-
val self: F[A] = target
48-
val typeClassInstance: TypeClassType = tc
49-
}
46+
} =
47+
new AllOps[F, A] {
48+
type TypeClassType = ConsK[F]
49+
val self: F[A] = target
50+
val typeClassInstance: TypeClassType = tc
51+
}
5052
}
5153

5254
/****************************************************************************/

alleycats-core/src/main/scala/alleycats/Empty.scala

+12-10
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,23 @@ object Empty extends EmptyInstances0 {
4242
trait ToEmptyOps {
4343
implicit def toEmptyOps[A](target: A)(implicit tc: Empty[A]): Ops[A] {
4444
type TypeClassType = Empty[A]
45-
} = new Ops[A] {
46-
type TypeClassType = Empty[A]
47-
val self: A = target
48-
val typeClassInstance: TypeClassType = tc
49-
}
45+
} =
46+
new Ops[A] {
47+
type TypeClassType = Empty[A]
48+
val self: A = target
49+
val typeClassInstance: TypeClassType = tc
50+
}
5051
}
5152
object nonInheritedOps extends ToEmptyOps
5253
object ops {
5354
implicit def toAllEmptyOps[A](target: A)(implicit tc: Empty[A]): AllOps[A] {
5455
type TypeClassType = Empty[A]
55-
} = new AllOps[A] {
56-
type TypeClassType = Empty[A]
57-
val self: A = target
58-
val typeClassInstance: TypeClassType = tc
59-
}
56+
} =
57+
new AllOps[A] {
58+
type TypeClassType = Empty[A]
59+
val self: A = target
60+
val typeClassInstance: TypeClassType = tc
61+
}
6062
}
6163

6264
/****************************************************************************/

alleycats-core/src/main/scala/alleycats/EmptyK.scala

+12-10
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,23 @@ object EmptyK {
3232
trait ToEmptyKOps {
3333
implicit def toEmptyKOps[F[_], A](target: F[A])(implicit tc: EmptyK[F]): Ops[F, A] {
3434
type TypeClassType = EmptyK[F]
35-
} = new Ops[F, A] {
36-
type TypeClassType = EmptyK[F]
37-
val self: F[A] = target
38-
val typeClassInstance: TypeClassType = tc
39-
}
35+
} =
36+
new Ops[F, A] {
37+
type TypeClassType = EmptyK[F]
38+
val self: F[A] = target
39+
val typeClassInstance: TypeClassType = tc
40+
}
4041
}
4142
object nonInheritedOps extends ToEmptyKOps
4243
object ops {
4344
implicit def toAllEmptyKOps[F[_], A](target: F[A])(implicit tc: EmptyK[F]): AllOps[F, A] {
4445
type TypeClassType = EmptyK[F]
45-
} = new AllOps[F, A] {
46-
type TypeClassType = EmptyK[F]
47-
val self: F[A] = target
48-
val typeClassInstance: TypeClassType = tc
49-
}
46+
} =
47+
new AllOps[F, A] {
48+
type TypeClassType = EmptyK[F]
49+
val self: F[A] = target
50+
val typeClassInstance: TypeClassType = tc
51+
}
5052
}
5153

5254
/****************************************************************************/

alleycats-core/src/main/scala/alleycats/Extract.scala

+12-10
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,23 @@ object Extract {
4343
trait ToExtractOps {
4444
implicit def toExtractOps[F[_], A](target: F[A])(implicit tc: Extract[F]): Ops[F, A] {
4545
type TypeClassType = Extract[F]
46-
} = new Ops[F, A] {
47-
type TypeClassType = Extract[F]
48-
val self: F[A] = target
49-
val typeClassInstance: TypeClassType = tc
50-
}
46+
} =
47+
new Ops[F, A] {
48+
type TypeClassType = Extract[F]
49+
val self: F[A] = target
50+
val typeClassInstance: TypeClassType = tc
51+
}
5152
}
5253
object nonInheritedOps extends ToExtractOps
5354
object ops {
5455
implicit def toAllExtractOps[F[_], A](target: F[A])(implicit tc: Extract[F]): AllOps[F, A] {
5556
type TypeClassType = Extract[F]
56-
} = new AllOps[F, A] {
57-
type TypeClassType = Extract[F]
58-
val self: F[A] = target
59-
val typeClassInstance: TypeClassType = tc
60-
}
57+
} =
58+
new AllOps[F, A] {
59+
type TypeClassType = Extract[F]
60+
val self: F[A] = target
61+
val typeClassInstance: TypeClassType = tc
62+
}
6163
}
6264

6365
/****************************************************************************/

alleycats-core/src/main/scala/alleycats/One.scala

+12-10
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,23 @@ object One {
3939
trait ToOneOps {
4040
implicit def toOneOps[A](target: A)(implicit tc: One[A]): Ops[A] {
4141
type TypeClassType = One[A]
42-
} = new Ops[A] {
43-
type TypeClassType = One[A]
44-
val self: A = target
45-
val typeClassInstance: TypeClassType = tc
46-
}
42+
} =
43+
new Ops[A] {
44+
type TypeClassType = One[A]
45+
val self: A = target
46+
val typeClassInstance: TypeClassType = tc
47+
}
4748
}
4849
object nonInheritedOps extends ToOneOps
4950
object ops {
5051
implicit def toAllOneOps[A](target: A)(implicit tc: One[A]): AllOps[A] {
5152
type TypeClassType = One[A]
52-
} = new AllOps[A] {
53-
type TypeClassType = One[A]
54-
val self: A = target
55-
val typeClassInstance: TypeClassType = tc
56-
}
53+
} =
54+
new AllOps[A] {
55+
type TypeClassType = One[A]
56+
val self: A = target
57+
val typeClassInstance: TypeClassType = tc
58+
}
5759
}
5860

5961
/****************************************************************************/

alleycats-core/src/main/scala/alleycats/Pure.scala

+12-10
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,23 @@ object Pure {
4242
trait ToPureOps {
4343
implicit def toPureOps[F[_], A](target: F[A])(implicit tc: Pure[F]): Ops[F, A] {
4444
type TypeClassType = Pure[F]
45-
} = new Ops[F, A] {
46-
type TypeClassType = Pure[F]
47-
val self: F[A] = target
48-
val typeClassInstance: TypeClassType = tc
49-
}
45+
} =
46+
new Ops[F, A] {
47+
type TypeClassType = Pure[F]
48+
val self: F[A] = target
49+
val typeClassInstance: TypeClassType = tc
50+
}
5051
}
5152
object nonInheritedOps extends ToPureOps
5253
object ops {
5354
implicit def toAllPureOps[F[_], A](target: F[A])(implicit tc: Pure[F]): AllOps[F, A] {
5455
type TypeClassType = Pure[F]
55-
} = new AllOps[F, A] {
56-
type TypeClassType = Pure[F]
57-
val self: F[A] = target
58-
val typeClassInstance: TypeClassType = tc
59-
}
56+
} =
57+
new AllOps[F, A] {
58+
type TypeClassType = Pure[F]
59+
val self: F[A] = target
60+
val typeClassInstance: TypeClassType = tc
61+
}
6062
}
6163

6264
/****************************************************************************/

alleycats-core/src/main/scala/alleycats/Zero.scala

+12-10
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,23 @@ object Zero {
4040
trait ToZeroOps {
4141
implicit def toZeroOps[A](target: A)(implicit tc: Zero[A]): Ops[A] {
4242
type TypeClassType = Zero[A]
43-
} = new Ops[A] {
44-
type TypeClassType = Zero[A]
45-
val self: A = target
46-
val typeClassInstance: TypeClassType = tc
47-
}
43+
} =
44+
new Ops[A] {
45+
type TypeClassType = Zero[A]
46+
val self: A = target
47+
val typeClassInstance: TypeClassType = tc
48+
}
4849
}
4950
object nonInheritedOps extends ToZeroOps
5051
object ops {
5152
implicit def toAllZeroOps[A](target: A)(implicit tc: Zero[A]): AllOps[A] {
5253
type TypeClassType = Zero[A]
53-
} = new AllOps[A] {
54-
type TypeClassType = Zero[A]
55-
val self: A = target
56-
val typeClassInstance: TypeClassType = tc
57-
}
54+
} =
55+
new AllOps[A] {
56+
type TypeClassType = Zero[A]
57+
val self: A = target
58+
val typeClassInstance: TypeClassType = tc
59+
}
5860
}
5961

6062
/****************************************************************************/

alleycats-laws/src/main/scala/alleycats/laws/discipline/FlatMapRecTests.scala

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ import org.typelevel.discipline.Laws
1010
trait FlatMapRecTests[F[_]] extends Laws {
1111
def laws: FlatMapLaws[F]
1212

13-
def tailRecM[A: Arbitrary](implicit
14-
ArbFA: Arbitrary[F[A]],
15-
ArbAFA: Arbitrary[A => F[A]],
16-
EqFA: Eq[F[A]]): RuleSet =
13+
def tailRecM[A: Arbitrary](implicit ArbFA: Arbitrary[F[A]], ArbAFA: Arbitrary[A => F[A]], EqFA: Eq[F[A]]): RuleSet =
1714
new DefaultRuleSet(
1815
name = "flatMapTailRec",
1916
parent = None,

build.sbt

+15-11
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,15 @@ lazy val simulacrumSettings = Seq(
8383
libraryDependencies += "org.typelevel" %% "simulacrum-scalafix-annotations" % "0.2.0",
8484
pomPostProcess := { (node: xml.Node) =>
8585
new RuleTransformer(new RewriteRule {
86-
override def transform(node: xml.Node): Seq[xml.Node] = node match {
87-
case e: xml.Elem
88-
if e.label == "dependency" &&
89-
e.child.exists(child => child.label == "groupId" && child.text == "org.typelevel") &&
90-
e.child.exists(child => child.label == "artifactId" && child.text.startsWith("simulacrum")) =>
91-
Nil
92-
case _ => Seq(node)
93-
}
86+
override def transform(node: xml.Node): Seq[xml.Node] =
87+
node match {
88+
case e: xml.Elem
89+
if e.label == "dependency" &&
90+
e.child.exists(child => child.label == "groupId" && child.text == "org.typelevel") &&
91+
e.child.exists(child => child.label == "artifactId" && child.text.startsWith("simulacrum")) =>
92+
Nil
93+
case _ => Seq(node)
94+
}
9495
}).transform(node).head
9596
}
9697
)
@@ -139,7 +140,8 @@ lazy val includeGeneratedSrc: Setting[_] = {
139140

140141
lazy val disciplineDependencies = Seq(
141142
libraryDependencies ++= Seq("org.scalacheck" %%% "scalacheck" % scalaCheckVersion,
142-
"org.typelevel" %%% "discipline-core" % disciplineVersion)
143+
"org.typelevel" %%% "discipline-core" % disciplineVersion
144+
)
143145
)
144146

145147
lazy val testingDependencies = Seq(
@@ -423,7 +425,8 @@ lazy val catsJVM = project
423425
alleycatsLaws.jvm,
424426
alleycatsTests.jvm,
425427
jvm,
426-
docs)
428+
docs
429+
)
427430
.dependsOn(
428431
kernel.jvm,
429432
kernelLaws.jvm,
@@ -454,7 +457,8 @@ lazy val catsJS = project
454457
alleycatsCore.js,
455458
alleycatsLaws.js,
456459
alleycatsTests.js,
457-
js)
460+
js
461+
)
458462
.dependsOn(
459463
kernel.js,
460464
kernelLaws.js,

core/src/main/scala-2.12/cats/instances/ScalaVersionSpecificParallelInstances.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ trait ParallelInstances extends ParallelInstances1 {
1212
cats.instances.either.catsParallelForEitherAndValidated[E]
1313

1414
@deprecated("Use OptionT.catsDataParallelForOptionT", "2.0.0")
15-
def catsParallelForOptionTNestedOption[M[_]](
16-
implicit P: Parallel[M]
15+
def catsParallelForOptionTNestedOption[M[_]](implicit
16+
P: Parallel[M]
1717
): Parallel.Aux[OptionT[M, *], Nested[P.F, Option, *]] = OptionT.catsDataParallelForOptionT[M]
1818

1919
@deprecated("Use cats.instances.list.catsStdNonEmptyParallelForListZipList", "2.1.0")
@@ -29,8 +29,8 @@ trait ParallelInstances extends ParallelInstances1 {
2929
cats.instances.stream.catsStdParallelForStreamZipStream
3030

3131
@deprecated("Use EitherT.catsDataParallelForEitherTWithParallelEffect", "2.0.0")
32-
def catsParallelForEitherTNestedParallelValidated[M[_], E: Semigroup](
33-
implicit P: Parallel[M]
32+
def catsParallelForEitherTNestedParallelValidated[M[_], E: Semigroup](implicit
33+
P: Parallel[M]
3434
): Parallel.Aux[EitherT[M, E, *], Nested[P.F, Validated[E, *], *]] =
3535
EitherT.catsDataParallelForEitherTWithParallelEffect[M, E]
3636
}

core/src/main/scala-2.12/cats/instances/stream.scala

+29-26
Original file line numberDiff line numberDiff line change
@@ -68,36 +68,39 @@ trait StreamInstances extends cats.kernel.instances.StreamInstances {
6868
var state: Either[Unit, Option[B]] = Left(())
6969

7070
@tailrec
71-
def advance(): Unit = stack match {
72-
case Right(b) #:: tail =>
73-
stack = tail
74-
state = Right(Some(b))
75-
case Left(a) #:: tail =>
76-
stack = fn(a) #::: tail
77-
advance()
78-
case empty =>
79-
state = Right(None)
80-
}
71+
def advance(): Unit =
72+
stack match {
73+
case Right(b) #:: tail =>
74+
stack = tail
75+
state = Right(Some(b))
76+
case Left(a) #:: tail =>
77+
stack = fn(a) #::: tail
78+
advance()
79+
case empty =>
80+
state = Right(None)
81+
}
8182

8283
@tailrec
83-
def hasNext: Boolean = state match {
84-
case Left(()) =>
85-
advance()
86-
hasNext
87-
case Right(o) =>
88-
o.isDefined
89-
}
84+
def hasNext: Boolean =
85+
state match {
86+
case Left(()) =>
87+
advance()
88+
hasNext
89+
case Right(o) =>
90+
o.isDefined
91+
}
9092

9193
@tailrec
92-
def next(): B = state match {
93-
case Left(()) =>
94-
advance()
95-
next()
96-
case Right(o) =>
97-
val b = o.get
98-
advance()
99-
b
100-
}
94+
def next(): B =
95+
state match {
96+
case Left(()) =>
97+
advance()
98+
next()
99+
case Right(o) =>
100+
val b = o.get
101+
advance()
102+
b
103+
}
101104
}
102105

103106
it.toStream

0 commit comments

Comments
 (0)