Skip to content

Commit

Permalink
remove eta-expand
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Aug 26, 2024
1 parent 037064f commit 6d48bd0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/shared/src/test/scala/monocle/IsoSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ class IsoSpec extends MonocleSuite {
}
val _unary: Iso[Unary, Int] = Iso[Unary, Int](_.i)(Unary.apply)
val _binary: Iso[Binary, (String, Int)] =
Iso[Binary, (String, Int)](b => (b.s, b.i))((Binary.apply _).tupled)
Iso[Binary, (String, Int)](b => (b.s, b.i))(Binary.apply.tupled)
val _quintary: Iso[Quintary, (Char, Boolean, String, Int, Double)] =
Iso[Quintary, (Char, Boolean, String, Int, Double)](b => (b.c, b.b, b.s, b.i, b.f))((Quintary.apply _).tupled)
Iso[Quintary, (Char, Boolean, String, Int, Double)](b => (b.c, b.b, b.s, b.i, b.f))(Quintary.apply.tupled)

case class IntWrapper(i: Int)
implicit val intWrapperGen: Arbitrary[IntWrapper] = Arbitrary(arbitrary[Int].map(IntWrapper.apply))
Expand Down
4 changes: 2 additions & 2 deletions test/shared/src/test/scala/monocle/PrismSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ class PrismSpec extends MonocleSuite {
Prism[Arities, (String, Int)] {
case Binary(s, i) => Some((s, i))
case _ => None
}((Binary.apply _).tupled)
}(Binary.apply.tupled)
val _quintary: Prism[Arities, (Char, Boolean, String, Int, Double)] =
Prism[Arities, (Char, Boolean, String, Int, Double)] {
case Quintary(c, b, s, i, f) => Some((c, b, s, i, f))
case _ => None
}((Quintary.apply _).tupled)
}(Quintary.apply.tupled)

checkAll("apply Prism", PrismTests(_right[String, Int]))
checkAll("apply partial Prism", PrismTests(_pright[String, Int]))
Expand Down
4 changes: 2 additions & 2 deletions test/shared/src/test/scala/monocle/TestInstances.scala
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ trait TestInstances extends PlatformSpecificTestInstances with cats.instances.Al

implicit val nullaryGen: Arbitrary[Nullary] = Arbitrary(Gen.const(Nullary()))
implicit val unaryGen: Arbitrary[Unary] = Arbitrary(arbitrary[Int].map(Unary.apply))
implicit val binaryGen: Arbitrary[Binary] = Arbitrary(arbitrary[(String, Int)].map((Binary.apply _) tupled))
implicit val binaryGen: Arbitrary[Binary] = Arbitrary(arbitrary[(String, Int)].map(Binary.apply.tupled))
implicit val quintaryGen: Arbitrary[Quintary] = Arbitrary(
arbitrary[(Char, Boolean, String, Int, Double)]
.map((Quintary.apply _) tupled)
.map(Quintary.apply.tupled)
)
implicit val aritiesGen: Arbitrary[Arities] =
Arbitrary(
Expand Down

0 comments on commit 6d48bd0

Please sign in to comment.