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

Should withDefault be available on lenses with a polymorphic source? #1340

Open
steinybot opened this issue Feb 23, 2023 · 0 comments
Open
Assignees
Labels

Comments

@steinybot
Copy link

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 {
  ...
}
@steinybot steinybot changed the title Should withDefault be on the polymorphic lens? Should withDefault be available on lenses with a polymorphic source? Feb 23, 2023
@yilinwei yilinwei self-assigned this Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants