Skip to content

Commit 926b5d9

Browse files
committed
Fixed typos
1 parent 8492c21 commit 926b5d9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/HigherKinded-v2.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ is equivalent to
6969
Map { type Map$K <: AnyRef; type Map$V = Int }
7070

7171

72-
Type parameters in the Encodings
72+
Type parameters in the encodings
7373
--------------------------------
7474

7575
The notion of type parameters makes sense even for encoded types,
@@ -191,7 +191,7 @@ We expand this to
191191
type Rep <: Lambda1
192192

193193
The type parameters of `Rep` are the type parameters of its upper bound, so
194-
`Rep` is a uniary type constructor.
194+
`Rep` is a unary type constructor.
195195

196196
More generally, a higher-kinded type declaration
197197

@@ -217,8 +217,8 @@ would expand to
217217
Rep { type Arg1 = String } # Apply
218218

219219
If we instantiate the higher-kinded type with a concrete type constructor (i.e. a parameterized
220-
trait or class, we have to do one extra adaptation to make it work. The parameterized trait
221-
or class has to be eta-expansed so that it comforms to the `Lambda` bound. For instance,
220+
trait or class), we have to do one extra adaptation to make it work. The parameterized trait
221+
or class has to be eta-expanded so that it comforms to the `Lambda` bound. For instance,
222222

223223
type Rep = Set
224224

@@ -296,7 +296,7 @@ Roughly, `#` was meant to encode Java's inner classes. In Java, given the classe
296296

297297
The types `Outer#Inner`, `Sub1#Inner` and `Sub2#Inner` would all exist and be
298298
regarded as equal to each other. But if `Outer` had abstract type members this would
299-
not work, since that type member could be instantiated differently in `Sub1` and `Sub2`.
299+
not work, since an abstract type member could be instantiated differently in `Sub1` and `Sub2`.
300300
Assuming that `Sub1#Inner = Sub2#Inner` could then lead to a soundness hole. To avoid soundness
301301
problems, the types in `X#Y` were restricted so that `Y` was (an alias of) a class type and
302302
`X` was (an alias of) a class type with no abstract type members.
@@ -306,13 +306,13 @@ are more careful with the subtyping rules. Specifically:
306306

307307
A # X <: B # X
308308

309-
if either `A = B`, or the following three conditions hold:
309+
if either `A =:= B` (i.e. `A <: B` and `B <: A`), or the following three conditions hold:
310310

311311
1. `X` is (an alias of) a class type,
312312
2. `B` is (an alias of) a class type without abstract type members.
313313
3. `A <: B`.
314314

315-
In essence, we allow abstract types `X`, `Y` in a project `X#Y` but we prevent in this
315+
In essence, we allow abstract types `X`, `Y` in a projection `X#Y` but we prevent in this
316316
case hiding conflicting type information in a subtype widening.
317317

318318
It would be good to study these rules formally, trying to verify their soundness.

0 commit comments

Comments
 (0)