Skip to content

Commit 71790bc

Browse files
committed
Address reviewers comments
1 parent 940f517 commit 71790bc

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/docs/reference/type-lambdas-spec.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,18 @@ type TL1 = [v1 X >: L1 <: U1] => R1
4141
type TL2 = [v2 X >: L2 <: U2] => R2
4242
```
4343
where `v1` and `v2` are optional variance annotations: `+`, `-`, or absent.
44-
Then `TL1 <: TL2`, if the type interval `L2..U2` is contained in the type interval `L1..U1` (i.e.
45-
`L1 <: L2` and `U2 <: U1`), and either `v2` is absent or `v1 = v2`.
44+
Then `TL1 <: TL2`, if
45+
46+
- the type interval `L2..U2` is contained in the type interval `L1..U1` (i.e.
47+
`L1 <: L2` and `U2 <: U1`),
48+
- either `v2` is absent or `v1 = v2`
49+
- `R1 <: R2`
50+
51+
Here we have relied on alpha renaming to bring match the two bound types `X`.
52+
53+
A partially applied type constructor such as `List` is assumed to be equivalent to
54+
its eta expansion. I.e, `List = `[+X] => List[X]`. This allows type constructors
55+
to be compared with type lambdas.
4656

4757
## Relationship with Parameterized Type Definitions
4858

0 commit comments

Comments
 (0)