-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add typeclass derivation #5540
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
Add typeclass derivation #5540
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
0dc0191
Allow `,` in parents of template
odersky 6bf25d2
Syntax and parsing for `derives` clauses
odersky 2e72be4
Make `derives` a soft keyword
odersky ae79a8a
Clarify regular and soft keywords keywords in syntax.md
odersky fb09e82
Represent derives clauses in Template trees
odersky c8357b2
Make Case a FromStartFlag
odersky b3c48d3
Reorganize children handling
odersky fe9f40a
Improve error diagnostics for implicits not found
odersky 4642070
Flesh out test
odersky 1d58888
Fix tests
odersky 7eda566
Deriving infrastructure in typelevel
odersky 7adc4c4
Partial Implementation of Deriving functionality
odersky a1fbe5f
Auto-generated derived typeclass instances
odersky ceb5f2e
Flesh out derived$shaped
odersky 83bc248
More blacklisting and test fixing
odersky 6e48ee1
Complete first version of derivation scheme
odersky 9063951
Allow derivation for classes with no companions
odersky 0377cab
Handle derived typeclasses with non-trivial prefixes
odersky 27f96dc
Scaling test
odersky 17b0fee
Move typelevel classes to src-bootstrapped
odersky 34f9c84
Rename typelevel package to compiletime
odersky e36c5e2
Packaging reorgs
odersky 0db9e9d
Add docs
odersky 944eca0
blacklist new test for pickling
odersky 98fcbc1
Shaped -> Generic
odersky 0e8e7ce
Change Shaped -> Generic
odersky 04c3ae7
Fix order of Child annotations.
odersky d81ce91
Synthesize Generic instances on the fly
odersky f1467f3
Handle duplicate children
odersky dffa71b
Allow to derive directly from Generic
odersky 5eca939
Improve robustness in the face of errors
odersky 12609e4
Drop redundant check
odersky 4d52930
Fixes to positions
odersky f3d901e
Revert changes to CheckRealizable
odersky 465ffcc
Fix patmat exhaustivity check files
odersky d4025d6
Polishings
odersky 1a9c5c0
Tweaks to docs
odersky 1a58222
Fix typo
odersky 7fccb61
Revert to standard implicit syntax in docs
odersky 46e4b19
Polishings
odersky 5182b8b
Fix erasure of *: and NonEmptyTuple
odersky efb3e5f
Make NonEmptyTuple `sealed`.
odersky 4e594ed
More tests
odersky 8e98772
Fix typos
odersky 683b93b
Add derived field to Tasty reflect
odersky 569f918
Drop failing assertion
odersky e3f74e3
Add missing comma and update checkfiles
nicolasstucki d9be6e2
Update another check file
odersky caece0e
Fix rebase breakage
odersky 9d87241
Fix test
odersky 248971b
Another check file fix
odersky 49901fe
Fix typos in documentation
OlivierBlanvillain 4cd81ba
Fix spacing and add return types
OlivierBlanvillain 296958e
Fix failing fuzzy test
odersky bbb54cb
Fix rebase breakage
odersky 5e4fa24
Fix indent
odersky 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
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.
Should it be
Tree[T]
here? Then I think the two.derived.asInstanceOf[List[TypeTree]]
casts inTreeOpsImpl.scala
wouldn't be needed.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.
derived
only exist as untyped trees. Typed trees containderived$...
members instead. It would be pointless to keep typedderived
trees around, as the info in them is never relevant.