Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove eta-expand #1462

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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