Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
adriaanm committed Mar 26, 2014
1 parent 7307a03 commit 3df5773
Show file tree
Hide file tree
Showing 9 changed files with 234 additions and 255 deletions.
12 changes: 6 additions & 6 deletions 04-identifiers-names-and-scopes.md
Expand Up @@ -64,6 +64,12 @@ is bound by a definition or declaration, then $x$ refers to the entity
introduced by that binding. In that case, the type of $x$ is the type
of the referenced entity.

A reference to a qualified (type- or term-) identifier $e.x$ refers to
the member of the type $T$ of $e$ which has the name $x$ in the same
namespace as the identifier. It is an error if $T$ is not a [value type](05-types.html#value-types).
The type of $e.x$ is the member type of the referenced entity in $T$.


###### Example: bindings

Assume the following two definitions of a objects named `X` in packages `P` and `Q`.
Expand Down Expand Up @@ -105,9 +111,3 @@ object A {
}}}}}}
```

A reference to a qualified (type- or term-) identifier $e.x$ refers to
the member of the type $T$ of $e$ which has the name $x$ in the same
namespace as the identifier. It is an error if $T$ is not a
[value type](05-types.html#value-types). The type of $e.x$ is the member type of the
referenced entity in $T$.

6 changes: 3 additions & 3 deletions 05-types.md
Expand Up @@ -302,7 +302,7 @@ definition within the refinement. This restriction does not apply to
the method's result type.

If no refinement is given, the empty refinement is implicitly added,
i.e.\ `$T_1$ with … with $T_n$` is a shorthand for
i.e. `$T_1$ with … with $T_n$` is a shorthand for
`$T_1$ with … with $T_n$ {}`.

A compound type may also consist of just a refinement
Expand Down Expand Up @@ -348,7 +348,7 @@ a value `callsign` and a `fly` method.
InfixType ::= CompoundType {id [nl] CompoundType}
```

An infix type `$T_1$ \mathit{op} $T_2$` consists of an infix
An infix type `$T_1 \mathit{op} T_2$` consists of an infix
operator $\mathit{op}$ which gets applied to two type operands $T_1$ and
$T_2$. The type is equivalent to the type application
`$\mathit{op}$[$T_1$, $T_2$]`. The infix operator $\mathit{op}$ may be an
Expand Down Expand Up @@ -935,7 +935,7 @@ type $C'$, if one of the following holds.


The $(<:)$ relation forms pre-order between types,
i.e.\ it is transitive and reflexive. _least upper bounds_ and
i.e. it is transitive and reflexive. _least upper bounds_ and
_greatest lower bounds_ of a set of types
are understood to be relative to that order.

Expand Down
16 changes: 8 additions & 8 deletions 06-basic-declarations-and-definitions.md
Expand Up @@ -64,7 +64,7 @@ All definitions have a ``repeated form`` where the initial
definition keyword is followed by several constituent definitions
which are separated by commas. A repeated definition is
always interpreted as a sequence formed from the
constituent definitions. E.g.\ the function definition
constituent definitions. E.g. the function definition
`def f(x) = x, g(y) = y` expands to
`def f(x) = x; def g(y) = y` and
the type definition
Expand Down Expand Up @@ -419,7 +419,7 @@ The most general form of a first-order type parameter is
`$@a_1 \ldots @a_n$ $\pm$ $t$ >: $L$ <: $U$`.
Here, $L$, and $U$ are lower and upper bounds that
constrain possible type arguments for the parameter. It is a
compile-time error if $L$ does not conform to $U$. $\pm$ is a _variance_, i.e.\ an optional prefix of either `+`, or
compile-time error if $L$ does not conform to $U$. $\pm$ is a _variance_, i.e. an optional prefix of either `+`, or
`-`. One or more annotations may precede the type parameter.

<!--
Expand All @@ -433,7 +433,7 @@ TODO: Why
TODO: this is a pretty awkward description of scoping and distinctness of binders
-->

The names of all type parameters must be pairwise different in their enclosing type parameter clause. The scope of a type parameter includes in each case the whole type parameter clause. Therefore it is possible that a type parameter appears as part of its own bounds or the bounds of other type parameters in the same clause. However, a type parameter may not be bounded directly or indirectly by itself.\
The names of all type parameters must be pairwise different in their enclosing type parameter clause. The scope of a type parameter includes in each case the whole type parameter clause. Therefore it is possible that a type parameter appears as part of its own bounds or the bounds of other type parameters in the same clause. However, a type parameter may not be bounded directly or indirectly by itself.

A type constructor parameter adds a nested type parameter clause to the type parameter. The most general form of a type constructor parameter is `$@a_1\ldots@a_n$ $\pm$ $t[\mathit{tps}\,]$ >: $L$ <: $U$`.

Expand Down Expand Up @@ -610,7 +610,7 @@ A function declaration has the form `def $f\,\mathit{psig}$: $T$`, where
$f$ is the function's name, $\mathit{psig}$ is its parameter
signature and $T$ is its result type. A function definition
`def $f\,\mathit{psig}$: $T$ = $e$` also includes a _function body_ $e$,
i.e.\ an expression which defines the function's result. A parameter
i.e. an expression which defines the function's result. A parameter
signature consists of an optional type parameter clause `[$\mathit{tps}\,$]`,
followed by zero or more value parameter clauses
`($\mathit{ps}_1$)$\ldots$($\mathit{ps}_n$)`. Such a declaration or definition
Expand Down Expand Up @@ -676,7 +676,7 @@ def compare$\$$default$\$$2[T](a: T): T = a
ParamType ::= ‘=>’ Type
```

The type of a value parameter may be prefixed by `=>`, e.g.\
The type of a value parameter may be prefixed by `=>`, e.g.
`$x$: => $T$`. The type of such a parameter is then the
parameterless method type `=> $T$`. This indicates that the
corresponding argument is not evaluated at the point of function
Expand Down Expand Up @@ -879,7 +879,7 @@ The most general form of an import expression is a list of _import selectors_

for $n \geq 0$, where the final wildcard ‘_’ may be absent. It
makes available each importable member `$p$.$x_i$` under the unqualified name
$y_i$. I.e.\ every import selector `$x_i$ => $y_i$` renames
$y_i$. I.e. every import selector `$x_i$ => $y_i$` renames
`$p$.$x_i$` to
$y_i$. If a final wildcard is present, all importable members $z$ of
$p$ other than `$x_1 , \ldots , x_n,y_1 , \ldots , y_n$` are also made available
Expand Down Expand Up @@ -909,11 +909,11 @@ $x$. In this case, $x$ is imported without renaming, so the
import selector is equivalent to `$x$ => $x$`. Furthermore, it is
possible to replace the whole import selector list by a single
identifier or wildcard. The import clause `import $p$.$x$` is
equivalent to `import $p$.{$x\,$}`, i.e.\ it makes available without
equivalent to `import $p$.{$x\,$}`, i.e. it makes available without
qualification the member $x$ of $p$. The import clause
`import $p$._` is equivalent to
`import $p$.{_}`,
i.e.\ it makes available without qualification all members of $p$
i.e. it makes available without qualification all members of $p$
(this is analogous to `import $p$.*` in Java).

An import clause with multiple import expressions
Expand Down

0 comments on commit 3df5773

Please sign in to comment.