-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Test case for new typeclass derivation scheme #6531
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
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
2b1ec55
New test case
odersky 844c5d7
Fix widenAbstractTypes
odersky d5c5c11
Special treatment for Singletons
odersky 6fda1f3
Fix printer bug
odersky c30af3c
Add desugar Printer
odersky 3617cba
Add deriving.Mirror infrastructure
odersky 42807da
Add isGenericProduct test
odersky 5829928
Synthesis for mirror infrastructure
odersky c6c0f71
Rename SyntheticMethods -> SyntheticMembers
odersky 5c924ca
Mirror infrastructure for generic sum types
odersky 159c883
Refine isGenericSum condition
odersky 88cec9f
Always generate companion objects for sealed classes
odersky 4cccf41
Revert "Always generate companion objects for sealed classes"
odersky c031b30
Make enum cases implement Mirror.Singleton
odersky 9120105
Add Mirror.Singleton to enum cases after typer
odersky ed79907
Refactor special case handling in implicit arguments
odersky f898fc1
Add new utility method: withAttachment
odersky 934c4ad
Use attachment to mark singleton cases
odersky be1a063
Synthesize implicits for product and sum mirrors
odersky 275a0a9
Generate sum mirrors for sealed traits that do not have a companion
odersky e50a032
Use Label field for sum and product mirrors
odersky eda4232
Synthesize mirrors also for Scala 2 defined classes and objects
odersky f24e247
Polishings
odersky 7583adc
Avoid name clashes by prefixing all type members with Mirrored
odersky 4784e2f
Update typeclass-scaling data using old Generic scheme
odersky a87b42b
Measure typeclass scaling using new scheme
odersky 56c0f96
Drop old deriving infrastructure
odersky 01d3ff7
Make scheme work also for nested classes and companion objects
odersky 6d3c2f9
Don't constrain MirroredElemTypes to be a subtype of Tuple
odersky c02861f
Introduce MirroredTypeConstructor
odersky 930ca64
Avoid widening derived instances too far
milessabin 91df766
Generalized type class derivation for higher kinded type classes
milessabin ddb0c4c
Renamed elemTypes to elemsType
milessabin bf67516
MirroredMonoType -> MirroredType in comment
milessabin 2afa89c
Removed redundant case and inlined RHSs
milessabin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just about error reporting (proper cyclic reference instead of a stack overflow), or do you actually have a type correct program that makes the compiler loop here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second: if we would follow the alias here instead of just doing a
mapOver
every recursive match type would loop.