-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify enum derivation in Scala 3 (#453)
This PR allows a simple `derives` call to work on Scala 3 enums. We add a new `macroRWAll` macro, that `derives` now forwards to. This can be called once on each sealed trait or enum and will automatically generate the `macroR` calls on all the sub-classes. We then add a pair of `superTypeReader`/`superTypeWriter` forwarders to allow sub-classes to make use of super-class readers and writers automatically without any input from the user. Note that this approach does not work in Scala 2; while `macroRWAll` can be defined, `superTypeReader`/`superTypeWriter` seem to cause diverging implicit expansions. So for now I leave the Scala 2 experience unchanged
- Loading branch information
Showing
13 changed files
with
395 additions
and
181 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
|
||
sbt.version=1.2.8 | ||
sbt.version=1.8.2 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.3.12") | ||
addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.3.11") |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.