You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,21 @@
5
5
6
6
A Scala compiler plugin to give patterns and for-comprehensions the love they deserve
7
7
8
+
## Note on Scala 3
9
+
Scala 3.0.0 natively supports the semantic changes provided by better-monadic-for under `-source:future` compiler flag. The following code is considered valid under this flag:
10
+
11
+
```scala
12
+
for {
13
+
(x, givenString) <-IO(42->"foo")
14
+
} yields"$x${summon[String]}"
15
+
```
16
+
17
+
There are no changes to `map` desugaring and value bindings inside fors still allocate tuples to my current knowledge. I don't currently have plans on rewriting plugin for Scala 3, however.
18
+
19
+
See [changes: pattern bindings](https://dotty.epfl.ch/docs/reference/changed-features/pattern-bindings.html) and [contextual abstractions: pattern-bound given instances](https://dotty.epfl.ch/docs/reference/contextual/givens.html#pattern-bound-given-instances).
0 commit comments