Skip to content

Commit eb84835

Browse files
Fix typos
Co-authored-by: Michał Pałka <[email protected]>
1 parent 04d16b7 commit eb84835

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/quote-pattern-type-variable-syntax.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The initial `type` declarations in the pattern with a type variable name (lowerc
3434
```scala
3535
case '{ type t; $x: `t` } => f[t](x: Expr[t])
3636
case '{ type u; ($ls: List[`u`]).map($f: `u` => Int) } => g[u](ls: Expr[List[u]], f: Expr[u => Int])
37-
case '{ type tail <: Tuple; $x: *[Int, `tail`] } => h[tail](x: Expr[*[Int, tail])
37+
case '{ type tail <: Tuple; $x: *:[Int, `tail`] } => h[tail](x: Expr[*:[Int, tail])
3838
```
3939

4040
##### Nested type variable
@@ -85,18 +85,18 @@ We first want to introduce syntax for explicit type variable definitions in quot
8585

8686
```scala
8787
case '[ type t; List[`t`] ] => f[t]
88-
case '[ type tail <: Tuple; *[Int, `tail`] ] => g[tail]
88+
case '[ type tail <: Tuple; *:[Int, `tail`] ] => g[tail]
8989
```
9090

9191
Second, we want the remove the need for backticks for references to explicit type variable definitions. If we have an explicit type variable definition and a type variable with the same name, we can syntactically assume these are the same and not introduce a new nested type variable.
9292
```scala
9393
case '{ type t; $x: t } => f[t](x: Expr[t])
9494
case '{ type u; ($ls: List[u]).map($f: u => Int) } => g[u](ls: Expr[List[u]], f: Expr[u => Int])
95-
case '{ type tail <: Tuple; $x: *[Int, tail] } => h[tail](x: Expr[*[Int, tail])
95+
case '{ type tail <: Tuple; $x: *:[Int, tail] } => h[tail](x: Expr[*:[Int, tail])
9696
```
9797
```scala
9898
case '[ type t; List[t] ] => f[t]
99-
case '[ type tail <: Tuple; *[Int, tail] ] => g[tail]
99+
case '[ type tail <: Tuple; *:[Int, tail] ] => g[tail]
100100
```
101101

102102
### Specification

0 commit comments

Comments
 (0)