3.1.0
julien-truffaut
released this
01 Sep 08:31
·
263 commits
to master
since this release
What's Changed
case class User(name: String, address: Address)
case class Address(streetNumber: Int, street: Option[Street])
val elise = User("Elise", Address(12, Some(Street("high street"))))
val addressLens: Lens[User, Address] = Focus[User](_.address)
val newLens : Lens[User, Int] = addressLens.refocus(_.streetNumber)
newLens.replace(50)(elise)
// or using the applied syntax
import monocle.syntax.all._
elise.focus(_.address).refocus(_.streetNumber)
- Add
GenIso
to Scala 3 (#1185) @japgolly - Add
Iso.fields
(#1197) @kenbot index
is now a direct method for all optics for better Cats compat (#1192) @kenbot- Avoid indirect call to
AsPrismImpl
(#1186) @nicolasstucki - Fix #1177 where Focus could not operate on type aliases (#1178) @kenbot
Dependencies
- Update sbt-scalajs, scalajs-compiler, ... to 1.7.0 (#1187) @scala-steward
- Update refined, refined-scalacheck to 0.9.27 (#1179) @scala-steward