Skip to content

Generate lazy vals in deriving #10520

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

Merged
merged 5 commits into from
Nov 26, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Nov 26, 2020

So far we generated only given defs in typeclass derivation which we then optimized to lazy vals in CacheAliasImplicits. We now generate the lazy vals directly, which means that CacheAliasImplicits only needs to work in one direction: dropping the caches converting lazy vals to defs. Consequently, it has been renamed to UncacheGivenAliases.

Avoid generating them with a PolyType over an ExpreType.
Instead of `[T] (=> U)` we should generate `[T]U`. That's
what we do for all user-defined types.
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice simplification, thanks!

Co-authored-by: Guillaume Martres <smarter@ubuntu.com>
@odersky odersky merged commit 8059fce into scala:master Nov 26, 2020
@odersky odersky deleted the change-deriving-givens branch November 26, 2020 22:36
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants