-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Replace delegate match
with summonFrom
.
#7201
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
Conversation
Change contextual docs to reflect three changes to `given` syntax: - put `given` inside the parentheses of parameters and arguments, as was suggested by @smarter. - change given import syntax to make `given` an import selector - change `the` to `theGiven`. All of these should discussed in separate issues.
Following the discussion in scala#7151, choose `:` instead of `as` for given clauses.
Also: Allow inline givens to be whitebox
Syntax: given x: T Allowed anywhere a pattern is allowed. This is useful in for expressions and as a replacement of given matches, to name just two cases.
Drop `delegate match` and `given match`. They are replaced by `summonFrom`.
delegate match
with summonFrom
.delegate match
with summonFrom
.
I'll update the shapeless-3 branch in the community build as soon as there's a nightly with these changes. |
@milessabin How do we proceed with the bootstrap? Here's one way I see would work, but maybe there's something simpler:
Should we do it like this? |
0a0e1b8
to
b049b77
Compare
Or simpler ... just let shapeless break in the community build and I'll fix it up afterwards. |
I was told by @nicolasstucki we can't get a nightly anymore if the CB breaks. So we'll do it in steps. |
@milessabin I was puzzled why the community build passed, even though |
Oh! Yes ... I went straight from Yup, go ahead and merge this. Do you want to do the separate PR that removes |
We'll do a new nightly before. |
Instead of having a separate syntactic construct (latest incarnation:
delegate match
), providea special method
summonFrom
inscala.compiletime
.becomes
summonFrom is currently implemented by compiler magic. It could be implemented as a macro if we introduce an additional way to control when inline methods expand. See the comment in
Applications.scala
.Based on #7194.