Skip to content

Commit dd9504a

Browse files
authored
Merge pull request #11 from tegonal/doc-type-lambda
doc(type-lambda): typos and improvements
2 parents cb05b58 + 303353e commit dd9504a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ TypeBounds ::= [‘>:’ Type] [‘<:’ Type]
1414

1515
### Type Checking
1616

17-
A type lambda such as `[X] =>> F[X]` defines a function from types to types. The parameter(s) may carry bounds and variance annotations.
18-
If a parameter is bounded, as in `[X >: L <: H] =>> F[X]` it is checked that arguments to the parameters conform to the bounds `L` and `H`.
19-
Only the upper bound `H` can be F-bounded, i.e. `X` can appear in it.
17+
A type lambda such as `[X] =>> F[X]` defines a function from types to types. The parameter(s) may carry bounds.
18+
If a parameter is bounded, as in `[X >: L <: U] =>> F[X]` it is checked that arguments to the parameters conform to the bounds `L` and `U`.
19+
Only the upper bound `U` can be F-bounded, i.e. `X` can appear in it.
2020

2121
## Subtyping Rules
2222

@@ -31,7 +31,7 @@ Then `TL1 <: TL2`, if
3131
`L1 <: L2` and `U2 <: U1`),
3232
- `R1 <: R2`
3333

34-
Here we have relied on alpha renaming to bring match the two bound types `X`.
34+
Here we have relied on alpha renaming to match the two bound types `X`.
3535

3636
A partially applied type constructor such as `List` is assumed to be equivalent to
3737
its eta expansion. I.e, `List = [X] =>> List[X]`. This allows type constructors to be compared with type lambdas.
@@ -46,7 +46,7 @@ is regarded as a shorthand for an unparameterized definition with a type lambda
4646
```scala
4747
type T = [X] =>> R
4848
```
49-
If the a type definition carries `+` or `-` variance annotations,
49+
If the type definition carries `+` or `-` variance annotations,
5050
it is checked that the variance annotations are satisfied by the type lambda.
5151
For instance,
5252
```scala

0 commit comments

Comments
 (0)