summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--05-types.md11
-rw-r--r--10-pattern-matching.md24
-rw-r--r--12-xml-expressions-and-patterns.md7
3 files changed, 20 insertions, 22 deletions
diff --git a/05-types.md b/05-types.md
index 22998b11f5..7f701c6cf0 100644
--- a/05-types.md
+++ b/05-types.md
@@ -791,10 +791,10 @@ These notions are defined mutually recursively as follows.
We define two relations between types.
------------------ ---------------- -------------------------------------------------
-Type equivalence $T \equiv U$ $T$ and $U$ are interchangeable in all contexts.
-Conformance $T <: U$ Type $T$ conforms to type $U$.
------------------ ---------------- -------------------------------------------------
+| | | |
+|-----------------|----------------|-------------------------------------------------|
+|Type equivalence |$T \equiv U$ |$T$ and $U$ are interchangeable in all contexts. |
+|Conformance |$T <: U$ |Type $T$ conforms to type $U$. |
### Type Equivalence
@@ -913,8 +913,7 @@ _subsumes_ another declaration of the same name in some compound type or class
type $C'$, if one of the following holds.
- A value declaration or definition that defines a name $x$ with type $T$
- subsumes
- a value or method declaration that defines $x$ with type $T'$, provided
+ subsumes a value or method declaration that defines $x$ with type $T'$, provided
$T <: T'$.
- A method declaration or definition that defines a name $x$ with type $T$
subsumes a method declaration that defines $x$ with type $T'$, provided
diff --git a/10-pattern-matching.md b/10-pattern-matching.md
index fd63d3fbc9..8349c52994 100644
--- a/10-pattern-matching.md
+++ b/10-pattern-matching.md
@@ -376,7 +376,7 @@ pattern. Inference takes into account the expected type of the
pattern.
-Type parameter inference for typed patterns. \
+### Type parameter inference for typed patterns.
Assume a typed pattern $p: T'$. Let $T$ result from $T'$ where all wildcards in
$T'$ are renamed to fresh variable names. Let $a_1 , \ldots , a_n$ be
@@ -387,14 +387,14 @@ Type parameter inference constructs first a set of subtype constraints over
the type variables $a_i$. The initial constraints set $\mathcal{C}_0$ reflects
just the bounds of these type variables. That is, assuming $T$ has
bound type variables $a_1 , \ldots , a_n$ which correspond to class
-type parameters $a'_1 , \ldots , a'_n$ with lower bounds $L_1
-, \ldots , L_n$ and upper bounds $U_1 , \ldots , U_n$, $\mathcal{C}_0$
-contains the constraints
+type parameters $a'_1 , \ldots , a'_n$ with lower bounds $L_1, \ldots , L_n$
+and upper bounds $U_1 , \ldots , U_n$, $\mathcal{C}_0$ contains the constraints
+
+| | | | |
+|-------------|------|---------------|------------------------|
+|$a_i$ | $<:$ | $\sigma U_i$ | $(i = 1, \ldots , n)$ |
+|$\sigma L_i$ | $<:$ | $a_i$ | $(i = 1 , \ldots , n)$ |
-------------- ------ -------------- ------------------------
-$a_i$ $<:$ $\sigma U_i$ $(i = 1, \ldots , n)$
-$\sigma L_i$ $<:$ $a_i$ $(i = 1 , \ldots , n)$
-------------- ------ -------------- ------------------------
where $\sigma$ is the substitution $[a'_1 := a_1 , \ldots , a'_n :=
a_n]$.
@@ -402,14 +402,14 @@ a_n]$.
The set $\mathcal{C}_0$ is then augmented by further subtype constraints. There are two
cases.
-Case 1: \
+###### Case 1
If there exists a substitution $\sigma$ over the type variables $a_i
, \ldots , a_n$ such that $\sigma T$ conforms to $\mathit{pt}$, one determines
the weakest subtype constraints $\mathcal{C}_1$ over the type variables $a_1
, \ldots , a_n$ such that $\mathcal{C}_0 \wedge \mathcal{C}_1$ implies that $T$
conforms to $\mathit{pt}$.
-Case 2: \
+###### Case 2
Otherwise, if $T$ can not be made to conform to $\mathit{pt}$ by
instantiating its type variables, one determines all type variables in
$\mathit{pt}$ which are defined as type parameters of a method enclosing
@@ -430,12 +430,12 @@ The final step consists in choosing type bounds for the type
variables which imply the established constraint system. The process
is different for the two cases above.
-Case 1: \
+###### Case 1
We take $a_i >: L_i <: U_i$ where each
$L_i$ is minimal and each $U_i$ is maximal wrt $<:$ such that
$a_i >: L_i <: U_i$ for $i = 1 , \ldots , n$ implies $\mathcal{C}_0 \wedge \mathcal{C}_1$.
-Case 2: \
+###### Case 2
We take $a_i >: L_i <: U_i$ and $b_i >: L'_i <: U'_i$ where each $L_i$
and $L'_j$ is minimal and each $U_i$ and $U'_j$ is maximal such that
$a_i >: L_i <: U_i$ for $i = 1 , \ldots , n$ and
diff --git a/12-xml-expressions-and-patterns.md b/12-xml-expressions-and-patterns.md
index 5d4a60c33d..d1a1e33b81 100644
--- a/12-xml-expressions-and-patterns.md
+++ b/12-xml-expressions-and-patterns.md
@@ -23,10 +23,9 @@ related to entity resolution.
The following productions describe Scala's extensible markup language,
designed as close as possible to the W3C extensible markup language
-standard. Only the productions for attribute values and character data
-are changed. Scala does not support declarations, CDATA
-sections or processing instructions. Entity references are not
-resolved at runtime.
+standard. Only the productions for attribute values and character data are changed.
+Scala does not support declarations, CDATA sections or processing instructions.
+Entity references are not resolved at runtime.
```
Element ::= EmptyElemTag