optics-dev / optics-dev/Monocle
Should withDefault be available on lenses with a polymorphic source?
Open
@yilinwei is already working on this.
Since Jan 3, 2024.
feature
- Dominant language
- Scala
- Stars
- 1.7k
- Forks
- 207
- Avg merge
- 7h 59m
- Merged PRs (30d)
- 5
Description
It seems to me like the extension methods that are on LensSyntax et al that use andThen (such as withDefault ought to only require A =:= B and not S =:= T. I would expect those to be on something like:
final case class LensTargetSyntax[S, T, A](private val self: PLens[S, T, A, A]) extends AnyVal {
...
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.