summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@typesafe.com>2014-09-30 08:09:01 +0200
committerLukas Rytz <lukas.rytz@typesafe.com>2014-09-30 08:09:01 +0200
commitc0ceffb865ff4b2146aacec547cc42bb7605ee93 (patch)
treea9deedeb96ec09780de1870e1cfd7ed13e5e6e8c
parent344151f17b04bf75d6ebafec6aa4229dfe6cbf09 (diff)
parenta026fd5e08d32d25e44add76384f823d35183c4f (diff)
downloadscala-c0ceffb865ff4b2146aacec547cc42bb7605ee93.tar.gz
scala-c0ceffb865ff4b2146aacec547cc42bb7605ee93.tar.bz2
scala-c0ceffb865ff4b2146aacec547cc42bb7605ee93.zip
Merge pull request #4012 from retronym/merge/2.11.x-to-2.12.x-20140930
Merge 2.11.x to 2.12.x
-rw-r--r--spec/01-lexical-syntax.md68
-rw-r--r--spec/02-identifiers-names-and-scopes.md11
-rw-r--r--spec/03-types.md313
-rw-r--r--spec/04-basic-declarations-and-definitions.md129
-rw-r--r--spec/05-classes-and-objects.md134
-rw-r--r--spec/06-expressions.md281
-rw-r--r--spec/07-implicit-parameters-and-views.md65
-rw-r--r--spec/08-pattern-matching.md124
-rw-r--r--spec/09-top-level-definitions.md14
-rw-r--r--spec/10-xml-expressions-and-patterns.md55
-rw-r--r--spec/11-user-defined-annotations.md5
-rw-r--r--spec/12-the-scala-standard-library.md131
-rw-r--r--spec/13-syntax-summary.md36
-rw-r--r--spec/14-references.md8
-rw-r--r--spec/README.md5
-rw-r--r--spec/_includes/numbering.css6
-rw-r--r--spec/_layouts/default.yml62
-rw-r--r--spec/_layouts/toc.yml17
-rw-r--r--spec/index.md2
-rw-r--r--spec/public/favicon.icobin0 -> 6518 bytes
-rw-r--r--spec/public/highlight/LICENSE24
-rw-r--r--spec/public/highlight/highlight.pack.js1
-rw-r--r--spec/public/images/scala-logo-red-spiral-dark.pngbin0 -> 13021 bytes
-rw-r--r--spec/public/octicons/LICENSE.txt9
-rw-r--r--spec/public/octicons/octicons.css235
-rw-r--r--spec/public/octicons/octicons.eotbin0 -> 31440 bytes
-rw-r--r--spec/public/octicons/octicons.svg198
-rw-r--r--spec/public/octicons/octicons.ttfbin0 -> 31272 bytes
-rw-r--r--spec/public/octicons/octicons.woffbin0 -> 17492 bytes
-rw-r--r--spec/public/scripts/navigation.js70
-rw-r--r--spec/public/stylesheets/print.css15
-rw-r--r--spec/public/stylesheets/screen.css112
-rw-r--r--src/compiler/scala/tools/nsc/Properties.scala2
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/javac/JavaParsers.scala5
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala4
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/patmat/ScalacPatternExpanders.scala17
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/util/ClassPath.scala2
-rw-r--r--src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala2
-rw-r--r--src/library/rootdoc.txt2
-rw-r--r--src/library/scala/util/Properties.scala6
-rw-r--r--src/reflect/scala/reflect/internal/Types.scala2
-rw-r--r--test/files/neg/macro-invalidret.check3
-rw-r--r--test/files/neg/macro-invalidret/Impls_1.scala2
-rw-r--r--test/files/pos/five-dot-f.flags1
-rw-r--r--test/files/pos/t8719.check0
-rw-r--r--test/files/pos/t8719/Macros_1.scala21
-rw-r--r--test/files/pos/t8719/Test_2.scala10
-rw-r--r--test/files/pos/t8844.scala4
-rw-r--r--test/files/presentation/t8459.check14
-rw-r--r--test/files/presentation/t8459/Test.scala3
-rw-r--r--test/files/presentation/t8459/src/IncompleteDynamicSelect.scala14
-rw-r--r--test/files/run/t5530.flags1
-rw-r--r--test/files/run/t5532.flags1
-rw-r--r--test/files/run/t5614.flags1
-rw-r--r--test/files/run/t8852a.scala34
-rw-r--r--test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala1
61 files changed, 1476 insertions, 818 deletions
diff --git a/spec/01-lexical-syntax.md b/spec/01-lexical-syntax.md
index 6c8712cda2..d5752bbdf0 100644
--- a/spec/01-lexical-syntax.md
+++ b/spec/01-lexical-syntax.md
@@ -11,7 +11,7 @@ Scala programs are written using the Unicode Basic Multilingual Plane
presently supported. This chapter defines the two modes of Scala's
lexical syntax, the Scala mode and the _XML mode_. If not
otherwise mentioned, the following descriptions of Scala tokens refer
-to _Scala mode_, and literal characters ‘c’ refer to the ASCII fragment
+to _Scala mode_, and literal characters ‘c’ refer to the ASCII fragment
`\u0000` – `\u007F`.
In Scala mode, _Unicode escapes_ are replaced by the corresponding
@@ -29,7 +29,7 @@ but I can't make it work nor can I imagine how this would make sense,
so I removed it for now.
-->
-To construct tokens, characters are distinguished according to the following
+To construct tokens, characters are distinguished according to the following
classes (Unicode general category given in parentheses):
1. Whitespace characters. `\u0020 | \u0009 | \u000D | \u000A`.
@@ -41,13 +41,13 @@ classes (Unicode general category given in parentheses):
1. Parentheses `‘(’ | ‘)’ | ‘[’ | ‘]’ | ‘{’ | ‘}’ `.
1. Delimiter characters ``‘`’ | ‘'’ | ‘"’ | ‘.’ | ‘;’ | ‘,’ ``.
1. Operator characters. These consist of all printable ASCII characters
- `\u0020` - `\u007F` which are in none of the sets above, mathematical
+ `\u0020` - `\u007F` which are in none of the sets above, mathematical
symbols (`Sm`) and other symbols (`So`).
## Identifiers
```ebnf
-op ::= opchar {opchar}
+op ::= opchar {opchar}
varid ::= lower idrest
plainid ::= upper idrest
| varid
@@ -61,14 +61,14 @@ There are three ways to form an identifier. First, an identifier can
start with a letter which can be followed by an arbitrary sequence of
letters and digits. This may be followed by underscore ‘_’
characters and another string composed of either letters and digits or
-of operator characters. Second, an identifier can start with an operator
+of operator characters. Second, an identifier can start with an operator
character followed by an arbitrary sequence of operator characters.
The preceding two forms are called _plain_ identifiers. Finally,
an identifier may also be formed by an arbitrary string between
back-quotes (host systems may impose some restrictions on which
strings are legal for identifiers). The identifier then is composed
of all characters excluding the backquotes themselves.
-
+
As usual, a longest match rule applies. For instance, the string
```scala
@@ -92,8 +92,8 @@ do else extends false final
finally for forSome if implicit
import lazy match new null
object override package private protected
-return sealed super this throw
-trait try true type val
+return sealed super this throw
+trait try true type val
var while with yield
_ : = => <- <: <% >: # @
```
@@ -115,7 +115,6 @@ For instance, the statement `Thread.yield()` is illegal, since
`yield` is a reserved word in Scala. However, here's a
work-around: `` Thread.`yield`() ``
-
## Newline Characters
```ebnf
@@ -134,7 +133,7 @@ The tokens that can terminate a statement are: literals, identifiers
and the following delimiters and reserved words:
```scala
-this null true false return type <xml-start>
+this null true false return type <xml-start>
_ ) ] }
```
@@ -142,8 +141,8 @@ The tokens that can begin a statement are all Scala tokens _except_
the following delimiters and reserved words:
```scala
-catch else extends finally forSome match
-with yield , . ; : = => <- <: <%
+catch else extends finally forSome match
+with yield , . ; : = => <- <: <%
>: # [ ) ] }
```
@@ -169,7 +168,7 @@ Newlines are disabled in:
1. Any regions analyzed in [XML mode](#xml-mode).
Note that the brace characters of `{...}` escapes in XML and
-string literals are not tokens,
+string literals are not tokens,
and therefore do not enclose a region where newlines
are enabled.
@@ -179,7 +178,7 @@ between the two tokens. However, if two tokens are separated by at
least one completely blank line (i.e a line which contains no
printable characters), then two `nl` tokens are inserted.
-The Scala grammar (given in full [here](#scala-syntax-summary))
+The Scala grammar (given in full [here](13-syntax-summary.html))
contains productions where optional `nl` tokens, but not
semicolons, are accepted. This has the effect that a newline in one of these
positions does not terminate an expression or statement. These positions can
@@ -189,21 +188,21 @@ Multiple newline tokens are accepted in the following places (note
that a semicolon in place of the newline would be illegal in every one
of these cases):
-- between the condition of a
+- between the condition of a
[conditional expression](06-expressions.html#conditional-expressions)
or [while loop](06-expressions.html#while-loop-expressions) and the next
following expression,
-- between the enumerators of a
+- between the enumerators of a
[for-comprehension](06-expressions.html#for-comprehensions-and-for-loops)
and the next following expression, and
-- after the initial `type` keyword in a
+- after the initial `type` keyword in a
[type definition or declaration](04-basic-declarations-and-definitions.html#type-declarations-and-type-aliases).
A single new line token is accepted
- in front of an opening brace ‘{’, if that brace is a legal
continuation of the current statement or expression,
-- after an [infix operator](06-expressions.html#prefix-infix-and-postfix-operations),
+- after an [infix operator](06-expressions.html#prefix,-infix,-and-postfix-operations),
if the first token on the next line can start an expression,
- in front of a [parameter clause](04-basic-declarations-and-definitions.html#function-declarations-and-definitions), and
- after an [annotation](11-user-defined-annotations.html#user-defined-annotations).
@@ -300,16 +299,15 @@ illegal).
protected class Data { ... }
```
-
## Literals
There are literals for integer numbers, floating point numbers,
characters, booleans, symbols, strings. The syntax of these literals is in
each case as in Java.
-<!-- TODO
+<!-- TODO
say that we take values from Java, give examples of some lits in
- particular float and double.
+ particular float and double.
-->
```ebnf
@@ -322,11 +320,10 @@ Literal ::= [‘-’] integerLiteral
| ‘null’
```
-
### Integer Literals
```ebnf
-integerLiteral ::= (decimalNumeral | hexNumeral | octalNumeral)
+integerLiteral ::= (decimalNumeral | hexNumeral | octalNumeral)
[‘L’ | ‘l’]
decimalNumeral ::= ‘0’ | nonZeroDigit {digit}
hexNumeral ::= ‘0’ ‘x’ hexDigit {hexDigit}
@@ -356,14 +353,12 @@ is _pt_. The numeric ranges given by these types are:
|`Short` | $-2\^{15}$ to $2\^{15}-1$|
|`Char` | $0$ to $2\^{16}-1$ |
-
### Example
```scala
0 21 0xFFFFFFFF -42L
```
-
### Floating Point Literals
```ebnf
@@ -410,7 +405,6 @@ booleanLiteral ::= ‘true’ | ‘false’
The boolean literals `true` and `false` are
members of type `Boolean`.
-
### Character Literals
```ebnf
@@ -429,11 +423,10 @@ by an [escape sequence](#escape-sequences).
Note that `'\u000A'` is _not_ a valid character literal because
Unicode conversion is done before literal parsing and the Unicode
-character \\u000A (line feed) is not a printable
+character `\u000A` (line feed) is not a printable
character. One can use instead the escape sequence `'\n'` or
the octal escape `'\12'` ([see here](#escape-sequences)).
-
### String Literals
```ebnf
@@ -446,7 +439,7 @@ characters are either printable unicode character or are described by
[escape sequences](#escape-sequences). If the string literal
contains a double quote character, it must be escaped,
i.e. `"\""`. The value of a string literal is an instance of
-class `String`.
+class `String`.
### Example
@@ -500,17 +493,16 @@ evaluates to
```scala
the present string
-spans three
+spans three
lines.
```
Method `stripMargin` is defined in class
-[scala.collection.immutable.StringLike](http://www.scala-lang.org/api/current/index.html#scala.collection.immutable.StringLike).
+[scala.collection.immutable.StringLike](http://www.scala-lang.org/api/current/#scala.collection.immutable.StringLike).
Because there is a predefined
[implicit conversion](06-expressions.html#implicit-conversions) from `String` to
`StringLike`, the method is applicable to all strings.
-
### Escape Sequences
The following escape sequences are recognized in character and string literals.
@@ -526,15 +518,13 @@ The following escape sequences are recognized in character and string literals.
| `‘\‘ ‘'‘` | `\u0027` | single quote | `'` |
| `‘\‘ ‘\‘` | `\u005c` | backslash | `\` |
-
A character with Unicode between 0 and 255 may also be represented by
-an octal escape, i.e. a backslash ‘\’ followed by a
+an octal escape, i.e. a backslash `'\'` followed by a
sequence of up to three octal characters.
It is a compile time error if a backslash character in a character or
string literal does not start a valid escape sequence.
-
### Symbol literals
```ebnf
@@ -557,7 +547,6 @@ caches weak references to `Symbol`s, thus ensuring that
identical symbol literals are equivalent with respect to reference
equality.
-
## Whitespace and Comments
Tokens may be separated by whitespace characters
@@ -572,7 +561,6 @@ but are required to be properly nested. Therefore, a comment like
`/* /* */` will be rejected as having an unterminated
comment.
-
## XML mode
In order to allow literal inclusion of XML fragments, lexical analysis
@@ -589,10 +577,10 @@ brace and immediately followed by a character starting an XML name.
The scanner switches from XML mode to Scala mode if either
-- the XML expression or the XML pattern started by the initial ‘<’ has been
+- the XML expression or the XML pattern started by the initial ‘<’ has been
successfully parsed, or if
-- the parser encounters an embedded Scala expression or pattern and
- forces the Scanner
+- the parser encounters an embedded Scala expression or pattern and
+ forces the Scanner
back to normal mode, until the Scala expression or pattern is
successfully parsed. In this case, since code and XML fragments can be
nested, the parser has to maintain a stack that reflects the nesting
diff --git a/spec/02-identifiers-names-and-scopes.md b/spec/02-identifiers-names-and-scopes.md
index bfb743dbe4..afa97c136c 100644
--- a/spec/02-identifiers-names-and-scopes.md
+++ b/spec/02-identifiers-names-and-scopes.md
@@ -17,14 +17,13 @@ which are collectively called _bindings_.
Bindings of different kinds have a precedence defined on them:
1. Definitions and declarations that are local, inherited, or made
- available by a package clause in the same compilation unit where the
- definition occurs have highest precedence.
+ available by a package clause in the same compilation unit where the
+ definition occurs have highest precedence.
1. Explicit imports have next highest precedence.
1. Wildcard imports have next highest precedence.
1. Definitions made available by a package clause not in the
compilation unit where the definition occurs have lowest precedence.
-
There are two different name spaces, one for [types](03-types.html#types)
and one for [terms](06-expressions.html#expressions). The same name may designate a
type and a term, depending on the context where the name is used.
@@ -33,7 +32,7 @@ A binding has a _scope_ in which the entity defined by a single
name can be accessed using a simple name. Scopes are nested. A binding
in some inner scope _shadows_ bindings of lower precedence in the
same scope as well as bindings of the same or lower precedence in outer
-scopes.
+scopes.
<!-- TODO: either the example, the spec, or the compiler is wrong
@@ -55,7 +54,7 @@ A reference to an unqualified (type- or term-) identifier $x$ is bound
by the unique binding, which
- defines an entity with name $x$ in the same namespace as the identifier, and
-- shadows all other bindings that define entities with name $x$ in that
+- shadows all other bindings that define entities with name $x$ in that
namespace.
It is an error if no such binding exists. If $x$ is bound by an
@@ -70,7 +69,6 @@ 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](03-types.html#value-types).
The type of $e.x$ is the member type of the referenced entity in $T$.
-
### Example
Assume the following two definitions of a objects named `X` in packages `P` and `Q`.
@@ -111,4 +109,3 @@ object A {
println("L20: "+x) // `x' refers to string "abc" here
}}}}}}
```
-
diff --git a/spec/03-types.md b/spec/03-types.md
index 4a02c7a8c1..80200cdf33 100644
--- a/spec/03-types.md
+++ b/spec/03-types.md
@@ -11,9 +11,9 @@ chapter: 3
| InfixType [ExistentialClause]
FunctionArgTypes ::= InfixType
| ‘(’ [ ParamType {‘,’ ParamType } ] ‘)’
- ExistentialClause ::= ‘forSome’ ‘{’ ExistentialDcl
+ ExistentialClause ::= ‘forSome’ ‘{’ ExistentialDcl
{semi ExistentialDcl} ‘}’
- ExistentialDcl ::= ‘type’ TypeDcl
+ ExistentialDcl ::= ‘type’ TypeDcl
| ‘val’ ValDcl
InfixType ::= CompoundType {id [nl] CompoundType}
CompoundType ::= AnnotType {‘with’ AnnotType} [Refinement]
@@ -31,7 +31,7 @@ chapter: 3
We distinguish between first-order types and type constructors, which
take type parameters and yield types. A subset of first-order types
called _value types_ represents sets of (first-class) values.
-Value types are either _concrete_ or _abstract_.
+Value types are either _concrete_ or _abstract_.
Every concrete value type can be represented as a _class type_, i.e. a
[type designator](#type-designators) that refers to a
@@ -39,8 +39,8 @@ Every concrete value type can be represented as a _class type_, i.e. a
[compound type](#compound-types) representing an
intersection of types, possibly with a [refinement](#compound-types)
that further constrains the types of its members.
-<!--
-A shorthand exists for denoting [function types](#function-types)
+<!--
+A shorthand exists for denoting [function types](#function-types)
-->
Abstract value types are introduced by [type parameters](04-basic-declarations-and-definitions.html#type-parameters)
and [abstract type bindings](04-basic-declarations-and-definitions.html#type-declarations-and-type-aliases).
@@ -50,20 +50,19 @@ Parentheses in types can be used for grouping.
define a class (of the same name as the object or package, but
inaccessible to user programs).
-Non-value types capture properties of identifiers that
-[are not values](#non-value-types). For example, a
-[type constructor](#type-constructors) does not directly specify a type of
-values. However, when a type constructor is applied to the correct type
-arguments, it yields a first-order type, which may be a value type.
-
-Non-value types are expressed indirectly in Scala. E.g., a method type is
-described by writing down a method signature, which in itself is not a real
-type, although it gives rise to a corresponding [method type](#method-types).
-Type constructors are another example, as one can write
-`type Swap[m[_, _], a,b] = m[b, a]`, but there is no syntax to write
+Non-value types capture properties of identifiers that
+[are not values](#non-value-types). For example, a
+[type constructor](#type-constructors) does not directly specify a type of
+values. However, when a type constructor is applied to the correct type
+arguments, it yields a first-order type, which may be a value type.
+
+Non-value types are expressed indirectly in Scala. E.g., a method type is
+described by writing down a method signature, which in itself is not a real
+type, although it gives rise to a corresponding [method type](#method-types).
+Type constructors are another example, as one can write
+`type Swap[m[_, _], a,b] = m[b, a]`, but there is no syntax to write
the corresponding anonymous type function directly.
-
## Paths
```ebnf
@@ -83,19 +82,18 @@ A path is one of the following.
- The empty path ε (which cannot be written explicitly in user programs).
- $C.$`this`, where $C$ references a class.
The path `this` is taken as a shorthand for $C.$`this` where
- $C$ is the name of the class directly enclosing the reference.
+ $C$ is the name of the class directly enclosing the reference.
- $p.x$ where $p$ is a path and $x$ is a stable member of $p$.
- _Stable members_ are packages or members introduced by object definitions or
+ _Stable members_ are packages or members introduced by object definitions or
by value definitions of [non-volatile types](#volatile-types).
- $C.$`super`$.x$ or $C.$`super`$[M].x$
- where $C$ references a class and $x$ references a
- stable member of the super class or designated parent class $M$ of $C$.
+ where $C$ references a class and $x$ references a
+ stable member of the super class or designated parent class $M$ of $C$.
The prefix `super` is taken as a shorthand for $C.$`super` where
- $C$ is the name of the class directly enclosing the reference.
+ $C$ is the name of the class directly enclosing the reference.
A _stable identifier_ is a path which ends in an identifier.
-
## Value Types
Every value in Scala has a type which is of one of the following
@@ -110,7 +108,7 @@ SimpleType ::= Path ‘.’ type
A singleton type is of the form $p.$`type`, where $p$ is a
path pointing to a value expected to [conform](06-expressions.html#expression-typing)
to `scala.AnyRef`. The type denotes the set of values
-consisting of `null` and the value denoted by $p$.
+consisting of `null` and the value denoted by $p$.
A _stable type_ is either a singleton type or a type which is
declared to be a subtype of trait `scala.Singleton`.
@@ -122,11 +120,11 @@ SimpleType ::= SimpleType ‘#’ id
```
A type projection $T$#$x$ references the type member named
-$x$ of type $T$.
+$x$ of type $T$.
<!--
The following is no longer necessary:
-If $x$ references an abstract type member, then $T$ must be a
+If $x$ references an abstract type member, then $T$ must be a
[stable type](#singleton-types)
-->
@@ -162,8 +160,6 @@ with a type member `Node` and the standard class `scala.Int`,
|scala.Int | scala.type#Int |
|data.maintable.Node | data.maintable.type#Node |
-
-
### Parameterized Types
```ebnf
@@ -172,7 +168,7 @@ TypeArgs ::= ‘[’ Types ‘]’
```
A parameterized type $T[ U_1 , \ldots , U_n ]$ consists of a type
-designator $T$ and type parameters $U_1 , \ldots , U_n$ where
+designator $T$ and type parameters $U_1 , \ldots , U_n$ where
$n \geq 1$. $T$ must refer to a type constructor which takes $n$ type
parameters $a_1 , \ldots , a_n$.
@@ -182,7 +178,7 @@ well-formed if each actual type parameter
_conforms to its bounds_, i.e. $\sigma L_i <: T_i <: \sigma U_i$ where $\sigma$ is the
substitution $[ a_1 := T_1 , \ldots , a_n := T_n ]$.
-### Example
+### Example Parameterized Types
Given the partial type definitions:
```scala
@@ -208,7 +204,7 @@ G[S, String]
### Example
-Given the [above type definitions](example-parameterized-types),
+Given the [above type definitions](#example-parameterized-types),
the following types are ill-formed:
```scala
@@ -231,7 +227,7 @@ SimpleType ::= ‘(’ Types ‘)’
```
A tuple type $(T_1 , \ldots , T_n)$ is an alias for the
-class `scala.Tuple$_n$[$T_1$, … , $T_n$]`, where $n \geq 2$.
+class `scala.Tuple$n$[$T_1$, … , $T_n$]`, where $n \geq 2$.
Tuple classes are case classes whose fields can be accessed using
selectors `_1` , … , `_n`. Their functionality is
@@ -241,12 +237,12 @@ standard Scala library (they might also add other methods and
implement other traits).
```scala
-case class Tuple$n$[+T1, … , +$T_n$](_1: T1, … , _n: $T_n$)
-extends Product_n[T1, … , $T_n$]
+case class Tuple$n$[+$T_1$, … , +$T_n$](_1: $T_1$, … , _n: $T_n$)
+extends Product_n[$T_1$, … , $T_n$]
-trait Product_n[+T1, … , +$T_n$] {
+trait Product_n[+$T_1$, … , +$T_n$] {
override def productArity = $n$
- def _1: T1
+ def _1: $T_1$
def _n: $T_n$
}
@@ -270,7 +266,6 @@ The following type adds the `@suspendable` annotation to the type `String`:
String @suspendable
```
-
### Compound Types
```ebnf
@@ -283,7 +278,7 @@ RefineStat ::= Dcl
```
A compound type $T_1$ `with` … `with` $T_n \\{ R \\}$
-represents objects with members as given in the component types
+represents objects with members as given in the component types
$T_1 , \ldots , T_n$ and the refinement $\\{ R \\}$. A refinement
$\\{ R \\}$ contains declarations and type definitions.
If a declaration or definition overrides a declaration or definition in
@@ -291,7 +286,7 @@ one of the component types $T_1 , \ldots , T_n$, the usual rules for
[overriding](05-classes-and-objects.html#overriding) apply; otherwise the declaration
or definition is said to be “structural” [^2].
-[^2]: A reference to a structurally defined member (method call or access
+[^2]: A reference to a structurally defined member (method call or access
to a value or variable) may generate binary code that is significantly
slower than an equivalent code to a non-structural member.
@@ -341,7 +336,6 @@ Although `Bird` and `Plane` do not share any parent class other than
refinement with structural declarations to accept any object that declares
a value `callsign` and a `fly` method.
-
### Infix Types
```ebnf
@@ -350,23 +344,23 @@ InfixType ::= CompoundType {id [nl] CompoundType}
An infix type $T_1$ `op` $T_2$ consists of an infix
operator `op` which gets applied to two type operands $T_1$ and
-$T_2$. The type is equivalent to the type application
+$T_2$. The type is equivalent to the type application
`op`$[T_1, T_2]$. The infix operator `op` may be an
arbitrary identifier.
All type infix operators have the same precedence; parentheses have to
-be used for grouping. The [associativity](06-expressions.html#prefix-infix-and-postfix-operations)
+be used for grouping. The [associativity](06-expressions.html#prefix,-infix,-and-postfix-operations)
of a type operator is determined as for term operators: type operators
ending in a colon ‘:’ are right-associative; all other
operators are left-associative.
-In a sequence of consecutive type infix operations
+In a sequence of consecutive type infix operations
$t_0 \, \mathit{op} \, t_1 \, \mathit{op_2} \, \ldots \, \mathit{op_n} \, t_n$,
-all operators $\mathit{op}_1 , \ldots , \mathit{op}_n$ must have the same
+all operators $\mathit{op}\_1 , \ldots , \mathit{op}\_n$ must have the same
associativity. If they are all left-associative, the sequence is
-interpreted as
+interpreted as
$(\ldots (t_0 \mathit{op_1} t_1) \mathit{op_2} \ldots) \mathit{op_n} t_n$,
-otherwise it is interpreted as
+otherwise it is interpreted as
$t_0 \mathit{op_1} (t_1 \mathit{op_2} ( \ldots \mathit{op_n} t_n) \ldots)$.
### Function Types
@@ -380,25 +374,25 @@ FunctionArgs ::= InfixType
The type $(T_1 , \ldots , T_n) \Rightarrow U$ represents the set of function
values that take arguments of types $T1 , \ldots , Tn$ and yield
results of type $U$. In the case of exactly one argument type
-$T \Rightarrow U$ is a shorthand for $(T) \Rightarrow U$.
+$T \Rightarrow U$ is a shorthand for $(T) \Rightarrow U$.
An argument type of the form $\Rightarrow T$
represents a [call-by-name parameter](04-basic-declarations-and-definitions.html#by-name-parameters) of type $T$.
Function types associate to the right, e.g.
-$S \Rightarrow T \Rightarrow U$ is the same as
+$S \Rightarrow T \Rightarrow U$ is the same as
$S \Rightarrow (T \Rightarrow U)$.
Function types are shorthands for class types that define `apply`
-functions. Specifically, the $n$-ary function type
+functions. Specifically, the $n$-ary function type
$(T_1 , \ldots , T_n) \Rightarrow U$ is a shorthand for the class type
`Function$_n$[T1 , … , $T_n$, U]`. Such class
types are defined in the Scala library for $n$ between 0 and 9 as follows.
```scala
-package scala
+package scala
trait Function_n[-T1 , … , -T$_n$, +R] {
- def apply(x1: T1 , … , x$_n$: T$_n$): R
- override def toString = "<function>"
+ def apply(x1: T1 , … , x$_n$: T$_n$): R
+ override def toString = "<function>"
}
```
@@ -409,28 +403,28 @@ result type and contravariant in their argument types.
```ebnf
Type ::= InfixType ExistentialClauses
-ExistentialClauses ::= ‘forSome’ ‘{’ ExistentialDcl
+ExistentialClauses ::= ‘forSome’ ‘{’ ExistentialDcl
{semi ExistentialDcl} ‘}’
-ExistentialDcl ::= ‘type’ TypeDcl
+ExistentialDcl ::= ‘type’ TypeDcl
| ‘val’ ValDcl
```
An existential type has the form `$T$ forSome { $Q$ }`
-where $Q$ is a sequence of
+where $Q$ is a sequence of
[type declarations](04-basic-declarations-and-definitions.html#type-declarations-and-type-aliases).
-Let
-$t_1[\mathit{tps}_1] >: L_1 <: U_1 , \ldots , t_n[\mathit{tps}_n] >: L_n <: U_n$
-be the types declared in $Q$ (any of the
+Let
+$t_1[\mathit{tps}\_1] >: L_1 <: U_1 , \ldots , t_n[\mathit{tps}\_n] >: L_n <: U_n$
+be the types declared in $Q$ (any of the
type parameter sections `[ $\mathit{tps}_i$ ]` might be missing).
-The scope of each type $t_i$ includes the type $T$ and the existential clause
-$Q$.
-The type variables $t_i$ are said to be _bound_ in the type
+The scope of each type $t_i$ includes the type $T$ and the existential clause
+$Q$.
+The type variables $t_i$ are said to be _bound_ in the type
`$T$ forSome { $Q$ }`.
Type variables which occur in a type $T$ but which are not bound in $T$ are said
to be _free_ in $T$.
-A _type instance_ of `$T$ forSome { $Q$ }`
+A _type instance_ of `$T$ forSome { $Q$ }`
is a type $\sigma T$ where $\sigma$ is a substitution over $t_1 , \ldots , t_n$
such that, for each $i$, $\sigma L_i <: \sigma t_i <: \sigma U_i$.
The set of values denoted by the existential type `$T$ forSome {$\,Q\,$}`
@@ -438,7 +432,7 @@ is the union of the set of values of all its type instances.
A _skolemization_ of `$T$ forSome { $Q$ }` is
a type instance $\sigma T$, where $\sigma$ is the substitution
-$[t'_1/t_1 , \ldots , t'_n/t_n]$ and each $t'_i$ is a fresh abstract type
+$[t_1'/t_1 , \ldots , t_n'/t_n]$ and each $t_i'$ is a fresh abstract type
with lower bound $\sigma L_i$ and upper bound $\sigma U_i$.
#### Simplification Rules
@@ -457,21 +451,20 @@ is equivalent to
1. An empty quantification can be dropped. E.g.,
`$T$ forSome { }` is equivalent to $T$.
1. An existential type `$T$ forSome { $Q$ }` where $Q$ contains
-a clause `type $t[\mathit{tps}] >: L <: U$` is equivalent
-to the type `$T'$ forSome { $Q$ }` where $T'$ results from $T$ by replacing
+a clause `type $t[\mathit{tps}] >: L <: U$` is equivalent
+to the type `$T'$ forSome { $Q$ }` where $T'$ results from $T$ by replacing
every [covariant occurrence](04-basic-declarations-and-definitions.html#variance-annotations) of $t$ in $T$ by $U$ and by
replacing every contravariant occurrence of $t$ in $T$ by $L$.
-
#### Existential Quantification over Values
As a syntactic convenience, the bindings clause
in an existential type may also contain
-value declarations `val $x$: $T$`.
+value declarations `val $x$: $T$`.
An existential type `$T$ forSome { $Q$; val $x$: $S\,$;$\,Q'$ }`
is treated as a shorthand for the type
-`$T'$ forSome { $Q$; type $t$ <: $S$ with Singleton; $Q'$ }`, where $t$ is a
-fresh type name and $T'$ results from $T$ by replacing every occurrence of
+`$T'$ forSome { $Q$; type $t$ <: $S$ with Singleton; $Q'$ }`, where $t$ is a
+fresh type name and $T'$ results from $T$ by replacing every occurrence of
`$x$.type` with $t$.
#### Placeholder Syntax for Existential Types
@@ -482,17 +475,17 @@ WildcardType ::= ‘_’ TypeBounds
Scala supports a placeholder syntax for existential types.
A _wildcard type_ is of the form `_$\;$>:$\,L\,$<:$\,U$`. Both bound
-clauses may be omitted. If a lower bound clause `>:$\,L$` is missing,
+clauses may be omitted. If a lower bound clause `>:$\,L$` is missing,
`>:$\,$scala.Nothing`
-is assumed. If an upper bound clause `<:$\,U$` is missing,
-`<:$\,$scala.Any` is assumed. A wildcard type is a shorthand for an
-existentially quantified type variable, where the existential quantification is
+is assumed. If an upper bound clause `<:$\,U$` is missing,
+`<:$\,$scala.Any` is assumed. A wildcard type is a shorthand for an
+existentially quantified type variable, where the existential quantification is
implicit.
A wildcard type must appear as type argument of a parameterized type.
-Let $T = p.c[\mathit{targs},T,\mathit{targs}']$ be a parameterized type where
+Let $T = p.c[\mathit{targs},T,\mathit{targs}']$ be a parameterized type where
$\mathit{targs}, \mathit{targs}'$ may be empty and
-$T$ is a wildcard type `_$\;$>:$\,L\,$<:$\,U$`. Then $T$ is equivalent to the
+$T$ is a wildcard type `_$\;$>:$\,L\,$<:$\,U$`. Then $T$ is equivalent to the
existential
type
@@ -500,7 +493,7 @@ type
$p.c[\mathit{targs},t,\mathit{targs}']$ forSome { type $t$ >: $L$ <: $U$ }
```
-where $t$ is some fresh type variable.
+where $t$ is some fresh type variable.
Wildcard types may also appear as parts of [infix types](#infix-types)
, [function types](#function-types),
or [tuple types](#tuple-types).
@@ -562,25 +555,23 @@ List[java.lang.Number] forSome { type T <: java.lang.Number }
which is in turn equivalent (by simplification rules 2 and 3 above) to
`List[java.lang.Number]`.
-
## Non-Value Types
The types explained in the following do not denote sets of values, nor
do they appear explicitly in programs. They are introduced in this
report as the internal types of defined identifiers.
-
### Method Types
-A method type is denoted internally as $(\mathit{Ps})U$, where $(\mathit{Ps})$
+A method type is denoted internally as $(\mathit{Ps})U$, where $(\mathit{Ps})$
is a sequence of parameter names and types $(p_1:T_1 , \ldots , p_n:T_n)$
for some $n \geq 0$ and $U$ is a (value or method) type. This type
-represents named methods that take arguments named $p_1 , \ldots , p_n$
+represents named methods that take arguments named $p_1 , \ldots , p_n$
of types $T_1 , \ldots , T_n$
and that return a result of type $U$.
-Method types associate to the right: $(\mathit{Ps}_1)(\mathit{Ps}_2)U$ is
-treated as $(\mathit{Ps}_1)((\mathit{Ps}_2)U)$.
+Method types associate to the right: $(\mathit{Ps}\_1)(\mathit{Ps}\_2)U$ is
+treated as $(\mathit{Ps}\_1)((\mathit{Ps}\_2)U)$.
A special case are types of methods without any parameters. They are
written here `=> T`. Parameterless methods name expressions
@@ -594,7 +585,7 @@ corresponding function type.
###### Example
The declarations
-
+
```
def a: Int
def b (x: Int): Boolean
@@ -612,8 +603,8 @@ c: (Int) (String, String) String
### Polymorphic Method Types
A polymorphic method type is denoted internally as `[$\mathit{tps}\,$]$T$` where
-`[$\mathit{tps}\,$]` is a type parameter section
-`[$a_1$ >: $L_1$ <: $U_1 , \ldots , a_n$ >: $L_n$ <: $U_n$]`
+`[$\mathit{tps}\,$]` is a type parameter section
+`[$a_1$ >: $L_1$ <: $U_1 , \ldots , a_n$ >: $L_n$ <: $U_n$]`
for some $n \geq 0$ and $T$ is a
(value or method) type. This type represents named methods that
take type arguments `$S_1 , \ldots , S_n$` which
@@ -634,14 +625,14 @@ produce the typings
```scala
empty : [A >: Nothing <: Any] List[A]
-union : [A >: Nothing <: Comparable[A]] (x: Set[A], xs: Set[A]) Set[A] .
+union : [A >: Nothing <: Comparable[A]] (x: Set[A], xs: Set[A]) Set[A]
```
### Type Constructors
A type constructor is represented internally much like a polymorphic method type.
-`[$\pm$ $a_1$ >: $L_1$ <: $U_1 , \ldots , \pm a_n$ >: $L_n$ <: $U_n$] $T$`
-represents a type that is expected by a
+`[$\pm$ $a_1$ >: $L_1$ <: $U_1 , \ldots , \pm a_n$ >: $L_n$ <: $U_n$] $T$`
+represents a type that is expected by a
[type constructor parameter](04-basic-declarations-and-definitions.html#type-parameters) or an
[abstract type constructor binding](04-basic-declarations-and-definitions.html#type-declarations-and-type-aliases) with
the corresponding type parameter clause.
@@ -649,7 +640,7 @@ the corresponding type parameter clause.
###### Example
Consider this fragment of the `Iterable[+X]` class:
-
+
```
trait Iterable[+X] {
def flatMap[newType[+X] <: Iterable[X], S](f: X => newType[S]): newType[S]
@@ -660,7 +651,6 @@ Conceptually, the type constructor `Iterable` is a name for the
anonymous type `[+X] Iterable[X]`, which may be passed to the
`newType` type constructor parameter in `flatMap`.
-
<!-- ### Overloaded Types
More than one values or methods are defined in the same scope with the
@@ -694,7 +684,6 @@ val f = 0
define a function `f} which has type `(x: T)T $\overload$ Int`.
-->
-
## Base Types and Member Definitions
Types of class members depend on the way the members are referenced.
@@ -704,7 +693,6 @@ Central here are three notions, namely:
prefix type $S$,
1. the notion of the set of member bindings of some type $T$.
-
These notions are defined mutually recursively as follows.
1. The set of _base types_ of a type is a set of class types,
@@ -714,25 +702,25 @@ These notions are defined mutually recursively as follows.
`$T_1$ with … with $T_n$ { $R$ }`.
- The base types of an aliased type are the base types of its alias.
- The base types of an abstract type are the base types of its upper bound.
- - The base types of a parameterized type
+ - The base types of a parameterized type
`$C$[$T_1 , \ldots , T_n$]` are the base types
- of type $C$, where every occurrence of a type parameter $a_i$
+ of type $C$, where every occurrence of a type parameter $a_i$
of $C$ has been replaced by the corresponding parameter type $T_i$.
- The base types of a singleton type `$p$.type` are the base types of
the type of $p$.
- - The base types of a compound type
+ - The base types of a compound type
`$T_1$ with $\ldots$ with $T_n$ { $R$ }`
are the _reduced union_ of the base
- classes of all $T_i$'s. This means:
+ classes of all $T_i$'s. This means:
Let the multi-set $\mathscr{S}$ be the multi-set-union of the
base types of all $T_i$'s.
If $\mathscr{S}$ contains several type instances of the same class, say
`$S^i$#$C$[$T^i_1 , \ldots , T^i_n$]` $(i \in I)$, then
- all those instances
+ all those instances
are replaced by one of them which conforms to all
- others. It is an error if no such instance exists. It follows that the
+ others. It is an error if no such instance exists. It follows that the
reduced union, if it exists,
- produces a set of class types, where different types are instances of
+ produces a set of class types, where different types are instances of
different classes.
- The base types of a type selection `$S$#$T$` are
determined as follows. If $T$ is an alias or abstract type, the
@@ -747,26 +735,26 @@ These notions are defined mutually recursively as follows.
makes sense only if the prefix type $S$
has a type instance of class $C$ as a base type, say
`$S'$#$C$[$T_1 , \ldots , T_n$]`. Then we define as follows.
- - If `$S$ = $\epsilon$.type`, then $T$ in $C$ seen from $S$ is
+ - If `$S$ = $\epsilon$.type`, then $T$ in $C$ seen from $S$ is
$T$ itself.
- Otherwise, if $S$ is an existential type `$S'$ forSome { $Q$ }`, and
- $T$ in $C$ seen from $S'$ is $T'$,
+ $T$ in $C$ seen from $S'$ is $T'$,
then $T$ in $C$ seen from $S$ is `$T'$ forSome {$\,Q\,$}`.
- Otherwise, if $T$ is the $i$'th type parameter of some class $D$, then
- - If $S$ has a base type `$D$[$U_1 , \ldots , U_n$]`, for some type
- parameters `[$U_1 , \ldots , U_n$]`, then $T$ in $C$ seen from $S$
+ - If $S$ has a base type `$D$[$U_1 , \ldots , U_n$]`, for some type
+ parameters `[$U_1 , \ldots , U_n$]`, then $T$ in $C$ seen from $S$
is $U_i$.
- Otherwise, if $C$ is defined in a class $C'$, then
$T$ in $C$ seen from $S$ is the same as $T$ in $C'$ seen from $S'$.
- - Otherwise, if $C$ is not defined in another class, then
+ - Otherwise, if $C$ is not defined in another class, then
$T$ in $C$ seen from $S$ is $T$ itself.
- Otherwise, if $T$ is the singleton type `$D$.this.type` for some class $D$
then
- - If $D$ is a subclass of $C$ and $S$ has a type instance of class $D$
+ - If $D$ is a subclass of $C$ and $S$ has a type instance of class $D$
among its base types, then $T$ in $C$ seen from $S$ is $S$.
- Otherwise, if $C$ is defined in a class $C'$, then
$T$ in $C$ seen from $S$ is the same as $T$ in $C'$ seen from $S'$.
- - Otherwise, if $C$ is not defined in another class, then
+ - Otherwise, if $C$ is not defined in another class, then
$T$ in $C$ seen from $S$ is $T$ itself.
- If $T$ is some other type, then the described mapping is performed
to all its type components.
@@ -787,8 +775,6 @@ These notions are defined mutually recursively as follows.
binding $d_T$ of the type `T` in `S`. In that case, we also say
that `S#T` _is defined by_ $d_T$.
-
-
## Relations between types
We define two relations between types.
@@ -798,7 +784,6 @@ We define two relations between types.
|Equivalence |$T \equiv U$ |$T$ and $U$ are interchangeable in all contexts. |
|Conformance |$T <: U$ |Type $T$ conforms to type $U$. |
-
### Equivalence
Equivalence $(\equiv)$ between types is the smallest congruence [^congruence] such that
@@ -812,7 +797,7 @@ the following holds:
consisting only of package or object selectors and ending in $O$, then
`$O$.this.type $\equiv p$.type`.
- Two [compound types](#compound-types) are equivalent if the sequences
- of their component are pairwise equivalent, and occur in the same order, and
+ of their component are pairwise equivalent, and occur in the same order, and
their refinements are equivalent. Two refinements are equivalent if they
bind the same names and the modifiers, types and bounds of every
declared entity are equivalent in both refinements.
@@ -822,43 +807,42 @@ the following holds:
- they have the same number of parameters; and
- corresponding parameters have equivalent types.
Note that the names of parameters do not matter for method type equivalence.
-- Two [polymorphic method types](#polymorphic-method-types) are equivalent if
- they have the same number of type parameters, and, after renaming one set of
+- Two [polymorphic method types](#polymorphic-method-types) are equivalent if
+ they have the same number of type parameters, and, after renaming one set of
type parameters by another, the result types as well as lower and upper bounds
of corresponding type parameters are equivalent.
-- Two [existential types](#existential-types)
+- Two [existential types](#existential-types)
are equivalent if they have the same number of
quantifiers, and, after renaming one list of type quantifiers by
another, the quantified types as well as lower and upper bounds of
corresponding quantifiers are equivalent.
-- Two [type constructors](#type-constructors) are equivalent if they have the
- same number of type parameters, and, after renaming one list of type
- parameters by another, the result types as well as variances, lower and upper
+- Two [type constructors](#type-constructors) are equivalent if they have the
+ same number of type parameters, and, after renaming one list of type
+ parameters by another, the result types as well as variances, lower and upper
bounds of corresponding type parameters are equivalent.
-
[^congruence]: A congruence is an equivalence relation which is closed under formation of contexts
[^implicit]: A method type is implicit if the parameter section that defines it starts with the `implicit` keyword.
### Conformance
-The conformance relation $(<:)$ is the smallest
+The conformance relation $(<:)$ is the smallest
transitive relation that satisfies the following conditions.
- Conformance includes equivalence. If $T \equiv U$ then $T <: U$.
-- For every value type $T$, `scala.Nothing <: $T$ <: scala.Any`.
-- For every type constructor $T$ (with any number of type parameters),
+- For every value type $T$, `scala.Nothing <: $T$ <: scala.Any`.
+- For every type constructor $T$ (with any number of type parameters),
`scala.Nothing <: $T$ <: scala.Any`.
-
-- For every class type $T$ such that `$T$ <: scala.AnyRef` and not
+
+- For every class type $T$ such that `$T$ <: scala.AnyRef` and not
`$T$ <: scala.NotNull` one has `scala.Null <: $T$`.
- A type variable or abstract type $t$ conforms to its upper bound and
- its lower bound conforms to $t$.
+ its lower bound conforms to $t$.
- A class type or parameterized type conforms to any of its base-types.
- A singleton type `$p$.type` conforms to the type of the path $p$.
- A singleton type `$p$.type` conforms to the type `scala.Singleton`.
- A type projection `$T$#$t$` conforms to `$U$#$t$` if $T$ conforms to $U$.
-- A parameterized type `$T$[$T_1$ , … , $T_n$]` conforms to
+- A parameterized type `$T$[$T_1$ , … , $T_n$]` conforms to
`$T$[$U_1$ , … , $U_n$]` if
the following three conditions hold for $i \in \{ 1 , \ldots , n \}$:
1. If the $i$'th type parameter of $T$ is declared covariant, then
@@ -873,63 +857,61 @@ transitive relation that satisfies the following conditions.
binding $d$ of a type or value $x$ in $R$ there exists a member
binding of $x$ in $T$ which subsumes $d$, then $T$ conforms to the
compound type `$U_1$ with $\ldots$ with $U_n$ {$R\,$}`.
-- The existential type `$T$ forSome {$\,Q\,$}` conforms to
+- The existential type `$T$ forSome {$\,Q\,$}` conforms to
$U$ if its [skolemization](#existential-types)
conforms to $U$.
-- The type $T$ conforms to the existential type `$U$ forSome {$\,Q\,$}`
- if $T$ conforms to one of the [type instances](#existential-types)
+- The type $T$ conforms to the existential type `$U$ forSome {$\,Q\,$}`
+ if $T$ conforms to one of the [type instances](#existential-types)
of `$U$ forSome {$\,Q\,$}`.
- If
- $T_i \equiv T'_i$ for $i \in \{ 1 , \ldots , n\}$ and $U$ conforms to $U'$
+ $T_i \equiv T'_i$ for $i \in \{ 1 , \ldots , n\}$ and $U$ conforms to $U'$
then the method type $(p_1:T_1 , \ldots , p_n:T_n) U$ conforms to
$(p'_1:T'_1 , \ldots , p'_n:T'_n) U'$.
- The polymorphic type
- $[a_1 >: L_1 <: U_1 , \ldots , a_n >: L_n <: U_n] T$ conforms to the
+ $[a_1 >: L_1 <: U_1 , \ldots , a_n >: L_n <: U_n] T$ conforms to the
polymorphic type
$[a_1 >: L'_1 <: U'_1 , \ldots , a_n >: L'_n <: U'_n] T'$ if, assuming
- $L'_1 <: a_1 <: U'_1 , \ldots , L'_n <: a_n <: U'_n$
+ $L'_1 <: a_1 <: U'_1 , \ldots , L'_n <: a_n <: U'_n$
one has $T <: T'$ and $L_i <: L'_i$ and $U'_i <: U_i$
for $i \in \{ 1 , \ldots , n \}$.
-- Type constructors $T$ and $T'$ follow a similar discipline. We characterize
+- Type constructors $T$ and $T'$ follow a similar discipline. We characterize
$T$ and $T'$ by their type parameter clauses
$[a_1 , \ldots , a_n]$ and
- $[a'_1 , \ldots , a'_n ]$, where an $a_i$ or $a'_i$ may include a variance
- annotation, a higher-order type parameter clause, and bounds. Then, $T$
- conforms to $T'$ if any list $[t_1 , \ldots , t_n]$ -- with declared
- variances, bounds and higher-order type parameter clauses -- of valid type
- arguments for $T'$ is also a valid list of type arguments for $T$ and
- $T[t_1 , \ldots , t_n] <: T'[t_1 , \ldots , t_n]$. Note that this entails
+ $[a_1' , \ldots , a_n']$, where an $a_i$ or $a_i'$ may include a variance
+ annotation, a higher-order type parameter clause, and bounds. Then, $T$
+ conforms to $T'$ if any list $[t_1 , \ldots , t_n]$ -- with declared
+ variances, bounds and higher-order type parameter clauses -- of valid type
+ arguments for $T'$ is also a valid list of type arguments for $T$ and
+ $T[t_1 , \ldots , t_n] <: T'[t_1 , \ldots , t_n]$. Note that this entails
that:
- - The bounds on $a_i$ must be weaker than the corresponding bounds declared
- for $a'_i$.
- - The variance of $a_i$ must match the variance of $a'_i$, where covariance
+ - The bounds on $a_i$ must be weaker than the corresponding bounds declared
+ for $a'_i$.
+ - The variance of $a_i$ must match the variance of $a'_i$, where covariance
matches covariance, contravariance matches contravariance and any variance
matches invariance.
- Recursively, these restrictions apply to the corresponding higher-order
type parameter clauses of $a_i$ and $a'_i$.
-
A declaration or definition in some compound type of class type $C$
_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
+- 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
$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
+- A method declaration or definition that defines a name $x$ with type $T$
+ subsumes a method declaration that defines $x$ with type $T'$, provided
$T <: T'$.
- A type alias
- `type $t$[$T_1$ , … , $T_n$] = $T$` subsumes a type alias
- `type $t$[$T_1$ , … , $T_n$] = $T'$` if $T \equiv T'$.
+ `type $t$[$T_1$ , … , $T_n$] = $T$` subsumes a type alias
+ `type $t$[$T_1$ , … , $T_n$] = $T'$` if $T \equiv T'$.
- A type declaration `type $t$[$T_1$ , … , $T_n$] >: $L$ <: $U$` subsumes
- a type declaration `type $t$[$T_1$ , … , $T_n$] >: $L'$ <: $U'$` if
+ a type declaration `type $t$[$T_1$ , … , $T_n$] >: $L'$ <: $U'$` if
$L' <: L$ and $U <: U'$.
- A type or class definition that binds a type name $t$ subsumes an abstract
type declaration `type t[$T_1$ , … , $T_n$] >: L <: U` if
$L <: t <: U$.
-
The $(<:)$ relation forms pre-order between types,
i.e. it is transitive and reflexive. _least upper bounds_ and
_greatest lower bounds_ of a set of types
@@ -961,23 +943,20 @@ greatest lower of `A` and `B`. If there are several
least upper bounds or greatest lower bounds, the Scala compiler is
free to pick any one of them.
-
[^4]: The current Scala compiler limits the nesting level
of parameterization in such bounds to be at most two deeper than the
maximum nesting level of the operand types
-
-
### Weak Conformance
-In some situations Scala uses a more general conformance relation. A
-type $S$ _weakly conforms_
+In some situations Scala uses a more general conformance relation. A
+type $S$ _weakly conforms_
to a type $T$, written $S <:_w
T$, if $S <: T$ or both $S$ and $T$ are primitive number types
and $S$ precedes $T$ in the following ordering.
```scala
-Byte $<:_w$ Short
+Byte $<:_w$ Short
Short $<:_w$ Int
Char $<:_w$ Int
Int $<:_w$ Long
@@ -988,14 +967,13 @@ Float $<:_w$ Double
A _weak least upper bound_ is a least upper bound with respect to
weak conformance.
-
## Volatile Types
-Type volatility approximates the possibility that a type parameter or abstract
+Type volatility approximates the possibility that a type parameter or abstract
type instance
-of a type does not have any non-null values. A value member of a volatile type
+of a type does not have any non-null values. A value member of a volatile type
cannot appear in a [path](#paths).
-
+
A type is _volatile_ if it falls into one of four categories:
A compound type `$T_1$ with … with $T_n$ {$R\,$}`
@@ -1007,14 +985,13 @@ is volatile if one of the following two conditions hold.
to the compound type, or
1. one of $T_1 , \ldots , T_n$ is a singleton type.
-
Here, a type $S$ _contributes an abstract member_ to a type $T$ if
$S$ contains an abstract member that is also a member of $T$.
A refinement $R$ contributes an abstract member to a type $T$ if $R$
contains an abstract declaration which is also a member of $T$.
A type designator is volatile if it is an alias of a volatile type, or
-if it designates a type parameter or abstract type that has a volatile type as
+if it designates a type parameter or abstract type that has a volatile type as
its upper bound.
A singleton type `$p$.type` is volatile, if the underlying
@@ -1023,7 +1000,6 @@ type of path $p$ is volatile.
An existential type `$T$ forSome {$\,Q\,$}` is volatile if
$T$ is volatile.
-
## Type Erasure
A type is called _generic_ if it contains type arguments or type variables.
@@ -1036,20 +1012,19 @@ The erasure mapping is defined as follows.
- The erasure of the parameterized type `scala.Array$[T_1]$` is
`scala.Array$[|T_1|]$`.
- The erasure of every other parameterized type $T[T_1 , \ldots , T_n]$ is $|T|$.
-- The erasure of a singleton type `$p$.type` is the
+- The erasure of a singleton type `$p$.type` is the
erasure of the type of $p$.
- The erasure of a type projection `$T$#$x$` is `|$T$|#$x$`.
-- The erasure of a compound type
- `$T_1$ with $\ldots$ with $T_n$ {$R\,$}` is the erasure of the intersection
+- The erasure of a compound type
+ `$T_1$ with $\ldots$ with $T_n$ {$R\,$}` is the erasure of the intersection
dominator of $T_1 , \ldots , T_n$.
- The erasure of an existential type `$T$ forSome {$\,Q\,$}` is $|T|$.
The _intersection dominator_ of a list of types $T_1 , \ldots , T_n$ is computed
as follows.
-Let $T_{i_1} , \ldots , T_{i_m}$ be the subsequence of types $T_i$
-which are not supertypes of some other type $T_j$.
+Let $T_{i_1} , \ldots , T_{i_m}$ be the subsequence of types $T_i$
+which are not supertypes of some other type $T_j$.
If this subsequence contains a type designator $T_c$ that refers to a class
-which is not a trait,
+which is not a trait,
the intersection dominator is $T_c$. Otherwise, the intersection
dominator is the first element of the subsequence, $T_{i_1}$.
-
diff --git a/spec/04-basic-declarations-and-definitions.md b/spec/04-basic-declarations-and-definitions.md
index ab1f98ea07..ed7e4c625e 100644
--- a/spec/04-basic-declarations-and-definitions.md
+++ b/spec/04-basic-declarations-and-definitions.md
@@ -6,7 +6,6 @@ chapter: 4
# Basic Declarations and Definitions
-
```ebnf
Dcl ::= ‘val’ ValDcl
| ‘var’ VarDcl
@@ -40,7 +39,6 @@ between and including $s_i$ and $s_j$,
- $s_k$ cannot be a variable definition.
- If $s_k$ is a value definition, it must be lazy.
-
<!--
Every basic definition may introduce several defined names, separated
by commas. These are expanded according to the following scheme:
@@ -79,7 +77,6 @@ additional parts in the definition, then those parts are implicitly
copied from the next subsequent sequence element which consists of
more than just a defined name and parameters. Examples:
-
- []
The variable declaration `var x, y: Int`
expands to `var x: Int; var y: Int`.
@@ -98,26 +95,24 @@ case object Blue extends Color .
```
-->
-
-
## Value Declarations and Definitions
```ebnf
Dcl ::= ‘val’ ValDcl
ValDcl ::= ids ‘:’ Type
-PatVarDef ::= ‘val’ PatDef
+PatVarDef ::= ‘val’ PatDef
PatDef ::= Pattern2 {‘,’ Pattern2} [‘:’ Type] ‘=’ Expr
ids ::= id {‘,’ id}
```
A value declaration `val $x$: $T$` introduces $x$ as a name of a value of
-type $T$.
+type $T$.
A value definition `val $x$: $T$ = $e$` defines $x$ as a
-name of the value that results from the evaluation of $e$.
+name of the value that results from the evaluation of $e$.
If the value definition is not recursive, the type
$T$ may be omitted, in which case the [packed type](06-expressions.html#expression-typing) of
-expression $e$ is assumed. If a type $T$ is given, then $e$ is expected to
+expression $e$ is assumed. If a type $T$ is given, then $e$ is expected to
conform to it.
Evaluation of the value definition implies evaluation of its
@@ -152,7 +147,7 @@ $\ldots$
val $x_n$ = $\$ x$._n .
```
-Here, $\$ x$ is a fresh name.
+Here, $\$ x$ is a fresh name.
2. If $p$ has a unique bound variable $x$:
@@ -187,17 +182,15 @@ val x = x$\$$._1
val xs = x$\$$._2
```
-
The name of any declared or defined value may not end in `_=`.
-A value declaration `val $x_1 , \ldots , x_n$: $T$` is a shorthand for the
+A value declaration `val $x_1 , \ldots , x_n$: $T$` is a shorthand for the
sequence of value declarations `val $x_1$: $T$; ...; val $x_n$: $T$`.
-A value definition `val $p_1 , \ldots , p_n$ = $e$` is a shorthand for the
+A value definition `val $p_1 , \ldots , p_n$ = $e$` is a shorthand for the
sequence of value definitions `val $p_1$ = $e$; ...; val $p_n$ = $e$`.
-A value definition `val $p_1 , \ldots , p_n: T$ = $e$` is a shorthand for the
+A value definition `val $p_1 , \ldots , p_n: T$ = $e$` is a shorthand for the
sequence of value definitions `val $p_1: T$ = $e$; ...; val $p_n: T$ = $e$`.
-
## Variable Declarations and Definitions
```ebnf
@@ -212,7 +205,7 @@ A variable declaration `var $x$: $T$` is equivalent to the declarations
of both a _getter function_ $x$ *and* a _setter function_ `$x$_=`:
```scala
-def $x$: $T$
+def $x$: $T$
def $x$_= ($y$: $T$): Unit
```
@@ -222,13 +215,13 @@ using a variable definition, or by defining the corresponding setter and getter
A variable definition `var $x$: $T$ = $e$` introduces a
mutable variable with type $T$ and initial value as given by the
expression $e$. The type $T$ can be omitted, in which case the type of
-$e$ is assumed. If $T$ is given, then $e$ is expected to
+$e$ is assumed. If $T$ is given, then $e$ is expected to
[conform to it](06-expressions.html#expression-typing).
Variable definitions can alternatively have a [pattern](08-pattern-matching.html#patterns)
as left-hand side. A variable definition
`var $p$ = $e$` where $p$ is a pattern other
-than a simple name or a name followed by a colon and a type is expanded in the same way
+than a simple name or a name followed by a colon and a type is expanded in the same way
as a [value definition](#value-declarations-and-definitions)
`val $p$ = $e$`, except that
the free names in $p$ are introduced as mutable variables, not values.
@@ -249,7 +242,6 @@ The default value depends on the type $T$ as follows:
|`()` | `Unit` |
|`null` | all other types |
-
When they occur as members of a template, both forms of variable
definition also introduce a getter function $x$ which returns the
value currently assigned to the variable, as well as a setter function
@@ -291,13 +283,12 @@ d.hours = 8; d.minutes = 30; d.seconds = 0
d.hours = 25 // throws a DateError exception
```
-
-A variable declaration `var $x_1 , \ldots , x_n$: $T$` is a shorthand for the
+A variable declaration `var $x_1 , \ldots , x_n$: $T$` is a shorthand for the
sequence of variable declarations `var $x_1$: $T$; ...; var $x_n$: $T$`.
-A variable definition `var $x_1 , \ldots , x_n$ = $e$` is a shorthand for the
+A variable definition `var $x_1 , \ldots , x_n$ = $e$` is a shorthand for the
sequence of variable definitions `var $x_1$ = $e$; ...; var $x_n$ = $e$`.
-A variable definition `var $x_1 , \ldots , x_n: T$ = $e$` is a shorthand for
-the sequence of variable definitions
+A variable definition `var $x_1 , \ldots , x_n: T$ = $e$` is a shorthand for
+the sequence of variable definitions
`var $x_1: T$ = $e$; ...; var $x_n: T$ = $e$`.
## Type Declarations and Type Aliases
@@ -339,14 +330,14 @@ A _type alias_ `type $t$ = $T$` defines $t$ to be an alias
name for the type $T$. The left hand side of a type alias may
have a type parameter clause, e.g. `type $t$[$\mathit{tps}\,$] = $T$`. The scope
of a type parameter extends over the right hand side $T$ and the
-type parameter clause $\mathit{tps}$ itself.
+type parameter clause $\mathit{tps}$ itself.
-The scope rules for [definitions](#basic-declarations-and-definitions)
+The scope rules for [definitions](#basic-declarations-and-definitions)
and [type parameters](#function-declarations-and-definitions)
make it possible that a type name appears in its
own bound or in its right-hand side. However, it is a static error if
-a type alias refers recursively to the defined type constructor itself.
-That is, the type $T$ in a type alias `type $t$[$\mathit{tps}\,$] = $T$` may not
+a type alias refers recursively to the defined type constructor itself.
+That is, the type $T$ in a type alias `type $t$[$\mathit{tps}\,$] = $T$` may not
refer directly or indirectly to the name $t$. It is also an error if
an abstract type is directly or indirectly its own upper or lower bound.
@@ -400,7 +391,6 @@ As a consequence, for any two types $S$ and $T$, the type
val x: Pair[Int, String] = new Pair(1, "abc")
```
-
## Type Parameters
```ebnf
@@ -413,7 +403,7 @@ Type parameters appear in type definitions, class definitions, and
function definitions. In this section we consider only type parameter
definitions with lower bounds `>: $L$` and upper bounds
`<: $U$` whereas a discussion of context bounds
-`: $U$` and view bounds `<% $U$`
+`: $U$` and view bounds `<% $U$`
is deferred to [here](07-implicit-parameters-and-views.html#context-bounds-and-view-bounds).
The most general form of a first-order type parameter is
@@ -436,9 +426,9 @@ TODO: this is a pretty awkward description of scoping and distinctness of binder
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$`.
+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$`.
-The above scoping restrictions are generalized to the case of nested type parameter clauses, which declare higher-order type parameters. Higher-order type parameters (the type parameters of a type parameter $t$) are only visible in their immediately surrounding parameter clause (possibly including clauses at a deeper nesting level) and in the bounds of $t$. Therefore, their names must only be pairwise different from the names of other visible parameters. Since the names of higher-order type parameters are thus often irrelevant, they may be denoted with a ‘_’, which is nowhere visible.
+The above scoping restrictions are generalized to the case of nested type parameter clauses, which declare higher-order type parameters. Higher-order type parameters (the type parameters of a type parameter $t$) are only visible in their immediately surrounding parameter clause (possibly including clauses at a deeper nesting level) and in the bounds of $t$. Therefore, their names must only be pairwise different from the names of other visible parameters. Since the names of higher-order type parameters are thus often irrelevant, they may be denoted with a `‘_’`, which is nowhere visible.
###### Example
Here are some well-formed type parameter clauses:
@@ -464,7 +454,6 @@ The following type parameter clauses are illegal:
// not conform to upper bound `B'.
```
-
## Variance Annotations
Variance annotations indicate how instances of parameterized types
@@ -475,17 +464,17 @@ missing variance indication indicates an invariant dependency.
A variance annotation constrains the way the annotated type variable
may appear in the type or class which binds the type parameter. In a
-type definition `type $T$[$\mathit{tps}\,$] = $S$`, or a type
+type definition `type $T$[$\mathit{tps}\,$] = $S$`, or a type
declaration `type $T$[$\mathit{tps}\,$] >: $L$ <: $U$` type parameters labeled
‘+’ must only appear in covariant position whereas
type parameters labeled ‘-’ must only appear in contravariant
position. Analogously, for a class definition
-`class $C$[$\mathit{tps}\,$]($\mathit{ps}\,$) extends $T$ { $x$: $S$ => ...}`,
+`class $C$[$\mathit{tps}\,$]($\mathit{ps}\,$) extends $T$ { $x$: $S$ => ...}`,
type parameters labeled
‘+’ must only appear in covariant position in the
self type $S$ and the template $T$, whereas type
parameters labeled ‘-’ must only appear in contravariant
-position.
+position.
The variance position of a type parameter in a type or template is
defined as follows. Let the opposite of covariance be contravariance,
@@ -493,12 +482,12 @@ and the opposite of invariance be itself. The top-level of the type
or template is always in covariant position. The variance position
changes at the following constructs.
-- The variance position of a method parameter is the opposite of the
+- The variance position of a method parameter is the opposite of the
variance position of the enclosing parameter clause.
- The variance position of a type parameter is the opposite of the
variance position of the enclosing type parameter clause.
-- The variance position of the lower bound of a type declaration or type parameter
- is the opposite of the variance position of the type declaration or parameter.
+- The variance position of the lower bound of a type declaration or type parameter
+ is the opposite of the variance position of the type declaration or parameter.
- The type of a mutable variable is always in invariant position.
- The right-hand side of a type alias is always in invariant position.
- The prefix $S$ of a type selection `$S$#$T$` is always in invariant position.
@@ -508,11 +497,11 @@ changes at the following constructs.
contravariant, the variance position of $T$ is the opposite of
the variance position of the enclosing type `$S$[$\ldots T \ldots$ ]`.
-<!-- TODO: handle type aliases -->
+<!-- TODO: handle type aliases -->
-References to the type parameters in
+References to the type parameters in
[object-private or object-protected values, types, variables, or methods](05-classes-and-objects.html#modifiers) of the class are not
-checked for their variance position. In these members the type parameter may
+checked for their variance position. In these members the type parameter may
appear anywhere without restricting its legal variance annotations.
###### Example
@@ -588,22 +577,21 @@ That is, a
channel on which one can write any object can substitute for a channel
on which one can write only strings.
-
## Function Declarations and Definitions
```ebnf
Dcl ::= ‘def’ FunDcl
FunDcl ::= FunSig ‘:’ Type
Def ::= ‘def’ FunDef
-FunDef ::= FunSig [‘:’ Type] ‘=’ Expr
+FunDef ::= FunSig [‘:’ Type] ‘=’ Expr
FunSig ::= id [FunTypeParamClause] ParamClauses
-FunTypeParamClause ::= ‘[’ TypeParam {‘,’ TypeParam} ‘]’
+FunTypeParamClause ::= ‘[’ TypeParam {‘,’ TypeParam} ‘]’
ParamClauses ::= {ParamClause} [[nl] ‘(’ ‘implicit’ Params ‘)’]
-ParamClause ::= [nl] ‘(’ [Params] ‘)’}
+ParamClause ::= [nl] ‘(’ [Params] ‘)’}
Params ::= Param {‘,’ Param}
Param ::= {Annotation} id [‘:’ ParamType] [‘=’ Expr]
-ParamType ::= Type
- | ‘=>’ Type
+ParamType ::= Type
+ | ‘=>’ Type
| Type ‘*’
```
@@ -624,11 +612,11 @@ result type, if one is given. If the function definition is not
recursive, the result type may be omitted, in which case it is
determined from the packed type of the function body.
-A type parameter clause $\mathit{tps}$ consists of one or more
-[type declarations](#type-declarations-and-type-aliases), which introduce type
+A type parameter clause $\mathit{tps}$ consists of one or more
+[type declarations](#type-declarations-and-type-aliases), which introduce type
parameters, possibly with bounds. The scope of a type parameter includes
the whole signature, including any of the type parameter bounds as
-well as the function body, if it is present.
+well as the function body, if it is present.
A value parameter clause $\mathit{ps}$ consists of zero or more formal
parameter bindings such as `$x$: $T$` or `$x: T = e$`, which bind value
@@ -647,7 +635,7 @@ declaration. These methods are parametrized by the type parameter clause
The `$f\$$default$\$$n` methods are inaccessible for
user programs.
-The scope of a formal value parameter name $x$ comprises all subsequent
+The scope of a formal value parameter name $x$ comprises all subsequent
parameter clauses, as well as the method return type and the function body, if
they are given. Both type parameter names and value parameter names must
be pairwise distinct.
@@ -669,10 +657,8 @@ def compare$\$$default$\$$1[T]: Int = 0
def compare$\$$default$\$$2[T](a: T): T = a
```
-
### By-Name Parameters
-
```ebnf
ParamType ::= ‘=>’ Type
```
@@ -687,7 +673,7 @@ function. That is, the argument is evaluated using _call-by-name_.
The by-name modifier is disallowed for parameters of classes that
carry a `val` or `var` prefix, including parameters of case
classes for which a `val` prefix is implicitly generated. The
-by-name modifier is also disallowed for
+by-name modifier is also disallowed for
[implicit parameters](07-implicit-parameters-and-views.html#implicit-parameters).
###### Example
@@ -700,7 +686,6 @@ def whileLoop (cond: => Boolean) (stat: => Unit): Unit
indicates that both parameters of `whileLoop` are evaluated using
call-by-name.
-
### Repeated Parameters
```ebnf
@@ -708,21 +693,21 @@ ParamType ::= Type ‘*’
```
The last value parameter of a parameter section may be suffixed by
-“*”, e.g. `(..., $x$:$T$*)`. The type of such a
+`'*'`, e.g. `(..., $x$:$T$*)`. The type of such a
_repeated_ parameter inside the method is then the sequence type
`scala.Seq[$T$]`. Methods with repeated parameters
`$T$*` take a variable number of arguments of type $T$.
-That is, if a method $m$ with type
-`($p_1:T_1 , \ldots , p_n:T_n, p_s:S$*)$U$` is applied to arguments
-$(e_1 , \ldots , e_k)$ where $k \geq n$, then $m$ is taken in that application
-to have type $(p_1:T_1 , \ldots , p_n:T_n, p_s:S , \ldots , p_{s'}S)U$, with
+That is, if a method $m$ with type
+`($p_1:T_1 , \ldots , p_n:T_n, p_s:S$*)$U$` is applied to arguments
+$(e_1 , \ldots , e_k)$ where $k \geq n$, then $m$ is taken in that application
+to have type $(p_1:T_1 , \ldots , p_n:T_n, p_s:S , \ldots , p_{s'}S)U$, with
$k - n$ occurrences of type
-$S$ where any parameter names beyond $p_s$ are fresh. The only exception to
+$S$ where any parameter names beyond $p_s$ are fresh. The only exception to
this rule is if the last argument is
marked to be a _sequence argument_ via a `_*` type
annotation. If $m$ above is applied to arguments
`($e_1 , \ldots , e_n, e'$: _*)`, then the type of $m$ in
-that application is taken to be
+that application is taken to be
`($p_1:T_1, \ldots , p_n:T_n,p_{s}:$scala.Seq[$S$])`.
It is not allowed to define any default arguments in a parameter section
@@ -768,7 +753,6 @@ the result `6`:
sum(xs: _*)
```
-
### Procedures
```ebnf
@@ -777,7 +761,7 @@ FunDef ::= FunSig [nl] ‘{’ Block ‘}’
```
Special syntax exists for procedures, i.e. functions that return the
-`Unit` value `()`.
+`Unit` value `()`.
A procedure declaration is a function declaration where the result type
is omitted. The result type is then implicitly completed to the
`Unit` type. E.g., `def $f$($\mathit{ps}$)` is equivalent to
@@ -811,7 +795,6 @@ object Terminal extends Writer {
}
```
-
### Method Return Type Inference
A class member definition $m$ that overrides some other function $m'$
@@ -838,8 +821,6 @@ class C extends I {
Here, it is OK to leave out the result type of `factorial`
in `C`, even though the method is recursive.
-
-
<!-- ## Overloaded Definitions
\label{sec:overloaded-defs}
\todo{change}
@@ -862,12 +843,12 @@ $T_j$ have the same erasure (\sref{sec:erasure}).
```ebnf
Import ::= ‘import’ ImportExpr {‘,’ ImportExpr}
ImportExpr ::= StableId ‘.’ (id | ‘_’ | ImportSelectors)
-ImportSelectors ::= ‘{’ {ImportSelector ‘,’}
+ImportSelectors ::= ‘{’ {ImportSelector ‘,’}
(ImportSelector | ‘_’) ‘}’
ImportSelector ::= id [‘=>’ id | ‘=>’ ‘_’]
```
-An import clause has the form `import $p$.$I$` where $p$ is a
+An import clause has the form `import $p$.$I$` where $p$ is a
[stable identifier](03-types.html#paths) and $I$ is an import expression.
The import expression determines a set of names of importable members of $p$
which are made available without qualification. A member $m$ of $p$ is
@@ -875,10 +856,10 @@ _importable_ if it is not [object-private](05-classes-and-objects.html#modifiers
The most general form of an import expression is a list of _import selectors_
```scala
-{ $x_1$ => $y_1 , \ldots , x_n$ => $y_n$, _ }
+{ $x_1$ => $y_1 , \ldots , x_n$ => $y_n$, _ }
```
-for $n \geq 0$, where the final wildcard ‘_’ may be absent. It
+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
`$p$.$x_i$` to
@@ -913,13 +894,13 @@ identifier or wildcard. The import clause `import $p$.$x$` is
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$.{_}`,
+`import $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
`import $p_1$.$I_1 , \ldots , p_n$.$I_n$` is interpreted as a
-sequence of import clauses
+sequence of import clauses
`import $p_1$.$I_1$; $\ldots$; import $p_n$.$I_n$`.
###### Example
diff --git a/spec/05-classes-and-objects.md b/spec/05-classes-and-objects.md
index 70fa3e0272..ef854b2abb 100644
--- a/spec/05-classes-and-objects.md
+++ b/spec/05-classes-and-objects.md
@@ -15,7 +15,6 @@ TmplDef ::= [`case'] `class' ClassDef
[Classes](#class-definitions) and [objects](#object-definitions)
are both defined in terms of _templates_.
-
## Templates
```ebnf
@@ -31,8 +30,8 @@ SelfType ::= id [`:' Type] `=>'
A template defines the type signature, behavior and initial state of a
trait or class of objects or of a single object. Templates form part of
instance creation expressions, class definitions, and object
-definitions. A template
-`$sc$ with $mt_1$ with $\ldots$ with $mt_n$ { $\mathit{stats}$ }`
+definitions. A template
+`$sc$ with $mt_1$ with $\ldots$ with $mt_n$ { $\mathit{stats}$ }`
consists of a constructor invocation $sc$
which defines the template's _superclass_, trait references
`$mt_1 , \ldots , mt_n$` $(n \geq 0)$, which define the
@@ -61,7 +60,7 @@ superclass.
The _least proper supertype_ of a template is the class type or
[compound type](03-types.html#compound-types) consisting of all its parent
-class types.
+class types.
The statement sequence $\mathit{stats}$ contains member definitions that
define new members or overwrite members in the parent classes. If the
@@ -77,7 +76,7 @@ The sequence of template statements may be prefixed with a formal
parameter definition and an arrow, e.g. `$x$ =>`, or
`$x$:$T$ =>`. If a formal parameter is given, it can be
used as an alias for the reference `this` throughout the
-body of the template.
+body of the template.
If the formal parameter comes with a type $T$, this definition affects
the _self type_ $S$ of the underlying class or object as follows: Let $C$ be the type
of the class or trait or object defining the template.
@@ -87,11 +86,11 @@ If no type $T$ is given, $S$ is just $C$.
Inside the template, the type of `this` is assumed to be $S$.
The self type of a class or object must conform to the self types of
-all classes which are inherited by the template $t$.
+all classes which are inherited by the template $t$.
-A second form of self type annotation reads just
+A second form of self type annotation reads just
`this: $S$ =>`. It prescribes the type $S$ for `this`
-without introducing an alias name for it.
+without introducing an alias name for it.
###### Example
Consider the following class definitions:
@@ -108,21 +107,20 @@ In this case, the definition of `O` is expanded to:
object O extends Base with Mixin {}
```
-
<!-- TODO: Make all references to Java generic -->
**Inheriting from Java Types** A template may have a Java class as its superclass and Java interfaces as its
-mixins.
+mixins.
**Template Evaluation** Consider a template `$sc$ with $mt_1$ with $mt_n$ { $\mathit{stats}$ }`.
-If this is the template of a [trait](#traits) then its _mixin-evaluation_
+If this is the template of a [trait](#traits) then its _mixin-evaluation_
consists of an evaluation of the statement sequence $\mathit{stats}$.
If this is not a template of a trait, then its _evaluation_
consists of the following steps.
-- First, the superclass constructor $sc$ is
+- First, the superclass constructor $sc$ is
[evaluated](#constructor-invocations).
- Then, all base classes in the template's [linearization](#class-linearization)
up to the template's superclass denoted by $sc$ are
@@ -130,9 +128,8 @@ consists of the following steps.
occurrence in the linearization.
- Finally the statement sequence $\mathit{stats}\,$ is evaluated.
-
###### Delayed Initializaton
-The initialization code of an object or class (but not a trait) that follows
+The initialization code of an object or class (but not a trait) that follows
the superclass
constructor invocation and the mixin-evaluation of the template's base
classes is passed to a special hook, which is inaccessible from user
@@ -145,7 +142,6 @@ method, which is defined as follows:
def delayedInit(body: => Unit)
```
-
### Constructor Invocations
```ebnf
@@ -156,7 +152,7 @@ Constructor invocations define the type, members, and initial state of
objects created by an instance creation expression, or of parts of an
object's definition which are inherited by a class or object
definition. A constructor invocation is a function application
-`$x$.$c$[$\mathit{targs}$]($\mathit{args}_1$)$\ldots$($\mathit{args}_n$)`, where $x$ is a
+`$x$.$c$[$\mathit{targs}$]($\mathit{args}_1$)$\ldots$($\mathit{args}_n$)`, where $x$ is a
[stable identifier](03-types.html#paths), $c$ is a type name which either designates a
class or defines an alias type for one, $\mathit{targs}$ is a type argument
list, $\mathit{args}_1 , \ldots , \mathit{args}_n$ are argument lists, and there is a
@@ -171,12 +167,12 @@ it can be omitted, in which case a type argument list is synthesized
using [local type inference](06-expressions.html#local-type-inference). If no explicit
arguments are given, an empty list `()` is implicitly supplied.
-An evaluation of a constructor invocation
+An evaluation of a constructor invocation
`$x$.$c$[$\mathit{targs}$]($\mathit{args}_1$)$\ldots$($\mathit{args}_n$)`
consists of the following steps:
- First, the prefix $x$ is evaluated.
-- Then, the arguments $\mathit{args}_1 , \ldots , \mathit{args}_n$ are evaluated from
+- Then, the arguments $\mathit{args}_1 , \ldots , \mathit{args}_n$ are evaluated from
left to right.
- Finally, the class being constructed is initialized by evaluating the
template of the class referred to by $c$.
@@ -188,7 +184,6 @@ inheritance relation from a class $C$ are called the _base classes_ of $C$. Bec
on base classes forms in general a directed acyclic graph. A
linearization of this graph is defined as follows.
-
###### Definition: linearization
Let $C$ be a class with template
`$C_1$ with ... with $C_n$ { $\mathit{stats}$ }`.
@@ -206,7 +201,6 @@ $$
\end{array}
$$
-
###### Example
Consider the following class definitions.
@@ -226,7 +220,7 @@ Then the linearization of class `Iter` is
Note that the linearization of a class refines the inheritance
relation: if $C$ is a subclass of $D$, then $C$ precedes $D$ in any
linearization where both $C$ and $D$ occur.
-[Linearization](#definition-linearization) also satisfies the property that
+[Linearization](#definition:-linearization) also satisfies the property that
a linearization of a class always contains the linearization of its direct superclass as a suffix.
For instance, the linearization of `StringIterator` is
@@ -245,7 +239,6 @@ For instance, the linearization of `RichIterator` is
which is not a suffix of the linearization of `Iter`.
-
### Class Members
A class $C$ defined by a template `$C_1$ with $\ldots$ with $C_n$ { $\mathit{stats}$ }`
@@ -294,8 +287,8 @@ $C_j \in \mathcal{L}(C)$ where $j < i$ which directly defines an abstract
member $M'$ matching $M$.
This definition also determines the [overriding](#overriding) relationships
-between matching members of a class $C$ and its parents.
-First, a concrete definition always overrides an abstract definition.
+between matching members of a class $C$ and its parents.
+First, a concrete definition always overrides an abstract definition.
Second, for definitions $M$ and $M$' which are both concrete or both abstract,
$M$ overrides $M'$ if $M$ appears in a class that precedes (in the
linearization of $C$) the class in which $M'$ is defined.
@@ -306,7 +299,6 @@ or inherited) with the same name and the same [erased type](03-types.html#type-e
Finally, a template is not allowed to contain two methods (directly
defined or inherited) with the same name which both define default arguments.
-
###### Example
Consider the trait definitions:
@@ -321,12 +313,11 @@ Then trait `D` has a directly defined abstract member `h`. It
inherits member `f` from trait `C` and member `g` from
trait `B`.
-
### Overriding
<!-- TODO: Explain that classes cannot override each other -->
-A member $M$ of class $C$ that [matches](#class-members)
+A member $M$ of class $C$ that [matches](#class-members)
a non-private member $M'$ of a
base class of $C$ is said to _override_ that member. In this case
the binding of the overriding member $M$ must [subsume](03-types.html#conformance)
@@ -339,14 +330,15 @@ $M'$:
- If $M$ is labeled `private[$C$]` for some enclosing class or package $C$,
then $M'$ must be labeled `private[$C'$]` for some class or package $C'$ where
$C'$ equals $C$ or $C'$ is contained in $C$.
- <!-- TODO: check whether this is accurate -->
+
+<!-- TODO: check whether this is accurate -->
- If $M$ is labeled `protected`, then $M'$ must also be
labeled `protected`.
- If $M'$ is not an abstract member, then $M$ must be labeled `override`.
Furthermore, one of two possibilities must hold:
- - either $M$ is defined in a subclass of the class where is $M'$ is defined,
+ - either $M$ is defined in a subclass of the class where is $M'$ is defined,
- or both $M$ and $M'$ override a third member $M''$ which is defined
- in a base class of both the classes containing $M$ and $M'$
+ in a base class of both the classes containing $M$ and $M'$
- If $M'$ is [incomplete](#modifiers) in $C$ then $M$ must be
labeled `abstract override`.
- If $M$ and $M'$ are both concrete value definitions, then either none
@@ -398,7 +390,6 @@ definition of type `T` in class `C`:
class C extends A with B { type T <: C }
```
-
### Inheritance Closure
Let $C$ be a class type. The _inheritance closure_ of $C$ is the
@@ -434,9 +425,9 @@ constructor is called. In a template
```
The initial pattern definitions of $p_1 , \ldots , p_n$ are called
-_early definitions_. They define fields
+_early definitions_. They define fields
which form part of the template. Every early definition must define
-at least one variable.
+at least one variable.
An early definition is type-checked and evaluated in the scope which
is in effect just before the template being defined, augmented by any
@@ -452,7 +443,6 @@ always refer to the value that's defined there, and do not take into account
overriding definitions. In other words, a block of early definitions
is evaluated exactly as if it was a local bock containing a number of value
definitions.
-
Early definitions are evaluated in the order they are being defined
before the superclass constructor of the template is called.
@@ -482,11 +472,10 @@ body, it would be initialized after the constructor of
`Greeting`. In that case, `msg` would be initialized to
`"How are you, <null>"`.
-
## Modifiers
```ebnf
-Modifier ::= LocalModifier
+Modifier ::= LocalModifier
| AccessModifier
| `override'
LocalModifier ::= `abstract'
@@ -629,7 +618,6 @@ initialization might lead to looping behavior. If an exception is
thrown during initialization, the value is considered uninitialized,
and a later access will retry to evaluate its right hand side.
-
###### Example
The following code illustrates the use of qualified private:
@@ -652,7 +640,6 @@ package-private methods in Java. Finally, accesses to method
`h` can appear anywhere within package `outerpkg`,
including packages contained in it.
-
###### Example
A useful idiom to prevent clients of a class from
constructing new instances of that class is to declare the class
@@ -680,14 +667,13 @@ new m.C(0) {} // **** error: illegal inheritance from sealed class.
A similar access restriction can be achieved by marking the primary
constructor `private` ([example](#example-private-constructor)).
-
## Class Definitions
```ebnf
-TmplDef ::= `class' ClassDef
-ClassDef ::= id [TypeParamClause] {Annotation}
- [AccessModifier] ClassParamClauses ClassTemplateOpt
-ClassParamClauses ::= {ClassParamClause}
+TmplDef ::= `class' ClassDef
+ClassDef ::= id [TypeParamClause] {Annotation}
+ [AccessModifier] ClassParamClauses ClassTemplateOpt
+ClassParamClauses ::= {ClassParamClause}
[[nl] `(' implicit ClassParams `)']
ClassParamClause ::= [nl] `(' [ClassParams] ')'
ClassParams ::= ClassParam {`,' ClassParam}
@@ -696,10 +682,10 @@ ClassParam ::= {Annotation} {Modifier} [(`val' | `var')]
ClassTemplateOpt ::= `extends' ClassTemplate | [[`extends'] TemplateBody]
```
-The most general form of class definition is
+The most general form of class definition is
```scala
-class $c$[$\mathit{tps}\,$] $as$ $m$($\mathit{ps}_1$)$\ldots$($\mathit{ps}_n$) extends $t$ $\gap(n \geq 0)$.
+class $c$[$\mathit{tps}\,$] $as$ $m$($\mathit{ps}_1$)$\ldots$($\mathit{ps}_n$) extends $t$ $\quad(n \geq 0)$.
```
Here,
@@ -712,16 +698,16 @@ Here,
parameter section `[$\mathit{tps}\,$]` may be omitted. A class with a type
parameter section is called _polymorphic_, otherwise it is called
_monomorphic_.
- - $as$ is a possibly empty sequence of
+ - $as$ is a possibly empty sequence of
[annotations](11-user-defined-annotations.html#user-defined-annotations).
- If any annotations are given, they apply to the primary constructor of the
+ If any annotations are given, they apply to the primary constructor of the
class.
- $m$ is an [access modifier](#modifiers) such as
`private` or `protected`, possibly with a qualification.
If such an access modifier is given it applies to the primary constructor of the class.
- - $(\mathit{ps}_1)\ldots(\mathit{ps}_n)$ are formal value parameter clauses for
+ - $(\mathit{ps}\_1)\ldots(\mathit{ps}\_n)$ are formal value parameter clauses for
the _primary constructor_ of the class. The scope of a formal value parameter includes
- all subsequent parameter sections and the template $t$. However, a formal
+ all subsequent parameter sections and the template $t$. However, a formal
value parameter may not form part of the types of any of the parent classes or members of the class template $t$.
It is illegal to define two formal value parameters with the same name.
@@ -741,19 +727,18 @@ Here,
- $t$ is a [template](#templates) of the form
- ```
+ ```
$sc$ with $mt_1$ with $\ldots$ with $mt_m$ { $\mathit{stats}$ } // $m \geq 0$
```
which defines the base classes, behavior and initial state of objects of
- the class. The extends clause
- `extends $sc$ with $mt_1$ with $\ldots$ with $mt_m$`
+ the class. The extends clause
+ `extends $sc$ with $mt_1$ with $\ldots$ with $mt_m$`
can be omitted, in which case
`extends scala.AnyRef` is assumed. The class body
`{ $\mathit{stats}$ }` may also be omitted, in which case the empty body
`{}` is assumed.
-
This class definition defines a type `$c$[$\mathit{tps}\,$]` and a constructor
which when applied to parameters conforming to types $\mathit{ps}$
initializes instances of type `$c$[$\mathit{tps}\,$]` by evaluating the template
@@ -768,6 +753,7 @@ val c = new C(1, "abc", List())
c.z = c.y :: c.z
```
+### Example Private Constructor
The following class can be created only from its companion module.
```scala
@@ -781,11 +767,10 @@ class Sensitive private () {
}
```
-
### Constructor Definitions
```ebnf
-FunDef ::= `this' ParamClause ParamClauses
+FunDef ::= `this' ParamClause ParamClauses
(`=' ConstrExpr | [nl] ConstrBlock)
ConstrExpr ::= SelfInvocation
| ConstrBlock
@@ -813,16 +798,16 @@ to instantiate formal type parameters.
The signature and the self constructor invocation of a constructor
definition are type-checked and evaluated in the scope which is in
effect at the point of the enclosing class definition, augmented by
-any type parameters of the enclosing class and by any
+any type parameters of the enclosing class and by any
[early definitions](#early-definitions) of the enclosing template.
The rest of the
constructor expression is type-checked and evaluated as a function
body in the current class.
-
+
If there are auxiliary constructors of a class $C$, they form together
with $C$'s primary [constructor](#class-definitions)
an overloaded constructor
-definition. The usual rules for
+definition. The usual rules for
[overloading resolution](06-expressions.html#overloading-resolution)
apply for constructor invocations of $C$,
including for the self constructor invocations in the constructor
@@ -831,8 +816,7 @@ are never inherited. To prevent infinite cycles of constructor
invocations, there is the restriction that every self constructor
invocation must refer to a constructor definition which precedes it
(i.e. it must refer to either a preceding auxiliary constructor or the
-primary constructor of the class).
-
+primary constructor of the class).
###### Example
Consider the class definition
@@ -851,7 +835,6 @@ This defines a class `LinkedList` with three constructors. The
second constructor constructs an singleton list, while the
third one constructs a list with a given head and tail.
-
## Case Classes
```ebnf
@@ -859,7 +842,7 @@ TmplDef ::= `case' `class' ClassDef
```
If a class definition is prefixed with `case`, the class is said
-to be a _case class_.
+to be a _case class_.
The formal parameters in the first parameter section of a case class
are called _elements_; they are treated
@@ -885,10 +868,10 @@ object $c$ {
Here, $\mathit{Ts}$ stands for the vector of types defined in the type
parameter section $\mathit{tps}$,
-each $\mathit{xs}_i$ denotes the parameter names of the parameter
-section $\mathit{ps}_i$, and
-$\mathit{xs}_{11}, \ldots , \mathit{xs}_{1k}$ denote the names of all parameters
-in the first parameter section $\mathit{xs}_1$.
+each $\mathit{xs}\_i$ denotes the parameter names of the parameter
+section $\mathit{ps}\_i$, and
+$\mathit{xs}\_{11}, \ldots , \mathit{xs}\_{1k}$ denote the names of all parameters
+in the first parameter section $\mathit{xs}\_1$.
If a type parameter section is missing in the
class, it is also missing in the `apply` and
`unapply` methods.
@@ -904,7 +887,7 @@ def unapply[$\mathit{tps}\,$]($x$: $c$[$\mathit{tps}\,$]) = x ne null
```
The name of the `unapply` method is changed to `unapplySeq` if the first
-parameter section $\mathit{ps}_1$ of $c$ ends in a
+parameter section $\mathit{ps}_1$ of $c$ ends in a
[repeated parameter](04-basic-declarations-and-definitions.html#repeated-parameters).
If a companion object $c$ exists already, no new object is created,
but the `apply` and `unapply` methods are added to the existing
@@ -919,9 +902,9 @@ def copy[$\mathit{tps}\,$]($\mathit{ps}'_1\,$)$\ldots$($\mathit{ps}'_n$): $c$[$\
```
Again, `$\mathit{Ts}$` stands for the vector of types defined in the type parameter section `$\mathit{tps}$`
-and each `$\xs_i$` denotes the parameter names of the parameter section `$\ps'_i$`. The value
-parameters `$\ps'_{1,j}$` of first parameter list have the form `$x_{1,j}$:$T_{1,j}$=this.$x_{1,j}$`,
-the other parameters `$\ps'_{i,j}$` of the `copy` method are defined as `$x_{i,j}$:$T_{i,j}$`.
+and each `$xs_i$` denotes the parameter names of the parameter section `$ps'_i$`. The value
+parameters `$ps'_{1,j}$` of first parameter list have the form `$x_{1,j}$:$T_{1,j}$=this.$x_{1,j}$`,
+the other parameters `$ps'_{i,j}$` of the `copy` method are defined as `$x_{i,j}$:$T_{i,j}$`.
In all cases `$x_{i,j}$` and `$T_{i,j}$` refer to the name and type of the corresponding class parameter
`$\mathit{ps}_{i,j}$`.
@@ -941,7 +924,6 @@ class different from `AnyRef`. In particular:
- Method `toString: String` returns a string representation which
contains the name of the class and its elements.
-
###### Example
Here is the definition of abstract syntax for lambda calculus:
@@ -984,7 +966,6 @@ This form of extensibility can be excluded by declaring the base class
directly extend `Expr` must be in the same source file as
`Expr`.
-
### Traits
```ebnf
@@ -1089,17 +1070,16 @@ methods are re-bound to refer to the corresponding implementations in
`ListTable`, which is the actual supertype of `SynchronizedTable`
in `MyTable`.
-
## Object Definitions
```ebnf
ObjectDef ::= id ClassTemplate
```
-An object definition defines a single object of a new class. Its
+An object definition defines a single object of a new class. Its
most general form is
`object $m$ extends $t$`. Here,
-$m$ is the name of the object to be defined, and
+$m$ is the name of the object to be defined, and
$t$ is a [template](#templates) of the form
```scala
@@ -1107,7 +1087,7 @@ $sc$ with $mt_1$ with $\ldots$ with $mt_n$ { $\mathit{stats}$ }
```
which defines the base classes, behavior and initial state of $m$.
-The extends clause `extends $sc$ with $mt_1$ with $\ldots$ with $mt_n$`
+The extends clause `extends $sc$ with $mt_1$ with $\ldots$ with $mt_n$`
can be omitted, in which case
`extends scala.AnyRef` is assumed. The class body
`{ $\mathit{stats}$ }` may also be omitted, in which case the empty body
@@ -1127,7 +1107,7 @@ not at the point of the object definition, but is instead evaluated
the first time $m$ is dereferenced during execution of the program
(which might be never at all). An attempt to dereference $m$ again in
the course of evaluation of the constructor leads to a infinite loop
-or run-time error.
+or run-time error.
Other threads trying to dereference $m$ while the
constructor is being evaluated block until evaluation is complete.
diff --git a/spec/06-expressions.md b/spec/06-expressions.md
index b2144aac6d..03b8065f4b 100644
--- a/spec/06-expressions.md
+++ b/spec/06-expressions.md
@@ -48,7 +48,7 @@ Ascription ::= `:' InfixType
```
Expressions are composed of operators and operands. Expression forms are
-discussed subsequently in decreasing order of precedence.
+discussed subsequently in decreasing order of precedence.
## Expression Typing
@@ -62,15 +62,14 @@ $T$, then the type of the expression is assumed instead to be a
[skolemization](03-types.html#existential-types) of $T$.
Skolemization is reversed by type packing. Assume an expression $e$ of
-type $T$ and let $t_1[\mathit{tps}_1] >: L_1 <: U_1 , \ldots , t_n[\mathit{tps}_n] >: L_n <: U_n$ be
+type $T$ and let $t_1[\mathit{tps}\_1] >: L_1 <: U_1 , \ldots , t_n[\mathit{tps}\_n] >: L_n <: U_n$ be
all the type variables created by skolemization of some part of $e$ which are free in $T$.
Then the _packed type_ of $e$ is
```scala
-$T$ forSome { type $t_1[\mathit{tps}_1] >: L_1 <: U_1$; $\ldots$; type $t_n[\mathit{tps}_n] >: L_n <: U_n$ }.
+$T$ forSome { type $t_1[\mathit{tps}\_1] >: L_1 <: U_1$; $\ldots$; type $t_n[\mathit{tps}\_n] >: L_n <: U_n$ }.
```
-
## Literals
```ebnf
@@ -80,7 +79,6 @@ SimpleExpr ::= Literal
Typing of literals is as described [here](01-lexical-syntax.html#literals); their
evaluation is immediate.
-
## The _Null_ Value
The `null` value is of type `scala.Null`, and is thus
@@ -90,15 +88,14 @@ implements methods in class `scala.AnyRef` as follows:
- `eq($x\,$)` and `==($x\,$)` return `true` iff the
argument $x$ is also the "null" object.
-- `ne($x\,$)` and `!=($x\,$)` return true iff the
+- `ne($x\,$)` and `!=($x\,$)` return true iff the
argument x is not also the "null" object.
- `isInstanceOf[$T\,$]` always returns `false`.
- `asInstanceOf[$T\,$]` returns the [default value](04-basic-declarations-and-definitions.html#value-declarations-and-definitions) of type $T$.
- `##` returns ``0``.
A reference to any other member of the "null" object causes a
-`NullPointerException` to be thrown.
-
+`NullPointerException` to be thrown.
## Designators
@@ -108,19 +105,19 @@ SimpleExpr ::= Path
```
A designator refers to a named term. It can be a _simple name_ or
-a _selection_.
+a _selection_.
-A simple name $x$ refers to a value as specified
-[here](02-identifiers-names-and-scopes.html#identifiers-names-and-scopes).
+A simple name $x$ refers to a value as specified
+[here](02-identifiers-names-and-scopes.html#identifiers,-names-and-scopes).
If $x$ is bound by a definition or declaration in an enclosing class
or object $C$, it is taken to be equivalent to the selection
`$C$.this.$x$` where $C$ is taken to refer to the class containing $x$
-even if the type name $C$ is [shadowed](02-identifiers-names-and-scopes.html#identifiers-names-and-scopes) at the
+even if the type name $C$ is [shadowed](02-identifiers-names-and-scopes.html#identifiers,-names-and-scopes) at the
occurrence of $x$.
If $r$ is a [stable identifier](03-types.html#paths) of type $T$, the selection $r.x$ refers
statically to a term member $m$ of $r$ that is identified in $T$ by
-the name $x$.
+the name $x$.
<!-- There might be several such members, in which
case overloading resolution (\sref{overloading-resolution}) is applied
@@ -128,7 +125,7 @@ to pick a unique one.} -->
For other expressions $e$, $e.x$ is typed as
if it was `{ val $y$ = $e$; $y$.$x$ }`, for some fresh name
-$y$.
+$y$.
The expected type of a designator's prefix is always undefined. The
type of a designator is the type $T$ of the entity it refers to, with
@@ -147,16 +144,14 @@ designate a constant, or
conform to $\mathit{pt}$, or
1. The path $p$ designates a module.
-
The selection $e.x$ is evaluated by first evaluating the qualifier
expression $e$, which yields an object $r$, say. The selection's
result is then the member of $r$ that is either defined by $m$ or defined
-by a definition overriding $m$.
+by a definition overriding $m$.
If that member has a type which
conforms to `scala.NotNull`, the member's value must be initialized
to a value different from `null`, otherwise a `scala.UnitializedError`
is thrown.
-
## This and Super
@@ -190,7 +185,7 @@ method. <!-- explanation: so that we need not create several fields for overrid
If it is
a method, it must be concrete, or the template
containing the reference must have a member $m'$ which overrides $m$
-and which is labeled `abstract override`.
+and which is labeled `abstract override`.
A reference `$C$.super.$m$` refers statically to a method
or type $m$ in the least proper supertype of the innermost enclosing class or
@@ -238,7 +233,6 @@ Then we have:
Note that the `superB` function returns different results
depending on whether `B` is mixed in with class `Root` or `A`.
-
## Function Applications
```ebnf
@@ -269,20 +263,19 @@ it has the form $x_i=e'_i$ and $x_i$ is one of the parameter names
$p_1 , \ldots , p_n$. The function $f$ is applicable if all of the following conditions
hold:
-- For every named argument $x_i=e'_i$ the type $S_i$
+- For every named argument $x_i=e_i'$ the type $S_i$
is compatible with the parameter type $T_j$ whose name $p_j$ matches $x_i$.
- For every positional argument $e_i$ the type $S_i$
is compatible with $T_i$.
- If the expected type is defined, the result type $U$ is
compatible to it.
-If $f$ is a polymorphic method it is applicable if
+If $f$ is a polymorphic method it is applicable if
[local type inference](#local-type-inference) can
determine type arguments so that the instantiated method is applicable. If
$f$ has some value type it is applicable if it has a method member named
`apply` which is applicable.
-
Evaluation of `$f$($e_1 , \ldots , e_n$)` usually entails evaluation of
$f$ and $e_1 , \ldots , e_n$ in that order. Each argument expression
is converted to the type of its corresponding formal parameter. After
@@ -295,7 +288,7 @@ The case of a formal parameter with a parameterless
method type `=>$T$` is treated specially. In this case, the
corresponding actual argument expression $e$ is not evaluated before the
application. Instead, every use of the formal parameter on the
-right-hand side of the rewrite rule entails a re-evaluation of $e$.
+right-hand side of the rewrite rule entails a re-evaluation of $e$.
In other words, the evaluation order for
`=>`-parameters is _call-by-name_ whereas the evaluation
order for normal parameters is _call-by-value_.
@@ -345,7 +338,6 @@ sum(List(1, 2, 3, 4))
would not typecheck.
-
### Named and Default Arguments
If an application might uses named arguments $p = e$ or default
@@ -360,10 +352,9 @@ arguments, the following conditions must hold.
- Every formal parameter $p_j:T_j$ which is not specified by either a positional
or a named argument has a default argument.
-
If the application uses named or default
arguments the following transformation is applied to convert it into
-an application without named or default arguments.
+an application without named or default arguments.
If the function $f$
has the form `$p.m$[$\mathit{targs}$]` it is transformed into the
@@ -388,14 +379,14 @@ the form
}
```
-where every argument in $(\mathit{args}_1) , \ldots , (\mathit{args}_l)$ is a reference to
+where every argument in $(\mathit{args}\_1) , \ldots , (\mathit{args}\_l)$ is a reference to
one of the values $x_1 , \ldots , x_k$. To integrate the current application
into the block, first a value definition using a fresh name $y_i$ is created
for every argument in $e_1 , \ldots , e_m$, which is initialised to $e_i$ for
positional arguments and to $e'_i$ for named arguments of the form
`$x_i=e'_i$`. Then, for every parameter which is not specified
by the argument list, a value definition using a fresh name $z_i$ is created,
-which is initialized using the method computing the
+which is initialized using the method computing the
[default argument](04-basic-declarations-and-definitions.html#function-declarations-and-definitions) of
this parameter.
@@ -419,7 +410,6 @@ The final result of the transformation is a block of the form
}
```
-
## Method Values
```ebnf
@@ -430,7 +420,7 @@ The expression `$e$ _` is well-formed if $e$ is of method
type or if $e$ is a call-by-name parameter. If $e$ is a method with
parameters, `$e$ _` represents $e$ converted to a function
type by [eta expansion](#eta-expansion). If $e$ is a
-parameterless method or call-by-name parameter of type
+parameterless method or call-by-name parameter of type
`=>$T$`, `$e$ _` represents the function of type
`() => $T$`, which evaluates $e$ when it is applied to the empty
parameterlist `()`.
@@ -446,12 +436,9 @@ The method values in the left column are each equivalent to the [eta-expanded ex
|`(1 to 9).fold(z)_` | `{ val eta1 = z; val eta2 = 1 to 9; op => eta2.fold(eta1)(op) }` |
|`Some(1).fold(??? : Int)_` | `{ val eta1 = () => ???; val eta2 = Some(1); op => eta2.fold(eta1())(op) }` |
-
Note that a space is necessary between a method name and the trailing underscore
because otherwise the underscore would be considered part of the name.
-
-
## Type Applications
```ebnf
@@ -459,8 +446,8 @@ SimpleExpr ::= SimpleExpr TypeArgs
```
A type application `$e$[$T_1 , \ldots , T_n$]` instantiates
-a polymorphic value $e$ of type
-`[$a_1$ >: $L_1$ <: $U_1, \ldots , a_n$ >: $L_n$ <: $U_n$]$S$`
+a polymorphic value $e$ of type
+`[$a_1$ >: $L_1$ <: $U_1, \ldots , a_n$ >: $L_n$ <: $U_n$]$S$`
with argument types
`$T_1 , \ldots , T_n$`. Every argument type $T_i$ must obey
the corresponding bounds $L_i$ and $U_i$. That is, for each $i = 1
@@ -469,16 +456,15 @@ U_i$, where $\sigma$ is the substitution $[a_1 := T_1 , \ldots , a_n
:= T_n]$. The type of the application is $\sigma S$.
If the function part $e$ is of some value type, the type application
-is taken to be equivalent to
+is taken to be equivalent to
`$e$.apply[$T_1 , \ldots ,$ T$_n$]`, i.e. the application of an `apply` method defined by
$e$.
-Type applications can be omitted if
-[local type inference](#local-type-inference) can infer best type parameters
+Type applications can be omitted if
+[local type inference](#local-type-inference) can infer best type parameters
for a polymorphic functions from the types of the actual function arguments
and the expected result type.
-
## Tuples
```ebnf
@@ -486,20 +472,19 @@ SimpleExpr ::= `(' [Exprs] `)'
```
A tuple expression `($e_1 , \ldots , e_n$)` is an alias
-for the class instance creation
-`scala.Tuple$n$($e_1 , \ldots , e_n$)`, where $n \geq 2$.
+for the class instance creation
+`scala.Tuple$n$($e_1 , \ldots , e_n$)`, where $n \geq 2$.
The empty tuple
`()` is the unique value of type `scala.Unit`.
-
## Instance Creation Expressions
```ebnf
SimpleExpr ::= `new' (ClassTemplate | TemplateBody)
```
-A simple instance creation expression is of the form
-`new $c$`
+A simple instance creation expression is of the form
+`new $c$`
where $c$ is a [constructor invocation](05-classes-and-objects.html#constructor-invocations). Let $T$ be
the type of $c$. Then $T$ must
denote a (a type instance of) a non-abstract subclass of
@@ -521,7 +506,7 @@ The expression is evaluated by creating a fresh
object of type $T$ which is is initialized by evaluating $c$. The
type of the expression is $T$.
-A general instance creation expression is of the form
+A general instance creation expression is of the form
`new $t$` for some [class template](05-classes-and-objects.html#templates) $t$.
Such an expression is equivalent to the block
@@ -533,7 +518,7 @@ where $a$ is a fresh name of an _anonymous class_ which is
inaccessible to user programs.
There is also a shorthand form for creating values of structural
-types: If `{$D$}` is a class body, then
+types: If `{$D$}` is a class body, then
`new {$D$}` is equivalent to the general instance creation expression
`new AnyRef{$D$}`.
@@ -558,7 +543,6 @@ The latter is in turn a shorthand for the block
where `anon\$X` is some freshly created name.
-
## Blocks
```ebnf
@@ -574,31 +558,30 @@ two definitions or declarations that bind the same name in the same
namespace. The final expression can be omitted, in which
case the unit value `()` is assumed.
-
The expected type of the final expression $e$ is the expected
type of the block. The expected type of all preceding statements is
undefined.
The type of a block `$s_1$; $\ldots$; $s_n$; $e$` is
-`$T$ forSome {$\,Q\,$}`, where $T$ is the type of $e$ and $Q$
+`$T$ forSome {$\,Q\,$}`, where $T$ is the type of $e$ and $Q$
contains [existential clauses](03-types.html#existential-types)
-for every value or type name which is free in $T$
+for every value or type name which is free in $T$
and which is defined locally in one of the statements $s_1 , \ldots , s_n$.
We say the existential clause _binds_ the occurrence of the value or type name.
-Specifically,
+Specifically,
- A locally defined type definition `type$\;t = T$`
is bound by the existential clause `type$\;t >: T <: T$`.
- It is an error if $t$ carries type parameters.
+ It is an error if $t$ carries type parameters.
- A locally defined value definition `val$\;x: T = e$` is
bound by the existential clause `val$\;x: T$`.
- A locally defined class definition `class$\;c$ extends$\;t$`
is bound by the existential clause `type$\;c <: T$` where
$T$ is the least class type or refinement type which is a proper
- supertype of the type $c$. It is an error if $c$ carries type parameters.
+ supertype of the type $c$. It is an error if $c$ carries type parameters.
- A locally defined object definition `object$\;x\;$extends$\;t$`
is bound by the existential clause `val$\;x: T$` where
- $T$ is the least class type or refinement type which is a proper supertype of the type
+ $T$ is the least class type or refinement type which is a proper supertype of the type
`$x$.type`.
Evaluation of the block entails evaluation of its
@@ -623,18 +606,16 @@ simply has type `B`, because with the rules [here](03-types.html#simplification-
the existentially quantified type
`_1 forSome { type _1 <: B }` can be simplified to `B`.
-
## Prefix, Infix, and Postfix Operations
```ebnf
PostfixExpr ::= InfixExpr [id [nl]]
InfixExpr ::= PrefixExpr
| InfixExpr id [nl] InfixExpr
-PrefixExpr ::= [`-' | `+' | `!' | `~'] SimpleExpr
+PrefixExpr ::= [`-' | `+' | `!' | `~'] SimpleExpr
```
-Expressions can be constructed from operands and operators.
-
+Expressions can be constructed from operands and operators.
### Prefix Operations
@@ -656,7 +637,7 @@ application of the infix operator `sin` to the operands
### Postfix Operations
A postfix operator can be an arbitrary identifier. The postfix
-operation $e;\mathit{op}$ is interpreted as $e.\mathit{op}$.
+operation $e;\mathit{op}$ is interpreted as $e.\mathit{op}$.
### Infix Operations
@@ -687,7 +668,7 @@ There's one exception to this rule, which concerns
[_assignment operators_](#assignment-operators).
The precedence of an assigment operator is the same as the one
of simple assignment `(=)`. That is, it is lower than the
-precedence of any other operator.
+precedence of any other operator.
The _associativity_ of an operator is determined by the operator's
last character. Operators ending in a colon ``:`' are
@@ -700,18 +681,18 @@ parts of an expression as follows.
expression, then operators with higher precedence bind more closely
than operators with lower precedence.
- If there are consecutive infix
- operations $e_0; \mathit{op}_1; e_1; \mathit{op}_2 \ldots \mathit{op}_n; e_n$
- with operators $\mathit{op}_1 , \ldots , \mathit{op}_n$ of the same precedence,
+ operations $e_0; \mathit{op}\_1; e_1; \mathit{op}\_2 \ldots \mathit{op}\_n; e_n$
+ with operators $\mathit{op}\_1 , \ldots , \mathit{op}\_n$ of the same precedence,
then all these operators must
have the same associativity. If all operators are left-associative,
the sequence is interpreted as
- $(\ldots(e_0;\mathit{op}_1;e_1);\mathit{op}_2\ldots);\mathit{op}_n;e_n$.
+ $(\ldots(e_0;\mathit{op}\_1;e_1);\mathit{op}\_2\ldots);\mathit{op}\_n;e_n$.
Otherwise, if all operators are right-associative, the
sequence is interpreted as
- $e_0;\mathit{op}_1;(e_1;\mathit{op}_2;(\ldots \mathit{op}_n;e_n)\ldots)$.
+ $e_0;\mathit{op}\_1;(e_1;\mathit{op}\_2;(\ldots \mathit{op}\_n;e_n)\ldots)$.
- Postfix operators always have lower precedence than infix
- operators. E.g. $e_1;\mathit{op}_1;e_2;\mathit{op}_2$ is always equivalent to
- $(e_1;\mathit{op}_1;e_2);\mathit{op}_2$.
+ operators. E.g. $e_1;\mathit{op}\_1;e_2;\mathit{op}\_2$ is always equivalent to
+ $(e_1;\mathit{op}\_1;e_2);\mathit{op}\_2$.
The right-hand operand of a left-associative operator may consist of
several arguments enclosed in parentheses, e.g. $e;\mathit{op};(e_1,\ldots,e_n)$.
@@ -721,13 +702,13 @@ A left-associative binary
operation $e_1;\mathit{op};e_2$ is interpreted as $e_1.\mathit{op}(e_2)$. If $\mathit{op}$ is
right-associative, the same operation is interpreted as
`{ val $x$=$e_1$; $e_2$.$\mathit{op}$($x\,$) }`, where $x$ is a fresh
-name.
+name.
### Assignment Operators
An assignment operator is an operator symbol (syntax category
`op` in [Identifiers](01-lexical-syntax.html#identifiers)) that ends in an equals character
-“`=`”, with the exception of operators for which one of
+“`=`”, with the exception of operators for which one of
the following conditions holds:
1. the operator also starts with an equals character, or
@@ -737,8 +718,8 @@ Assignment operators are treated specially in that they
can be expanded to assignments if no other interpretation is valid.
Let's consider an assignment operator such as `+=` in an infix
-operation `$l$ += $r$`, where $l$, $r$ are expressions.
-This operation can be re-interpreted as an operation which corresponds
+operation `$l$ += $r$`, where $l$, $r$ are expressions.
+This operation can be re-interpreted as an operation which corresponds
to the assignment
```scala
@@ -750,15 +731,14 @@ except that the operation's left-hand-side $l$ is evaluated only once.
The re-interpretation occurs if the following two conditions are fulfilled.
1. The left-hand-side $l$ does not have a member named
- `+=`, and also cannot be converted by an
+ `+=`, and also cannot be converted by an
[implicit conversion](#implicit-conversions)
to a value with a member named `+=`.
1. The assignment `$l$ = $l$ + $r$` is type-correct.
- In particular this implies that $l$ refers to a variable or object
- that can be assigned to, and that is convertible to a value with a member
+ In particular this implies that $l$ refers to a variable or object
+ that can be assigned to, and that is convertible to a value with a member
named `+`.
-
## Typed Expressions
```ebnf
@@ -778,18 +758,16 @@ Here are examples of well-typed and ill-typed expressions.
// 1: string // ***** illegal
```
-
## Annotated Expressions
```ebnf
-Expr1 ::= PostfixExpr `:' Annotation {Annotation}
+Expr1 ::= PostfixExpr `:' Annotation {Annotation}
```
An annotated expression `$e$: @$a_1$ $\ldots$ @$a_n$`
attaches [annotations](11-user-defined-annotations.html#user-defined-annotations) $a_1 , \ldots , a_n$ to the
expression $e$.
-
## Assignments
```ebnf
@@ -810,21 +788,21 @@ assignment `$f.x$ = $e$` to a parameterless function $x$
is interpreted as the invocation `$f.x$_=($e\,$)`.
An assignment `$f$($\mathit{args}\,$) = $e$` with a function application to the
-left of the ‘`=`’ operator is interpreted as
+left of the ‘`=`’ operator is interpreted as
`$f.$update($\mathit{args}$, $e\,$)`, i.e.
the invocation of an `update` function defined by $f$.
###### Example
Here are some assignment expressions and their equivalent expansions.
--------------------------- ---------------------
-`x.f = e` x.f_=(e)
-`x.f() = e` x.f.update(e)
-`x.f(i) = e` x.f.update(i, e)
-`x.f(i, j) = e` x.f.update(i, j, e)
--------------------------- ---------------------
+| assignment | expansion |
+|--------------------------|----------------------|
+|`x.f = e` | `x.f_=(e)` |
+|`x.f() = e` | `x.f.update(e)` |
+|`x.f(i) = e` | `x.f.update(i, e)` |
+|`x.f(i, j) = e` | `x.f.update(i, j, e)`|
-### Example
+### Example Imperative Matrix Multiplication
Here is the usual imperative code for matrix multiplication.
@@ -875,7 +853,6 @@ def matmul(xss: Array[Array[Double]], yss: Array[Array[Double]]) = {
}
```
-
## Conditional Expressions
```ebnf
@@ -900,7 +877,7 @@ evaluating $e_3$ is returned.
A short form of the conditional expression eliminates the
else-part. The conditional expression `if ($e_1$) $e_2$` is
-evaluated as if it was `if ($e_1$) $e_2$ else ()`.
+evaluated as if it was `if ($e_1$) $e_2$ else ()`.
## While Loop Expressions
@@ -917,7 +894,6 @@ def whileLoop(cond: => Boolean)(body: => Unit): Unit =
if (cond) { body ; whileLoop(cond)(body) } else {}
```
-
## Do Loop Expressions
```ebnf
@@ -928,11 +904,10 @@ The do loop expression `do $e_1$ while ($e_2$)` is typed and
evaluated as if it was the expression `($e_1$ ; while ($e_2$) $e_1$)`.
A semicolon preceding the `while` symbol of a do loop expression is ignored.
-
## For Comprehensions and For Loops
```ebnf
-Expr1 ::= `for' (`(' Enumerators `)' | `{' Enumerators `}')
+Expr1 ::= `for' (`(' Enumerators `)' | `{' Enumerators `}')
{nl} [`yield'] Expr
Enumerators ::= Generator {semi Generator}
Generator ::= Pattern1 `<-' Expr {[semi] Guard | semi Pattern1 `=' Expr}
@@ -947,7 +922,7 @@ and collects the results. An enumerator sequence always starts with a
generator; this can be followed by further generators, value
definitions, or guards. A _generator_ `$p$ <- $e$`
produces bindings from an expression $e$ which is matched in some way
-against pattern $p$. A _value definition_ `$p$ = $e$`
+against pattern $p$. A _value definition_ `$p$ = $e$`
binds the value name $p$ (or several names in a pattern $p$) to
the result of evaluating the expression $e$. A _guard_
`if $e$` contains a boolean expression which restricts
@@ -967,17 +942,17 @@ $p$ <- $e$.withFilter { case $p$ => true; case _ => false }
Then, the following rules are applied repeatedly until all
comprehensions have been eliminated.
- - A for comprehension
- `for ($p$ <- $e\,$) yield $e'$`
+ - A for comprehension
+ `for ($p$ <- $e\,$) yield $e'$`
is translated to
`$e$.map { case $p$ => $e'$ }`.
- A for loop
- `for ($p$ <- $e\,$) $e'$`
+ `for ($p$ <- $e\,$) $e'$`
is translated to
`$e$.foreach { case $p$ => $e'$ }`.
- A for comprehension
- ```
+ ```
for ($p$ <- $e$; $p'$ <- $e'; \ldots$) yield $e''$
```
@@ -985,13 +960,13 @@ comprehensions have been eliminated.
sequence of generators, definitions, or guards,
is translated to
- ```
+ ```
$e$.flatMap { case $p$ => for ($p'$ <- $e'; \ldots$) yield $e''$ }
```
- A for loop
- ```
+ ```
for ($p$ <- $e$; $p'$ <- $e'; \ldots$) $e''$
```
@@ -999,24 +974,23 @@ comprehensions have been eliminated.
sequence of generators, definitions, or guards,
is translated to
- ```
+ ```
$e$.foreach { case $p$ => for ($p'$ <- $e'; \ldots$) $e''$ }
```
- A generator `$p$ <- $e$` followed by a guard
- `if $g$` is translated to a single generator
+ `if $g$` is translated to a single generator
`$p$ <- $e$.withFilter(($x_1 , \ldots , x_n$) => $g\,$)` where
$x_1 , \ldots , x_n$ are the free variables of $p$.
- - A generator `$p$ <- $e$` followed by a value definition
+ - A generator `$p$ <- $e$` followed by a value definition
`$p'$ = $e'$` is translated to the following generator of pairs of values, where
$x$ and $x'$ are fresh names:
- ```
+ ```
($p$, $p'$) <- for ($x @ p$ <- $e$) yield { val $x' @ p'$ = $e'$; ($x$, $x'$) }
```
-
###### Example
The following code produces all pairs of numbers between $1$ and $n-1$
whose sums are prime.
@@ -1078,7 +1052,6 @@ The code above makes use of the fact that `map`, `flatMap`,
`withFilter`, and `foreach` are defined for instances of class
`scala.Array`.
-
## Return Expressions
```ebnf
@@ -1088,11 +1061,11 @@ Expr1 ::= `return' [Expr]
A return expression `return $e$` must occur inside the body of some
enclosing named method or function. The innermost enclosing named
method or function in a source program, $f$, must have an explicitly declared result type,
-and the type of $e$ must conform to it.
+and the type of $e$ must conform to it.
The return expression
evaluates the expression $e$ and returns its value as the result of
$f$. The evaluation of any statements or
-expressions following the return expression is omitted. The type of
+expressions following the return expression is omitted. The type of
a return expression is `scala.Nothing`.
The expression $e$ may be omitted. The return expression
@@ -1116,7 +1089,6 @@ before the return expression is executed. In that case, the thrown
`scala.runtime.NonLocalReturnException` will not be caught,
and will propagate up the call stack.
-
## Throw Expressions
```ebnf
@@ -1134,17 +1106,16 @@ exception, evaluation resumes with the handler; otherwise the thread
executing the `throw` is aborted. The type of a throw expression
is `scala.Nothing`.
-
## Try Expressions
```ebnf
-Expr1 ::= `try' `{' Block `}' [`catch' `{' CaseClauses `}']
+Expr1 ::= `try' `{' Block `}' [`catch' `{' CaseClauses `}']
[`finally' Expr]
```
A try expression is of the form `try { $b$ } catch $h$`
-where the handler $h$ is a
-[pattern matching anonymous function](#pattern-matching-anonymous-functions)
+where the handler $h$ is a
+[pattern matching anonymous function](08-pattern-matching.html#pattern-matching-anonymous-functions)
```scala
{ case $p_1$ => $b_1$ $\ldots$ case $p_n$ => $b_n$ }
@@ -1152,12 +1123,12 @@ where the handler $h$ is a
This expression is evaluated by evaluating the block
$b$. If evaluation of $b$ does not cause an exception to be
-thrown, the result of $b$ is returned. Otherwise the
-handler $h$ is applied to the thrown exception.
+thrown, the result of $b$ is returned. Otherwise the
+handler $h$ is applied to the thrown exception.
If the handler contains a case matching the thrown exception,
the first such case is invoked. If the handler contains
-no case matching the thrown exception, the exception is
-re-thrown.
+no case matching the thrown exception, the exception is
+re-thrown.
Let $\mathit{pt}$ be the expected type of the try expression. The block
$b$ is expected to conform to $\mathit{pt}$. The handler $h$
@@ -1173,7 +1144,7 @@ thrown, the expression $e$ is evaluated. If an exception is thrown
during evaluation of $e$, the evaluation of the try expression is
aborted with the thrown exception. If no exception is thrown during
evaluation of $e$, the result of $b$ is returned as the
-result of the try expression.
+result of the try expression.
If an exception is thrown during evaluation of $b$, the finally block
$e$ is also evaluated. If another exception $e$ is thrown
@@ -1185,11 +1156,10 @@ $b$ is expected to conform to the expected type of the try
expression. The finally expression $e$ is expected to conform to
type `Unit`.
-A try expression `try { $b$ } catch $e_1$ finally $e_2$`
+A try expression `try { $b$ } catch $e_1$ finally $e_2$`
is a shorthand
for `try { try { $b$ } catch $e_1$ } finally $e_2$`.
-
## Anonymous Functions
```ebnf
@@ -1199,7 +1169,7 @@ Bindings ::= `(' Binding {`,' Binding} `)'
Binding ::= (id | `_') [`:' Type]
```
-The anonymous function `($x_1$: $T_1 , \ldots , x_n$: $T_n$) => e`
+The anonymous function `($x_1$: $T_1 , \ldots , x_n$: $T_n$) => e`
maps parameters $x_i$ of types $T_i$ to a result given
by expression $e$. The scope of each formal parameter
$x_i$ is $e$. Formal parameters must have pairwise distinct names.
@@ -1226,14 +1196,14 @@ new scala.Function$n$[$T_1 , \ldots , T_n$, $T$] {
}
```
-In the case of a single untyped formal parameter,
-`($x\,$) => $e$`
+In the case of a single untyped formal parameter,
+`($x\,$) => $e$`
can be abbreviated to `$x$ => $e$`. If an
anonymous function `($x$: $T\,$) => $e$` with a single
typed parameter appears as the result expression of a block, it can be
abbreviated to `$x$: $T$ => e`.
-A formal parameter may also be a wildcard represented by an underscore `_`.
+A formal parameter may also be a wildcard represented by an underscore `_`.
In that case, a fresh name for the parameter is chosen arbitrarily.
A named parameter of an anonymous function may be optionally preceded
@@ -1262,7 +1232,6 @@ _ => 5 // The function that ignores its argument
// and always returns 5.
```
-
### Placeholder Syntax for Anonymous Functions
```ebnf
@@ -1281,10 +1250,10 @@ type ascription `_:$T$`.
An expression $e$ of syntactic category `Expr` _binds_ an underscore section
$u$, if the following two conditions hold: (1) $e$ properly contains $u$, and
-(2) there is no other expression of syntactic category `Expr`
+(2) there is no other expression of syntactic category `Expr`
which is properly contained in $e$ and which itself properly contains $u$.
-If an expression $e$ binds underscore sections $u_1 , \ldots , u_n$, in this order, it is equivalent to
+If an expression $e$ binds underscore sections $u_1 , \ldots , u_n$, in this order, it is equivalent to
the anonymous function `($u'_1$, ... $u'_n$) => $e'$`
where each $u_i'$ results from $u_i$ by replacing the underscore with a fresh identifier and
$e'$ results from $e$ by replacing each underscore section $u_i$ by $u_i'$.
@@ -1302,7 +1271,6 @@ syntax. Each of these is equivalent to the anonymous function on its right.
|`_.map(f)` | `x => x.map(f)` |
|`_.map(_ + 1)` | `x => x.map(y => y + 1)` |
-
## Constant Expressions
Constant expressions are expressions that the Scala compiler can evaluate to a constant.
@@ -1316,10 +1284,9 @@ include at least the expressions of the following forms:
- A literal array, of the form
`Array$(c_1 , \ldots , c_n)$`,
where all of the $c_i$'s are themselves constant expressions
-- An identifier defined by a
+- An identifier defined by a
[constant value definition](04-basic-declarations-and-definitions.html#value-declarations-and-definitions).
-
## Statements
```ebnf
@@ -1332,7 +1299,7 @@ TemplateStat ::= Import
| {Annotation} {Modifier} Def
| {Annotation} {Modifier} Dcl
| Expr
- |
+ |
```
Statements occur as parts of blocks and templates. A statement can be
@@ -1340,7 +1307,7 @@ an import, a definition or an expression, or it can be empty.
Statements used in the template of a class definition can also be
declarations. An expression that is used as a statement can have an
arbitrary value type. An expression statement $e$ is evaluated by
-evaluating $e$ and discarding the result of the evaluation.
+evaluating $e$ and discarding the result of the evaluation.
<!-- Generalize to implicit coercion? -->
@@ -1353,7 +1320,6 @@ permitted.
Evaluation of a statement sequence entails evaluation of the
statements in the order they are written.
-
## Implicit Conversions
Implicit conversions can be applied to expressions whose type does not
@@ -1361,7 +1327,7 @@ match their expected type, to qualifiers in selections, and to unapplied methods
available implicit conversions are given in the next two sub-sections.
We say, a type $T$ is _compatible_ to a type $U$ if $T$ weakly conforms
-to $U$ after applying [eta-expansion](#eta-expansion) and
+to $U$ after applying [eta-expansion](#eta-expansion) and
[view applications](07-implicit-parameters-and-views.html#views).
### Value Conversions
@@ -1370,12 +1336,11 @@ The following five implicit conversions can be applied to an
expression $e$ which has some value type $T$ and which is type-checked with
some expected type $\mathit{pt}$.
-#### Overloading Resolution
-If an expression denotes several possible members of a class,
+###### Static Overloading Resolution
+If an expression denotes several possible members of a class,
[overloading resolution](#overloading-resolution)
is applied to pick a unique member.
-
###### Type Instantiation
An expression $e$ of polymorphic type
@@ -1386,7 +1351,7 @@ An expression $e$ of polymorphic type
which does not appear as the function part of
a type application is converted to a type instance of $T$
by determining with [local type inference](#local-type-inference)
-instance types `$T_1 , \ldots , T_n$`
+instance types `$T_1 , \ldots , T_n$`
for the type variables `$a_1 , \ldots , a_n$` and
implicitly embedding $e$ in the [type application](#type-applications)
`$e$[$T_1 , \ldots , T_n$]`.
@@ -1405,7 +1370,7 @@ type, it is converted to the same literal in that type.
###### Value Discarding
If $e$ has some value type and the expected type is `Unit`,
-$e$ is converted to the expected type by embedding it in the
+$e$ is converted to the expected type by embedding it in the
term `{ $e$; () }`.
###### View Application
@@ -1416,7 +1381,7 @@ $e$ to the expected type with a [view](07-implicit-parameters-and-views.html#vie
###### Dynamic Member Selection
If none of the previous conversions applies, and $e$ is a prefix
of a selection $e.x$, and $e$'s type conforms to class `scala.Dynamic`,
-then the selection is rewritten according to the rules for
+then the selection is rewritten according to the rules for
[dynamic member selection](#dynamic-member-selection).
### Method Conversions
@@ -1450,7 +1415,7 @@ member. The way this is done depends on whether or not $e$ is used as
a function. Let $\mathscr{A}$ be the set of members referenced by $e$.
Assume first that $e$ appears as a function in an application, as in
-`$e$($e_1 , \ldots , e_m$)`.
+`$e$($e_1 , \ldots , e_m$)`.
One first determines the set of functions that is potentially
applicable based on the _shape_ of the arguments.
@@ -1464,7 +1429,7 @@ a type that is defined as follows:
- For a named argument `$n$ = $e$`: $\mathit{shape}(e)$.
- For all other expressions: `Nothing`.
-Let $\mathscr{B}$ be the set of alternatives in $\mathscr{A}$ that are
+Let $\mathscr{B}$ be the set of alternatives in $\mathscr{A}$ that are
[_applicable_](#function-applications)
to expressions $(e_1 , \ldots , e_n)$ of types
$(\mathit{shape}(e_1) , \ldots , \mathit{shape}(e_n))$.
@@ -1473,7 +1438,7 @@ alternative in $\mathscr{B}$, that alternative is chosen.
Otherwise, let $S_1 , \ldots , S_m$ be the vector of types obtained by
typing each argument with an undefined expected type. For every
-member $m$ in $\mathscr{B}$ one determines whether it is
+member $m$ in $\mathscr{B}$ one determines whether it is
applicable to expressions ($e_1 , \ldots , e_m$) of types $S_1
, \ldots , S_m$.
It is an error if none of the members in $\mathscr{B}$ is applicable. If there is one
@@ -1501,16 +1466,16 @@ question: given
types $T_1 , \ldots , T_n$.
- A polymorphic method of type
`[$a_1$ >: $L_1$ <: $U_1 , \ldots , a_n$ >: $L_n$ <: $U_n$]$T$` is
- as specific as some other member of type $S$ if $T$ is as
+ as specific as some other member of type $S$ if $T$ is as
specific as $S$ under the assumption that for
$i = 1 , \ldots , n$ each $a_i$ is an abstract type name
bounded from below by $L_i$ and from above by $U_i$.
- A member of any other type is always as specific as a parameterized method
or a polymorphic method.
-- Given two members of types $T$ and $U$ which are
+- Given two members of types $T$ and $U$ which are
neither parameterized nor polymorphic method types, the member of type $T$ is as specific as
- the member of type $U$ if the existential dual of $T$ conforms to the existential dual of $U$.
- Here, the existential dual of a polymorphic type
+ the member of type $U$ if the existential dual of $T$ conforms to the existential dual of $U$.
+ Here, the existential dual of a polymorphic type
`[$a_1$ >: $L_1$ <: $U_1 , \ldots , a_n$ >: $L_n$ <: $U_n$]$T$` is
`$T$ forSome { type $a_1$ >: $L_1$ <: $U_1$ $, \ldots ,$ type $a_n$ >: $L_n$ <: $U_n$}`.
The existential dual of every other type is the type itself.
@@ -1541,15 +1506,15 @@ in `$e$[$\mathit{targs}\,$]`. Then all alternatives in
$\mathscr{A}$ which take the same number of type parameters as there are type
arguments in $\mathit{targs}$ are chosen. It is an error if no such alternative exists.
If there are several such alternatives, overloading resolution is
-applied again to the whole expression `$e$[$\mathit{targs}\,$]`.
+applied again to the whole expression `$e$[$\mathit{targs}\,$]`.
Assume finally that $e$ does not appear as a function in either
an application or a type application. If an expected type is given,
let $\mathscr{B}$ be the set of those alternatives in $\mathscr{A}$ which are
-[compatible](#implicit-conversions) to it. Otherwise, let $\mathscr{B}$ be the same
+[compatible](#implicit-conversions) to it. Otherwise, let $\mathscr{B}$ be the same
as $\mathscr{A}$.
We choose in this case the most specific alternative among all
-alternatives in $\mathscr{B}$. It is an error if there is no
+alternatives in $\mathscr{B}$. It is an error if there is no
alternative in $\mathscr{B}$ which is more specific than all other
alternatives in $\mathscr{B}$.
@@ -1575,18 +1540,17 @@ def f(x: B, y: A) = $\ldots$
Then the application `f(a, a)` is rejected for being ambiguous, since
no most specific applicable signature exists.
-
### Local Type Inference
Local type inference infers type arguments to be passed to expressions
of polymorphic type. Say $e$ is of type [$a_1$ >: $L_1$ <: $U_1
, \ldots , a_n$ >: $L_n$ <: $U_n$]$T$ and no explicit type parameters
-are given.
+are given.
Local type inference converts this expression to a type
application `$e$[$T_1 , \ldots , T_n$]`. The choice of the
type arguments $T_1 , \ldots , T_n$ depends on the context in which
-the expression appears and on the expected type $\mathit{pt}$.
+the expression appears and on the expected type $\mathit{pt}$.
There are three cases.
###### Case 1: Selections
@@ -1594,7 +1558,7 @@ If the expression appears as the prefix of a selection with a name
$x$, then type inference is _deferred_ to the whole expression
$e.x$. That is, if $e.x$ has type $S$, it is now treated as having
type [$a_1$ >: $L_1$ <: $U_1 , \ldots , a_n$ >: $L_n$ <: $U_n$]$S$,
-and local type inference is applied in turn to infer type arguments
+and local type inference is applied in turn to infer type arguments
for $a_1 , \ldots , a_n$, using the context in which $e.x$ appears.
###### Case 2: Values
@@ -1602,7 +1566,7 @@ If the expression $e$ appears as a value without being applied to
value arguments, the type arguments are inferred by solving a
constraint system which relates the expression's type $T$ with the
expected type $\mathit{pt}$. Without loss of generality we can assume that
-$T$ is a value type; if it is a method type we apply
+$T$ is a value type; if it is a method type we apply
[eta-expansion](#eta-expansion) to convert it to a function type. Solving
means finding a substitution $\sigma$ of types $T_i$ for the type
parameters $a_i$ such that
@@ -1613,7 +1577,7 @@ parameters $a_i$ such that
- The expression's type conforms to the expected type, i.e.
$\sigma T <: \sigma \mathit{pt}$.
-It is a compile time error if no such substitution exists.
+It is a compile time error if no such substitution exists.
If several substitutions exist, local-type inference will choose for
each type variable $a_i$ a minimal or maximal type $T_i$ of the
solution space. A _maximal_ type $T_i$ will be chosen if the type
@@ -1722,7 +1686,6 @@ a = Int
so `Int` is the type inferred for `a`.
-
###### Example
Consider now the definition
@@ -1759,7 +1722,6 @@ a = scala.Any
so `scala.Any` is the type inferred for `a`.
-
### Eta Expansion
_Eta-expansion_ converts an expression of method type to an
@@ -1774,10 +1736,10 @@ for every argument type $T_i$ of the method ($i = 1 , \ldots ,
n$). The result of eta-conversion is then:
```scala
-{ val $x_1$ = $e_1$;
- $\ldots$
- val $x_m$ = $e_m$;
- ($y_1: T_1 , \ldots , y_n: T_n$) => $e'$($y_1 , \ldots , y_n$)
+{ val $x_1$ = $e_1$;
+ $\ldots$
+ val $x_m$ = $e_m$;
+ ($y_1: T_1 , \ldots , y_n: T_n$) => $e'$($y_1 , \ldots , y_n$)
}
```
@@ -1811,4 +1773,3 @@ is rewritten to
```scala
$e$.applyDynamic("$x$", $\mathit{args}$)
```
-
diff --git a/spec/07-implicit-parameters-and-views.md b/spec/07-implicit-parameters-and-views.md
index 1a4d70409c..27a50cf058 100644
--- a/spec/07-implicit-parameters-and-views.md
+++ b/spec/07-implicit-parameters-and-views.md
@@ -15,11 +15,11 @@ ParamClauses ::= {ParamClause} [nl] ‘(’ ‘implicit’ Params ‘)’
Template members and parameters labeled with an `implicit`
modifier can be passed to [implicit parameters](#implicit-parameters)
-and can be used as implicit conversions called [views](#views).
+and can be used as implicit conversions called [views](#views).
The `implicit` modifier is illegal for all
type members, as well as for [top-level objects](09-top-level-definitions.html#packagings).
-### Example
+### Example Monoid
The following code defines an abstract class of monoids and
two concrete implementations, `StringMonoid` and
`IntMonoid`. The two implementations are marked implicit.
@@ -41,7 +41,6 @@ object Monoids {
}
```
-
## Implicit Parameters
An implicit parameter list
@@ -57,7 +56,7 @@ parameters, such arguments will be automatically provided.
The actual arguments that are eligible to be passed to an implicit
parameter of type $T$ fall into two categories. First, eligible are
all identifiers $x$ that can be accessed at the point of the method
-call without a prefix and that denote an
+call without a prefix and that denote an
[implicit definition](#the-implicit-modifier)
or an implicit parameter. An eligible
identifier may thus be a local name, or a member of an enclosing
@@ -117,7 +116,6 @@ eligible object which matches the implicit formal parameter type
`Monoid[Int]` is `intMonoid` so this object will
be passed as implicit parameter.
-
This discussion also shows that implicit parameters are inferred after
any type arguments are [inferred](06-expressions.html#local-type-inference).
@@ -128,7 +126,7 @@ type of the list is also convertible to this type.
```scala
implicit def list2ordered[A](x: List[A])
- (implicit elem2ordered: A => Ordered[A]): Ordered[List[A]] =
+ (implicit elem2ordered: A => Ordered[A]): Ordered[List[A]] =
...
```
@@ -145,8 +143,8 @@ define a `sort` method over ordered lists:
def sort[A](xs: List[A])(implicit a2ordered: A => Ordered[A]) = ...
```
-We can apply `sort` to a list of lists of integers
-`yss: List[List[Int]]`
+We can apply `sort` to a list of lists of integers
+`yss: List[List[Int]]`
as follows:
```scala
@@ -161,11 +159,11 @@ sort(yss)(xs: List[Int] => list2ordered[Int](xs)(int2ordered)) .
The possibility of passing implicit arguments to implicit arguments
raises the possibility of an infinite recursion. For instance, one
-might try to define the following method, which injects _every_ type into the
+might try to define the following method, which injects _every_ type into the
`Ordered` class:
```scala
-implicit def magic[A](x: A)(implicit a2ordered: A => Ordered[A]): Ordered[A] =
+implicit def magic[A](x: A)(implicit a2ordered: A => Ordered[A]): Ordered[A] =
a2ordered(x)
```
@@ -178,7 +176,7 @@ expansion:
sort(arg)(x => magic(x)(x => magic(x)(x => ... )))
```
-To prevent such infinite expansions, the compiler keeps track of
+To prevent such infinite expansions, the compiler keeps track of
a stack of “open implicit types” for which implicit arguments are currently being
searched. Whenever an implicit argument for type $T$ is searched, the
“core type” of $T$ is added to the stack. Here, the _core type_
@@ -190,8 +188,8 @@ the implicit argument either definitely fails or succeeds. Everytime a
core type is added to the stack, it is checked that this type does not
dominate any of the other types in the set.
-Here, a core type $T$ _dominates_ a type $U$ if $T$ is
-[equivalent](03-types.html#type-equivalence)
+Here, a core type $T$ _dominates_ a type $U$ if $T$ is
+[equivalent](03-types.html#equivalence)
to $U$, or if the top-level type constructors of $T$ and $U$ have a
common element and $T$ is more complex than $U$.
@@ -203,15 +201,14 @@ the type:
- For a singleton type, $\mathit{ttcs}(p.type) ~=~ \mathit{ttcs}(T)$, provided $p$ has type $T$;
- For a compound type, `$\mathit{ttcs}(T_1$ with $\ldots$ with $T_n)$` $~=~ \mathit{ttcs}(T_1) \cup \ldots \cup \mathit{ttcs}(T_n)$.
-The _complexity_ $\mathit{complexity}(T)$ of a core type is an integer which also depends on the form of
+The _complexity_ $\operatorname{complexity}(T)$ of a core type is an integer which also depends on the form of
the type:
-- For a type designator, $\mathit{complexity}(p.c) ~=~ 1 + \mathit{complexity}(p)$
-- For a parameterized type, $\mathit{complexity}(p.c[\mathit{targs}]) ~=~ 1 + \Sigma \mathit{complexity}(\mathit{targs})$
-- For a singleton type denoting a package $p$, $\mathit{complexity}(p.type) ~=~ 0$
-- For any other singleton type, $\mathit{complexity}(p.type) ~=~ 1 + \mathit{complexity}(T)$, provided $p$ has type $T$;
-- For a compound type, `$\mathit{complexity}(T_1$ with $\ldots$ with $T_n)$` $= \Sigma\mathit{complexity}(T_i)$
-
+- For a type designator, $\operatorname{complexity}(p.c) ~=~ 1 + \operatorname{complexity}(p)$
+- For a parameterized type, $\operatorname{complexity}(p.c[\mathit{targs}]) ~=~ 1 + \Sigma \operatorname{complexity}(\mathit{targs})$
+- For a singleton type denoting a package $p$, $\operatorname{complexity}(p.type) ~=~ 0$
+- For any other singleton type, $\operatorname{complexity}(p.type) ~=~ 1 + \operatorname{complexity}(T)$, provided $p$ has type $T$;
+- For a compound type, `$\operatorname{complexity}(T_1$ with $\ldots$ with $T_n)$` $= \Sigma\operatorname{complexity}(T_i)$
###### Example
When typing `sort(xs)` for some list `xs` of type `List[List[List[Int]]]`,
@@ -228,7 +225,6 @@ All types share the common type constructor `scala.Function1`,
but the complexity of the each new type is lower than the complexity of the previous types.
Hence, the code typechecks.
-
###### Example
Let `ys` be a list of some type which cannot be converted
to `Ordered`. For instance:
@@ -249,7 +245,6 @@ Throwable => Ordered[Throwable],
Since the second type in the sequence is equal to the first, the compiler
will issue an error signalling a divergent implicit expansion.
-
## Views
Implicit parameters and methods can also define implicit conversions
@@ -266,7 +261,7 @@ Views are applied in three situations:
$\mathit{pt}$. The search proceeds as in the case of implicit parameters,
where the implicit scope is the one of `$T$ => $\mathit{pt}$`. If
such a view is found, the expression $e$ is converted to
- `$v$($e$)`.
+ `$v$($e$)`.
1. In a selection $e.m$ with $e$ of type $T$, if the selector $m$ does
not denote an accessible member of $T$. In this case, a view $v$ is searched
which is applicable to $e$ and whose result contains a member named
@@ -275,13 +270,12 @@ Views are applied in three situations:
selection $e.m$ is converted to `$v$($e$).$m$`.
1. In a selection $e.m(\mathit{args})$ with $e$ of type $T$, if the selector
$m$ denotes some member(s) of $T$, but none of these members is applicable to the arguments
- $\mathit{args}$. In this case a view $v$ is searched which is applicable to $e$
+ $\mathit{args}$. In this case a view $v$ is searched which is applicable to $e$
and whose result contains a method $m$ which is applicable to $\mathit{args}$.
The search proceeds as in the case of implicit parameters, where
the implicit scope is the one of $T$. If such a view is found, the
selection $e.m$ is converted to `$v$($e$).$m(\mathit{args})$`.
-
The implicit view, if it is found, can accept is argument $e$ as a
call-by-value or as a call-by-name parameter. However, call-by-value
implicits take precedence over call-by-name implicits.
@@ -290,7 +284,7 @@ As for implicit parameters, overloading resolution is applied
if there are several possible candidates (of either the call-by-value
or the call-by-name category).
-### Example
+### Example Ordered
Class `scala.Ordered[A]` contains a method
```scala
@@ -319,17 +313,16 @@ The first application of `list2ordered` converts the list
occurrence is part of an implicit parameter passed to the `<=`
method.
-
## Context Bounds and View Bounds
```ebnf
- TypeParam ::= (id | ‘_’) [TypeParamClause] [‘>:’ Type] [‘<:’ Type]
+ TypeParam ::= (id | ‘_’) [TypeParamClause] [‘>:’ Type] [‘<:’ Type]
{‘<%’ Type} {‘:’ Type}
```
A type parameter $A$ of a method or non-trait class may have one or more view
bounds `$A$ <% $T$`. In this case the type parameter may be
-instantiated to any type $S$ which is convertible by application of a
+instantiated to any type $S$ which is convertible by application of a
view to the bound $T$.
A type parameter $A$ of a method or non-trait class may also have one
@@ -375,10 +368,9 @@ def <= [B >: A <% Ordered[B]](that: B): Boolean
## Manifests
-
Manifests are type descriptors that can be automatically generated by
the Scala compiler as arguments to implicit parameters. The Scala
-standard library contains a hierarchy of four manifest classes,
+standard library contains a hierarchy of four manifest classes,
with `OptManifest`
at the top. Their signatures follow the outline below.
@@ -399,7 +391,7 @@ argument is selected.
Otherwise, let $\mathit{Mobj}$ be the companion object `scala.reflect.Manifest`
if $M$ is trait `Manifest`, or be
the companion object `scala.reflect.ClassManifest` otherwise. Let $M'$ be the trait
-`Manifest` if $M$ is trait `Manifest`, or be the trait `OptManifest` otherwise.
+`Manifest` if $M$ is trait `Manifest`, or be the trait `OptManifest` otherwise.
Then the following rules apply.
1. If $T$ is a value class or one of the classes `Any`, `AnyVal`, `Object`,
@@ -416,26 +408,25 @@ Then the following rules apply.
where $m_0$ is the manifest determined for $M'[S]$ and $ms$ are the
manifests determined for $M'[U_1], \ldots, M'[U_n]$.
1. If $T$ is some other class type with type arguments $U_1 , \ldots , U_n$,
- a manifest is generated
+ a manifest is generated
with the invocation `$\mathit{Mobj}$.classType[T](classOf[T], $ms$)`
where $ms$ are the
manifests determined for $M'[U_1] , \ldots , M'[U_n]$.
1. If $T$ is a singleton type `$p$.type`, a manifest is generated with
- the invocation `$\mathit{Mobj}$.singleType[T]($p$)`
+ the invocation `$\mathit{Mobj}$.singleType[T]($p$)`
1. If $T$ is a refined type $T' \{ R \}$, a manifest is generated for $T'$.
(That is, refinements are never reflected in manifests).
1. If $T$ is an intersection type
`$T_1$ with $, \ldots ,$ with $T_n$`
where $n > 1$, the result depends on whether a full manifest is
- to be determined or not.
+ to be determined or not.
If $M$ is trait `Manifest`, then
a manifest is generated with the invocation
`Manifest.intersectionType[T]($ms$)` where $ms$ are the manifests
determined for $M[T_1] , \ldots , M[T_n]$.
- Otherwise, if $M$ is trait `ClassManifest`,
+ Otherwise, if $M$ is trait `ClassManifest`,
then a manifest is generated for the [intersection dominator](03-types.html#type-erasure)
of the types $T_1 , \ldots , T_n$.
1. If $T$ is some other type, then if $M$ is trait `OptManifest`,
a manifest is generated from the designator `scala.reflect.NoManifest`.
If $M$ is a type different from `OptManifest`, a static error results.
-
diff --git a/spec/08-pattern-matching.md b/spec/08-pattern-matching.md
index 7b4d070181..8e224de8d2 100644
--- a/spec/08-pattern-matching.md
+++ b/spec/08-pattern-matching.md
@@ -15,7 +15,7 @@ chapter: 8
| Pattern2
Pattern2 ::= varid [‘@’ Pattern3]
| Pattern3
- Pattern3 ::= SimplePattern
+ Pattern3 ::= SimplePattern
| SimplePattern {id [nl] SimplePattern}
SimplePattern ::= ‘_’
| varid
@@ -63,23 +63,22 @@ patterns.
A variable pattern $x$ is a simple identifier which starts with a
lower case letter. It matches any value, and binds the variable name
to that value. The type of $x$ is the expected type of the pattern as
-given from outside. A special case is the wild-card pattern $\_$
+given from outside. A special case is the wild-card pattern `_`
which is treated as if it was a fresh variable on each occurrence.
### Typed Patterns
-
```ebnf
Pattern1 ::= varid `:' TypePat
| `_' `:' TypePat
```
A typed pattern $x: T$ consists of a pattern variable $x$ and a
-type pattern $T$. The type of $x$ is the type pattern $T$, where
+type pattern $T$. The type of $x$ is the type pattern $T$, where
each type variable and wildcard is replaced by a fresh, unknown type.
-This pattern matches any value matched by the [type pattern](#type-patterns)
+This pattern matches any value matched by the [type pattern](#type-patterns)
$T$; it binds the variable name to
-that value.
+that value.
### Pattern Binders
@@ -87,10 +86,10 @@ that value.
Pattern2 ::= varid `@' Pattern3
```
-A pattern binder `$x$@$p$` consists of a pattern variable $x$ and a
+A pattern binder `$x$@$p$` consists of a pattern variable $x$ and a
pattern $p$. The type of the variable $x$ is the static type $T$ of the pattern $p$.
-This pattern matches any value $v$ matched by the pattern $p$,
-provided the run-time type of $v$ is also an instance of $T$,
+This pattern matches any value $v$ matched by the pattern $p$,
+provided the run-time type of $v$ is also an instance of $T$,
and it binds the variable name to that value.
### Literal Patterns
@@ -100,7 +99,7 @@ and it binds the variable name to that value.
```
A literal pattern $L$ matches any value that is equal (in terms of
-$==$) to the literal $L$. The type of $L$ must conform to the
+`==`) to the literal $L$. The type of $L$ must conform to the
expected type of the pattern.
### Stable Identifier Patterns
@@ -175,7 +174,7 @@ repeated parameter. This is further discussed [here](#pattern-sequences).
```
A tuple pattern `($p_1 , \ldots , p_n$)` is an alias
-for the constructor pattern `scala.Tuple$n$($p_1 , \ldots , p_n$)`,
+for the constructor pattern `scala.Tuple$n$($p_1 , \ldots , p_n$)`,
where $n \geq 2$. The empty tuple
`()` is the unique value of type `scala.Unit`.
@@ -196,14 +195,14 @@ $x(p_1 , \ldots , p_n)$ if it takes exactly one argument and one of
the following applies:
* $n=0$ and `unapply`'s result type is `Boolean`. In this case
- the extractor pattern matches all values $v$ for which
+ the extractor pattern matches all values $v$ for which
`$x$.unapply($v$)` yields `true`.
* $n=1$ and `unapply`'s result type is `Option[$T$]`, for some
type $T$. In this case, the (only) argument pattern $p_1$ is typed in
turn with expected type $T$. The extractor pattern matches then all
values $v$ for which `$x$.unapply($v$)` yields a value of form
`Some($v_1$)`, and $p_1$ matches $v_1$.
-* $n>1$ and `unapply`'s result type is
+* $n>1$ and `unapply`'s result type is
`Option[($T_1 , \ldots , T_n$)]`, for some
types $T_1 , \ldots , T_n$. In this case, the argument patterns $p_1
, \ldots , p_n$ are typed in turn with expected types $T_1 , \ldots ,
@@ -250,7 +249,7 @@ First, in a constructor pattern $c(q_1 , \ldots , q_m, p_1 , \ldots , p_n)$, whe
Second, in an extractor pattern $x(q_1 , \ldots , q_m, p_1 , \ldots , p_n)$ if the extractor object $x$ does not have an `unapply` method,
but it does define an `unapplySeq` method with a result type conforming to `Option[(T_1, ... , T_m, Seq[S])]` (if `m = 0`, the type `Option[Seq[S]]` is also accepted). The expected type for the patterns $p_i$ is $S$.
-The last pattern in a pattern sequence may be a _sequence wildcard_ `_*`.
+The last pattern in a pattern sequence may be a _sequence wildcard_ `_*`.
Each element pattern $p_i$ is type-checked with
$S$ as expected type, unless it is a sequence wildcard. If a final
sequence wildcard is present, the pattern matches all values $v$ that
@@ -268,8 +267,8 @@ p_n$.
An infix operation pattern $p;\mathit{op};q$ is a shorthand for the
constructor or extractor pattern $\mathit{op}(p, q)$. The precedence and
-associativity of operators in patterns is the same as in
-[expressions](06-expressions.html#prefix-infix-and-postfix-operations).
+associativity of operators in patterns is the same as in
+[expressions](06-expressions.html#prefix,-infix,-and-postfix-operations).
An infix operation pattern $p;\mathit{op};(q_1 , \ldots , q_n)$ is a
shorthand for the constructor or extractor pattern $\mathit{op}(p, q_1
@@ -284,7 +283,7 @@ shorthand for the constructor or extractor pattern $\mathit{op}(p, q_1
A pattern alternative `$p_1$ | $\ldots$ | $p_n$`
consists of a number of alternative patterns $p_i$. All alternative
patterns are type checked with the expected type of the pattern. They
-may no bind variables other than wildcards. The alternative pattern
+may no bind variables other than wildcards. The alternative pattern
matches a value $v$ if at least one its alternatives matches $v$.
### XML Patterns
@@ -315,7 +314,7 @@ A pattern $p$ is _irrefutable_ for a type $T$, if one of the following applies:
1. $p$ is a typed pattern $x: T'$, and $T <: T'$,
1. $p$ is a constructor pattern $c(p_1 , \ldots , p_n)$, the type $T$
is an instance of class $c$, the [primary constructor](05-classes-and-objects.html#class-definitions)
- of type $T$ has argument types $T_1 , \ldots , T_n$, and each $p_i$ is
+ of type $T$ has argument types $T_1 , \ldots , T_n$, and each $p_i$ is
irrefutable for $T_i$.
## Type Patterns
@@ -324,18 +323,18 @@ A pattern $p$ is _irrefutable_ for a type $T$, if one of the following applies:
TypePat ::= Type
```
-Type patterns consist of types, type variables, and wildcards.
+Type patterns consist of types, type variables, and wildcards.
A type pattern $T$ is of one of the following forms:
* A reference to a class $C$, $p.C$, or `$T$#$C$`. This
- type pattern matches any non-null instance of the given class.
+ type pattern matches any non-null instance of the given class.
Note that the prefix of the class, if it is given, is relevant for determining
class instances. For instance, the pattern $p.C$ matches only
instances of classes $C$ which were created with the path $p$ as
prefix.
The bottom types `scala.Nothing` and `scala.Null` cannot
- be used as type patterns, because they would match nothing in any case.
+ be used as type patterns, because they would match nothing in any case.
* A singleton type `$p$.type`. This type pattern matches only the value
denoted by the path $p$ (that is, a pattern match involved a
@@ -346,7 +345,7 @@ A type pattern $T$ is of one of the following forms:
the type patterns $T_i$.
* A parameterized type pattern $T[a_1 , \ldots , a_n]$, where the $a_i$
- are type variable patterns or wildcards $\_$.
+ are type variable patterns or wildcards `_`.
This type pattern matches all values which match $T$ for
some arbitrary instantiation of the type variables and wildcards. The
bounds or alias type of these type variable are determined as
@@ -356,8 +355,7 @@ A type pattern $T$ is of one of the following forms:
$T_1$ is a type pattern. This type pattern matches any non-null instance
of type `scala.Array$[U_1]$`, where $U_1$ is a type matched by $T_1$.
-
-Types which are not of one of the forms described above are also
+Types which are not of one of the forms described above are also
accepted as type patterns. However, such type patterns will be translated to their
[erasure](03-types.html#type-erasure). The Scala
compiler will issue an "unchecked" warning for these patterns to
@@ -373,66 +371,66 @@ bound type variables in a typed pattern or constructor
pattern. Inference takes into account the expected type of the
pattern.
-
### 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
+$T'$ are renamed to fresh variable names. Let $a_1 , \ldots , a_n$ be
the type variables in $T$. These type variables are considered bound
in the pattern. Let the expected type of the pattern be $\mathit{pt}$.
Type parameter inference constructs first a set of subtype constraints over
-the type variables $a_i$. The initial constraints set $\mathcal{C}_0$ reflects
+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
-
-| | | | |
-|-------------|------|---------------|------------------------|
-|$a_i$ | $<:$ | $\sigma U_i$ | $(i = 1, \ldots , n)$ |
-|$\sigma L_i$ | $<:$ | $a_i$ | $(i = 1 , \ldots , n)$ |
+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
+$$
+\begin{cases}
+a_i &<: \sigma U_i & \quad (i = 1, \ldots , n) \\\\
+\sigma L_i &<: a_i & \quad (i = 1, \ldots , n)
+\end{cases}
+$$
-where $\sigma$ is the substitution $[a'_1 := a_1 , \ldots , a'_n :=
-a_n]$.
+where $\sigma$ is the substitution $[a_1' := a_1 , \ldots , a_n' :=a_n]$.
The set $\mathcal{C}_0$ is then augmented by further subtype constraints. There are two
cases.
###### 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}$.
+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
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
the pattern. Let the set of such type parameters be $b_1 , \ldots ,
-b_m$. Let $\mathcal{C}'_0$ be the subtype constraints reflecting the bounds of the
+b_m$. Let $\mathcal{C}\_0'$ be the subtype constraints reflecting the bounds of the
type variables $b_i$. If $T$ denotes an instance type of a final
-class, let $\mathcal{C}_2$ be the weakest set of subtype constraints over the type
+class, let $\mathcal{C}\_2$ be the weakest set of subtype constraints over the type
variables $a_1 , \ldots , a_n$ and $b_1 , \ldots , b_m$ such that
-$\mathcal{C}_0 \wedge \mathcal{C}'_0 \wedge \mathcal{C}_2$ implies that $T$ conforms to
+$\mathcal{C}\_0 \wedge \mathcal{C}\_0' \wedge \mathcal{C}\_2$ implies that $T$ conforms to
$\mathit{pt}$. If $T$ does not denote an instance type of a final class,
-let $\mathcal{C}_2$ be the weakest set of subtype constraints over the type variables
-$a_1 , \ldots , a_n$ and $b_1 , \ldots , b_m$ such that $\mathcal{C}_0 \wedge
-\mathcal{C}'_0 \wedge \mathcal{C}_2$ implies that it is possible to construct a type
+let $\mathcal{C}\_2$ be the weakest set of subtype constraints over the type variables
+$a_1 , \ldots , a_n$ and $b_1 , \ldots , b_m$ such that $\mathcal{C}\_0 \wedge
+\mathcal{C}\_0' \wedge \mathcal{C}\_2$ implies that it is possible to construct a type
$T'$ which conforms to both $T$ and $\mathit{pt}$. It is a static error if
-there is no satisfiable set of constraints $\mathcal{C}_2$ with this property.
+there is no satisfiable set of constraints $\mathcal{C}\_2$ with this property.
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
-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$.
+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
-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
-$b_j >: L'_j <: U'_j$ for $j = 1 , \ldots , m$
-implies $\mathcal{C}_0 \wedge \mathcal{C}'_0 \wedge \mathcal{C}_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
+$b_j >: L_j' <: U_j'$ for $j = 1 , \ldots , m$
+implies $\mathcal{C}\_0 \wedge \mathcal{C}\_0' \wedge \mathcal{C}_2$.
In both cases, local type inference is permitted to limit the
complexity of inferred bounds. Minimality and maximality of types have
@@ -495,7 +493,6 @@ list `x` contains elements other than strings. The Scala
compiler will flag this potential loss of type-safety with an
"unchecked" warning message.
-
###### Example
Consider the program fragment
@@ -519,7 +516,6 @@ the case clause as an abstract type with lower and upper bound
`y.n`, of type `Int`, is found to conform to the
function's declared result type, `Number`.
-
## Pattern Matching Expressions
```ebnf
@@ -537,12 +533,12 @@ e match { case $p_1$ => $b_1$ $\ldots$ case $p_n$ => $b_n$ }
consists of a selector expression $e$ and a number $n > 0$ of
cases. Each case consists of a (possibly guarded) pattern $p_i$ and a
block $b_i$. Each $p_i$ might be complemented by a guard
-`if $e$` where $e$ is a boolean expression.
+`if $e$` where $e$ is a boolean expression.
The scope of the pattern
variables in $p_i$ comprises the pattern's guard and the corresponding block $b_i$.
Let $T$ be the type of the selector expression $e$ and let $a_1
-, \ldots , a_m$ be the type parameters of all methods enclosing
+, \ldots , a_m$ be the type parameters of all methods enclosing
the pattern matching expression. For every $a_i$, let $L_i$ be its
lower bound and $U_i$ be its higher bound. Every pattern $p \in \{p_1, , \ldots , p_n\}$
can be typed in two ways. First, it is attempted
@@ -552,16 +548,16 @@ $T$ by replacing every occurrence of a type parameter $a_i$ by
\mbox{\sl undefined}. If this second step fails also, a compile-time
error results. If the second step succeeds, let $T_p$ be the type of
pattern $p$ seen as an expression. One then determines minimal bounds
-$L'_1 , \ldots , L'_m$ and maximal bounds $U'_1 , \ldots , U'_m$ such
-that for all $i$, $L_i <: L'_i$ and $U'_i <: U_i$ and the following
+$L_11 , \ldots , L_m'$ and maximal bounds $U_1' , \ldots , U_m'$ such
+that for all $i$, $L_i <: L_i'$ and $U_i' <: U_i$ and the following
constraint system is satisfied:
$$L_1 <: a_1 <: U_1\;\wedge\;\ldots\;\wedge\;L_m <: a_m <: U_m \ \Rightarrow\ T_p <: T$$
If no such bounds can be found, a compile time error results. If such
bounds are found, the pattern matching clause starting with $p$ is
-then typed under the assumption that each $a_i$ has lower bound $L'_i$
-instead of $L_i$ and has upper bound $U'_i$ instead of $U_i$.
+then typed under the assumption that each $a_i$ has lower bound $L_i'$
+instead of $L_i$ and has upper bound $U_i'$ instead of $U_i$.
The expected type of every block $b_i$ is the expected type of the
whole pattern matching expression. The type of the pattern matching
@@ -571,7 +567,7 @@ $b_i$.
When applying a pattern matching expression to a selector value,
patterns are tried in sequence until one is found which matches the
-[selector value](#patterns). Say this case is `$case p_i \Rightarrow b_i$`.
+[selector value](#patterns). Say this case is `case $p_i \Rightarrow b_i$`.
The result of the whole expression is the result of evaluating $b_i$,
where all pattern variables of $p_i$ are bound to
the corresponding parts of the selector value. If no matching pattern
@@ -595,7 +591,7 @@ If the selector of a pattern match is an instance of a
[`sealed` class](05-classes-and-objects.html#modifiers),
the compilation of pattern matching can emit warnings which diagnose
that a given set of patterns is not exhaustive, i.e. that there is a
-possibility of a `MatchError` being raised at run-time.
+possibility of a `MatchError` being raised at run-time.
### Example
@@ -637,14 +633,13 @@ Under the assumption `Int <: T <: Int` we can also
verify that the type right hand side of the second case, `Int`
conforms to its expected type, `T`.
-
## Pattern Matching Anonymous Functions
```ebnf
BlockExpr ::= `{' CaseClauses `}'
```
-An anonymous function can be defined by a sequence of cases
+An anonymous function can be defined by a sequence of cases
```scala
{ case $p_1$ => $b_1$ $\ldots$ case $p_n$ => $b_n$ }
@@ -661,8 +656,8 @@ If the expected type is `scala.Function$k$[$S_1 , \ldots , S_k$, $R$]`,
the expression is taken to be equivalent to the anonymous function:
```scala
-($x_1: S_1 , \ldots , x_k: S_k$) => ($x_1 , \ldots , x_k$) match {
- case $p_1$ => $b_1$ $\ldots$ case $p_n$ => $b_n$
+($x_1: S_1 , \ldots , x_k: S_k$) => ($x_1 , \ldots , x_k$) match {
+ case $p_1$ => $b_1$ $\ldots$ case $p_n$ => $b_n$
}
```
@@ -719,4 +714,3 @@ anonymous function:
case (a, (b, c)) => a + b * c
}
```
-
diff --git a/spec/09-top-level-definitions.md b/spec/09-top-level-definitions.md
index b9c78b23a1..847fab548d 100644
--- a/spec/09-top-level-definitions.md
+++ b/spec/09-top-level-definitions.md
@@ -23,7 +23,7 @@ A compilation unit consists of a sequence of packagings, import
clauses, and class and object definitions, which may be preceded by a
package clause.
-A compilation unit
+A compilation unit
```scala
package $p_1$;
@@ -34,7 +34,7 @@ $\mathit{stats}$
starting with one or more package
clauses is equivalent to a compilation unit consisting of the
-packaging
+packaging
```scala
package $p_1$ { $\ldots$
@@ -94,7 +94,6 @@ into a special empty package. That package cannot be named and
therefore cannot be imported. However, members of the empty package
are visible to each other without qualification.
-
## Package Objects
```ebnf
@@ -113,7 +112,6 @@ there is a name conflict, the behavior of the program is currently
undefined. It is expected that this restriction will be lifted in a
future version of Scala.
-
## Package References
```ebnf
@@ -121,12 +119,12 @@ QualId ::= id {‘.’ id}
```
A reference to a package takes the form of a qualified identifier.
-Like all other references, package references are relative. That is,
+Like all other references, package references are relative. That is,
a package reference starting in a name $p$ will be looked up in the
closest enclosing scope that defines a member named $p$.
The special predefined name `_root_` refers to the
-outermost root package which contains all top-level packages.
+outermost root package which contains all top-level packages.
###### Example
Consider the following program:
@@ -149,7 +147,6 @@ omitted, the name `b` would instead resolve to the package
`a.b`, and, provided that package does not also
contain a class `B`, a compiler-time error would result.
-
## Programs
A _program_ is a top-level object that has a member method
@@ -161,7 +158,7 @@ passed to the `main` method as a parameter of type
The `main` method of a program can be directly defined in the
object, or it can be inherited. The scala library defines a special class
`scala.App` whose body acts as a `main` method.
-An objects $m$ inheriting from this class is thus a program,
+An objects $m$ inheriting from this class is thus a program,
which executes the initializaton code of the object $m$.
###### Example
@@ -198,4 +195,3 @@ object HelloWorld extends App {
println("Hello World")
}
```
-
diff --git a/spec/10-xml-expressions-and-patterns.md b/spec/10-xml-expressions-and-patterns.md
index d8c45ecf85..069f499ce9 100644
--- a/spec/10-xml-expressions-and-patterns.md
+++ b/spec/10-xml-expressions-and-patterns.md
@@ -14,7 +14,7 @@ changes being mandated by the possibility of embedding Scala code fragments.
## XML expressions
-XML expressions are expressions generated by the following production, where the
+XML expressions are expressions generated by the following production, where the
opening bracket `<` of the first element must be in a position to start the lexical
[XML mode](01-lexical-syntax.html#xml-mode).
@@ -29,18 +29,18 @@ 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.
+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.
```ebnf
Element ::= EmptyElemTag
- | STag Content ETag
+ | STag Content ETag
-EmptyElemTag ::= ‘<’ Name {S Attribute} [S] ‘/>’
+EmptyElemTag ::= ‘<’ Name {S Attribute} [S] ‘/>’
-STag ::= ‘<’ Name {S Attribute} [S] ‘>’
-ETag ::= ‘</’ Name [S] ‘>’
+STag ::= ‘<’ Name {S Attribute} [S] ‘>’
+ETag ::= ‘</’ Name [S] ‘>’
Content ::= [CharData] {Content1 [CharData]}
Content1 ::= XmlContent
| Reference
@@ -52,23 +52,23 @@ XmlContent ::= Element
```
If an XML expression is a single element, its value is a runtime
-representation of an XML node (an instance of a subclass of
+representation of an XML node (an instance of a subclass of
`scala.xml.Node`). If the XML expression consists of more
than one element, then its value is a runtime representation of a
-sequence of XML nodes (an instance of a subclass of
+sequence of XML nodes (an instance of a subclass of
`scala.Seq[scala.xml.Node]`).
-If an XML expression is an entity reference, CDATA section, processing
-instructions or a comments, it is represented by an instance of the
+If an XML expression is an entity reference, CDATA section, processing
+instructions or a comments, it is represented by an instance of the
corresponding Scala runtime class.
-By default, beginning and trailing whitespace in element content is removed,
+By default, beginning and trailing whitespace in element content is removed,
and consecutive occurrences of whitespace are replaced by a single space
character `\u0020`. This behavior can be changed to preserve all whitespace
with a compiler option.
```ebnf
-Attribute ::= Name Eq AttValue
+Attribute ::= Name Eq AttValue
AttValue ::= ‘"’ {CharQ | CharRef} ‘"’
| ‘'’ {CharA | CharRef} ‘'’
@@ -76,13 +76,13 @@ AttValue ::= ‘"’ {CharQ | CharRef} ‘"’
ScalaExpr ::= Block
-CharData ::= { CharNoRef } $\mbox{\rm\em without}$ {CharNoRef}`{'CharB {CharNoRef}
- $\mbox{\rm\em and without}$ {CharNoRef}`]]>'{CharNoRef}
+CharData ::= { CharNoRef } $\textit{ without}$ {CharNoRef}`{'CharB {CharNoRef}
+ $\textit{ and without}$ {CharNoRef}`]]>'{CharNoRef}
```
<!-- {% raw %} stupid liquid borks on the double brace below; brace yourself, liquid! -->
XML expressions may contain Scala expressions as attribute values or
-within nodes. In the latter case, these are embedded using a single opening
+within nodes. In the latter case, these are embedded using a single opening
brace `{` and ended by a closing brace `}`. To express a single opening braces
within XML text as generated by CharData, it must be doubled.
Thus, `{{` represents the XML text `{` and does not introduce an embedded Scala expression.
@@ -90,17 +90,17 @@ Thus, `{{` represents the XML text `{` and does not introduce an embedded Scala
```ebnf
BaseChar, Char, Comment, CombiningChar, Ideographic, NameChar, S, Reference
- ::= $\mbox{\rm\em “as in W3C XML”}$
+ ::= $\textit{“as in W3C XML”}$
-Char1 ::= Char $\mbox{\rm\em without}$ ‘<’ | ‘&’
-CharQ ::= Char1 $\mbox{\rm\em without}$ ‘"’
-CharA ::= Char1 $\mbox{\rm\em without}$ ‘'’
-CharB ::= Char1 $\mbox{\rm\em without}$ ‘{’
+Char1 ::= Char $\textit{ without}$ ‘<’ | ‘&’
+CharQ ::= Char1 $\textit{ without}$ ‘"’
+CharA ::= Char1 $\textit{ without}$ ‘'’
+CharB ::= Char1 $\textit{ without}$ ‘{’
Name ::= XNameStart {NameChar}
-XNameStart ::= ‘_’ | BaseChar | Ideographic
- $\mbox{\rm\em (as in W3C XML, but without }$ ‘:’
+XNameStart ::= ‘_’ | BaseChar | Ideographic
+ $\textit{ (as in W3C XML, but without }$ ‘:’$)$
```
## XML patterns
@@ -110,7 +110,7 @@ the opening bracket `<` of the element patterns must be in a position
to start the lexical [XML mode](01-lexical-syntax.html#xml-mode).
```ebnf
-XmlPattern ::= ElementPattern
+XmlPattern ::= ElementPattern
```
Well-formedness constraints of the XML specification apply.
@@ -123,18 +123,18 @@ XML patterns may contain [Scala patterns](08-pattern-matching.html#pattern-match
Whitespace is treated the same way as in XML expressions.
-By default, beginning and trailing whitespace in element content is removed,
+By default, beginning and trailing whitespace in element content is removed,
and consecutive occurrences of whitespace are replaced by a single space
character `\u0020`. This behavior can be changed to preserve all whitespace
with a compiler option.
```ebnf
ElemPattern ::= EmptyElemTagP
- | STagP ContentP ETagP
+ | STagP ContentP ETagP
EmptyElemTagP ::= ‘<’ Name [S] ‘/>’
-STagP ::= ‘<’ Name [S] ‘>’
-ETagP ::= ‘</’ Name [S] ‘>’
+STagP ::= ‘<’ Name [S] ‘>’
+ETagP ::= ‘</’ Name [S] ‘>’
ContentP ::= [CharData] {(ElemPattern|ScalaPatterns) [CharData]}
ContentP1 ::= ElemPattern
| Reference
@@ -144,4 +144,3 @@ ContentP1 ::= ElemPattern
| ScalaPatterns
ScalaPatterns ::= ‘{’ Patterns ‘}’
```
-
diff --git a/spec/11-user-defined-annotations.md b/spec/11-user-defined-annotations.md
index fd7a7f9d3f..2c5830c103 100644
--- a/spec/11-user-defined-annotations.md
+++ b/spec/11-user-defined-annotations.md
@@ -14,7 +14,7 @@ chapter: 11
User-defined annotations associate meta-information with definitions.
A simple annotation has the form `@$c$` or `@$c(a_1 , \ldots , a_n)$`.
Here, $c$ is a constructor of a class $C$, which must conform
-to the class `scala.Annotation`.
+to the class `scala.Annotation`.
Annotations may apply to definitions or declarations, types, or
expressions. An annotation of a definition or declaration appears in
@@ -122,7 +122,6 @@ Java platform, the following annotations have a standard meaning.
When applied to value declarations or definitions that have non-volatile
types, the annotation has no effect.
-
* `@specialized` When applied to the definition of a type parameter, this annotation causes
the compiler
to generate specialized definitions for primitive types. An optional list of
@@ -142,7 +141,6 @@ Java platform, the following annotations have a standard meaning.
a definition, the compiler will instead use the specialized version.
See the [specialization sid](http://docs.scala-lang.org/sips/completed/scala-specialization.html) for more details of the implementation.
-
Other annotations may be interpreted by platform- or
application-dependent tools. Class `scala.Annotation` has two
sub-traits which are used to indicate how these annotations are
@@ -163,4 +161,3 @@ mapped to the host environment. In particular, on both the Java and
the .NET platforms, such classes must be toplevel; i.e. they may not
be contained in another class or object. Additionally, on both
Java and .NET, all constructor arguments must be constant expressions.
-
diff --git a/spec/12-the-scala-standard-library.md b/spec/12-the-scala-standard-library.md
index 9d4d69e52a..2b3ac1742c 100644
--- a/spec/12-the-scala-standard-library.md
+++ b/spec/12-the-scala-standard-library.md
@@ -41,15 +41,15 @@ The signatures of these root classes are described by the following
definitions.
```scala
-package scala
+package scala
/** The universal root class */
abstract class Any {
/** Defined equality; abstract here */
- def equals(that: Any): Boolean
+ def equals(that: Any): Boolean
/** Semantic equality between values */
- final def == (that: Any): Boolean =
+ final def == (that: Any): Boolean =
if (null eq this) null eq that else this equals that
/** Semantic inequality between values */
@@ -73,11 +73,11 @@ abstract class Any {
}
/** The root class of all value types */
-final class AnyVal extends Any
+final class AnyVal extends Any
/** The root class of all reference types */
class AnyRef extends Any {
- def equals(that: Any): Boolean = this eq that
+ def equals(that: Any): Boolean = this eq that
final def eq(that: AnyRef): Boolean = $\ldots$ // reference equality
final def ne(that: AnyRef): Boolean = !(this eq that)
@@ -85,9 +85,9 @@ class AnyRef extends Any {
def toString: String = $\ldots$ // toString computed from hashCode and class name
def synchronized[T](body: => T): T // execute `body` in while locking `this`.
-}
+}
+```
-```scala
The type test `$x$.isInstanceOf[$T$]` is equivalent to a typed
pattern match
@@ -103,10 +103,9 @@ of the form $D$ or $D[\mathit{tps}]$ where $D$ is a type member of some outer cl
In this case $T'$ is `$C$#$D$` (or `$C$#$D[tps]$`, respectively), whereas $T$ itself would expand to `$C$.this.$D[tps]$`.
In other words, an `isInstanceOf` test does not check that types have the same enclosing instance.
-
The test `$x$.asInstanceOf[$T$]` is treated specially if $T$ is a
[numeric value type](#value-classes). In this case the cast will
-be translated to an application of a [conversion method](#numeric-value-types)
+be translated to an application of a [conversion method](#numeric-value-types)
`x.to$T$`. For non-numeric values $x$ the operation will raise a
`ClassCastException`.
@@ -131,19 +130,19 @@ Subrange types, as well as `Int` and `Long` are called _integer types_, whereas
Numeric value types are ranked in the following partial order:
```scala
-Byte - Short
+Byte - Short
\
Int - Long - Float - Double
- /
- Char
+ /
+ Char
```
-`Byte` and `Short` are the lowest-ranked types in this order,
+`Byte` and `Short` are the lowest-ranked types in this order,
whereas `Double` is the highest-ranked. Ranking does _not_
imply a [conformance relationship](03-types.html#conformance); for
instance `Int` is not a subtype of `Long`. However, object
[`Predef`](#the-predef-object) defines [views](07-implicit-parameters-and-views.html#views)
-from every numeric value type to all higher-ranked numeric value types.
+from every numeric value type to all higher-ranked numeric value types.
Therefore, lower-ranked types are implicitly converted to higher-ranked types
when required by the [context](06-expressions.html#implicit-conversions).
@@ -182,7 +181,7 @@ Any numeric value type $T$ supports the following methods.
numeric value (as when going from `Long` to `Int` or from
`Int` to `Byte`) or it might lose precision (as when going
from `Double` to `Float` or when converting between
- `Long` and `Float`).
+ `Long` and `Float`).
Integer numeric value types support in addition the following operations:
@@ -228,7 +227,7 @@ def equals(other: Any): Boolean = other match {
```
The `hashCode` method returns an integer hashcode that maps equal
-numeric values to equal results. It is guaranteed to be the identity for
+numeric values to equal results. It is guaranteed to be the identity for
for type `Int` and for all subrange types.
The `toString` method displays its receiver as an integer or
@@ -284,7 +283,6 @@ abstract sealed class Int extends AnyVal {
}
```
-
### Class `Boolean`
Class `Boolean` has only two values: `true` and
@@ -292,7 +290,7 @@ Class `Boolean` has only two values: `true` and
class definition.
```scala
-package scala
+package scala
abstract sealed class Boolean extends AnyVal {
def && (p: => Boolean): Boolean = // boolean and
if (this) p else false
@@ -316,7 +314,7 @@ and `toString` from class `Any`.
The `equals` method returns `true` if the argument is the
same boolean value as the receiver, `false` otherwise. The
-`hashCode` method returns a fixed, implementation-specific hash-code when invoked on `true`,
+`hashCode` method returns a fixed, implementation-specific hash-code when invoked on `true`,
and a different, fixed, implementation-specific hash-code when invoked on `false`. The `toString` method
returns the receiver converted to a string, i.e. either `"true"` or `"false"`.
@@ -328,7 +326,7 @@ from class `Any`.
The `equals` method returns `true` if the argument is the
unit value `()`, `false` otherwise. The
-`hashCode` method returns a fixed, implementation-specific hash-code,
+`hashCode` method returns a fixed, implementation-specific hash-code,
The `toString` method returns `"()"`.
## Standard Reference Classes
@@ -347,7 +345,7 @@ it). For Scala clients the class is taken to support in each case a
method
```scala
-def + (that: Any): String
+def + (that: Any): String
```
which concatenates its left operand with the textual representation of its
@@ -359,7 +357,7 @@ Scala defines tuple classes `Tuple$n$` for $n = 2 , \ldots , 22$.
These are defined as follows.
```scala
-package scala
+package scala
case class Tuple$n$[+T_1, ..., +T_n](_1: T_1, ..., _$n$: T_$n$) {
def toString = "(" ++ _1 ++ "," ++ $\ldots$ ++ "," ++ _$n$ ++ ")"
}
@@ -375,10 +373,10 @@ Scala defines function classes `Function$n$` for $n = 1 , \ldots , 22$.
These are defined as follows.
```scala
-package scala
+package scala
trait Function$n$[-T_1, ..., -T_$n$, +R] {
def apply(x_1: T_1, ..., x_$n$: T_$n$): R
- def toString = "<function>"
+ def toString = "<function>"
}
```
@@ -391,7 +389,7 @@ class PartialFunction[-A, +B] extends Function1[A, B] {
}
```
-The implicitly imported [`Predef`](#the-predef-object) object defines the name
+The implicitly imported [`Predef`](#the-predef-object) object defines the name
`Function` as an alias of `Function1`.
### Class `Array`
@@ -449,8 +447,8 @@ explained in the following.
#### Variance
Unlike arrays in Java, arrays in Scala are _not_
-co-variant; That is, $S <: T$ does not imply
-`Array[$S$] $<:$ Array[$T$]` in Scala.
+co-variant; That is, $S <: T$ does not imply
+`Array[$S$] $<:$ Array[$T$]` in Scala.
However, it is possible to cast an array
of $S$ to an array of $T$ if such a cast is permitted in the host
environment.
@@ -505,7 +503,7 @@ over arrays and additional utility methods:
```scala
package scala
-object Array {
+object Array {
/** copies array elements from `src` to `dest`. */
def copy(src: AnyRef, srcPos: Int,
dest: AnyRef, destPos: Int, length: Int): Unit = $\ldots$
@@ -557,36 +555,36 @@ object Array {
## Class Node
```scala
-package scala.xml
+package scala.xml
trait Node {
/** the label of this node */
- def label: String
+ def label: String
/** attribute axis */
- def attribute: Map[String, String]
+ def attribute: Map[String, String]
/** child axis (all children of this node) */
- def child: Seq[Node]
+ def child: Seq[Node]
/** descendant axis (all descendants of this node) */
- def descendant: Seq[Node] = child.toList.flatMap {
- x => x::x.descendant.asInstanceOf[List[Node]]
- }
+ def descendant: Seq[Node] = child.toList.flatMap {
+ x => x::x.descendant.asInstanceOf[List[Node]]
+ }
/** descendant axis (all descendants of this node) */
- def descendant_or_self: Seq[Node] = this::child.toList.flatMap {
- x => x::x.descendant.asInstanceOf[List[Node]]
- }
+ def descendant_or_self: Seq[Node] = this::child.toList.flatMap {
+ x => x::x.descendant.asInstanceOf[List[Node]]
+ }
override def equals(x: Any): Boolean = x match {
- case that:Node =>
- that.label == this.label &&
- that.attribute.sameElements(this.attribute) &&
+ case that:Node =>
+ that.label == this.label &&
+ that.attribute.sameElements(this.attribute) &&
that.child.sameElements(this.child)
case _ => false
- }
+ }
/** XPath style projection function. Returns all children of this node
* that are labeled with 'that'. The document order is preserved.
@@ -594,40 +592,39 @@ trait Node {
def \(that: Symbol): NodeSeq = {
new NodeSeq({
that.name match {
- case "_" => child.toList
+ case "_" => child.toList
case _ =>
- var res:List[Node] = Nil
+ var res:List[Node] = Nil
for (x <- child.elements if x.label == that.name) {
- res = x::res
+ res = x::res
}
res.reverse
}
- })
+ })
}
- /** XPath style projection function. Returns all nodes labeled with the
+ /** XPath style projection function. Returns all nodes labeled with the
* name 'that' from the 'descendant_or_self' axis. Document order is preserved.
*/
def \\(that: Symbol): NodeSeq = {
new NodeSeq(
that.name match {
- case "_" => this.descendant_or_self
+ case "_" => this.descendant_or_self
case _ => this.descendant_or_self.asInstanceOf[List[Node]].
- filter(x => x.label == that.name)
+ filter(x => x.label == that.name)
})
}
/** hashcode for this XML node */
- override def hashCode =
- Utility.hashCode(label, attribute.toList.hashCode, child)
+ override def hashCode =
+ Utility.hashCode(label, attribute.toList.hashCode, child)
/** string representation of this node */
- override def toString = Utility.toXML(this)
+ override def toString = Utility.toXML(this)
}
```
-
## The `Predef` Object
The `Predef` object defines standard functions and type aliases
@@ -642,7 +639,7 @@ object Predef {
// classOf ---------------------------------------------------------
/** Returns the runtime representation of a class type. */
- def classOf[T]: Class[T] = null
+ def classOf[T]: Class[T] = null
// this is a dummy, classOf is handled by compiler.
// Standard type aliases ---------------------------------------------
@@ -651,7 +648,7 @@ object Predef {
type Class[T] = java.lang.Class[T]
// Miscellaneous -----------------------------------------------------
-
+
type Function[-A, +B] = Function1[A, B]
type Map[A, +B] = collection.immutable.Map[A, B]
@@ -668,7 +665,7 @@ object Predef {
val ClassManifest = scala.reflect.ClassManifest
val Manifest = scala.reflect.Manifest
val NoManifest = scala.reflect.NoManifest
-
+
def manifest[T](implicit m: Manifest[T]) = m
def classManifest[T](implicit m: ClassManifest[T]) = m
def optManifest[T](implicit m: OptManifest[T]) = m
@@ -711,7 +708,6 @@ object Predef {
}
```
-
```scala
// tupling ---------------------------------------------------------
@@ -755,13 +751,12 @@ object Predef {
}
```
-
### Predefined Implicit Definitions
The `Predef` object also contains a number of implicit definitions, which are available by default (because `Predef` is implicitly imported).
-Implicit definitions come in two priorities. High-priority implicits are defined in the `Predef` class itself whereas low priority implicits are defined in a class inherited by `Predef`. The rules of
+Implicit definitions come in two priorities. High-priority implicits are defined in the `Predef` class itself whereas low priority implicits are defined in a class inherited by `Predef`. The rules of
static [overloading resolution](06-expressions.html#overloading-resolution)
-stipulate that, all other things being equal, implicit resolution
+stipulate that, all other things being equal, implicit resolution
prefers high-priority implicits over low-priority ones.
The available low-priority implicits include definitions falling into the following categories.
@@ -777,13 +772,12 @@ The available low-priority implicits include definitions falling into the follow
1. An implicit conversion from `String` to `WrappedString`.
-
The available high-priority implicits include definitions falling into the following categories.
- * An implicit wrapper that adds `ensuring` methods
+ * An implicit wrapper that adds `ensuring` methods
with the following overloaded variants to type `Any`.
- ```
+ ```
def ensuring(cond: Boolean): A = { assert(cond); x }
def ensuring(cond: Boolean, msg: Any): A = { assert(cond, msg); x }
def ensuring(cond: A => Boolean): A = { assert(cond(x)); x }
@@ -793,7 +787,7 @@ The available high-priority implicits include definitions falling into the follo
* An implicit wrapper that adds a `->` method with the following implementation
to type `Any`.
- ```
+ ```
def -> [B](y: B): (A, B) = (x, y)
```
@@ -807,12 +801,12 @@ The available high-priority implicits include definitions falling into the follo
* An implicit wrapper that adds `+` and `formatted` method with the following
implementations to type `Any`.
- ```
+ ```
def +(other: String) = String.valueOf(self) + other
def formatted(fmtstr: String): String = fmtstr format self
```
- * Numeric primitive conversions that implement the transitive closure of the
+ * Numeric primitive conversions that implement the transitive closure of the
following mappings:
```
@@ -824,7 +818,7 @@ The available high-priority implicits include definitions falling into the follo
Float -> Double
```
- * Boxing and unboxing conversions between primitive types and their boxed
+ * Boxing and unboxing conversions between primitive types and their boxed
versions:
```
@@ -841,9 +835,8 @@ The available high-priority implicits include definitions falling into the follo
* An implicit definition that generates instances of type `T <:< T`, for
any type `T`. Here, `<:<` is a class defined as follows.
- ```
+ ```
sealed abstract class <:<[-From, +To] extends (From => To)
```
Implicit parameters of `<:<` types are typically used to implement type constraints.
-
diff --git a/spec/13-syntax-summary.md b/spec/13-syntax-summary.md
index 3eecc26eb4..86efcf70a8 100644
--- a/spec/13-syntax-summary.md
+++ b/spec/13-syntax-summary.md
@@ -30,7 +30,7 @@ opchar ::= // printableChar not matched by (whiteSpace | upper | lower
printableChar ::= // all characters in [\u0020, \u007F] inclusive
charEscapeSeq ::= ‘\‘ (‘b‘ | ‘t‘ | ‘n‘ | ‘f‘ | ‘r‘ | ‘"‘ | ‘'‘ | ‘\‘)
-op ::= opchar {opchar}
+op ::= opchar {opchar}
varid ::= lower idrest
plainid ::= upper idrest
| varid
@@ -45,7 +45,7 @@ hexNumeral ::= ‘0’ ‘x’ hexDigit {hexDigit}
digit ::= ‘0’ | nonZeroDigit
nonZeroDigit ::= ‘1’ | … | ‘9’
-floatingPointLiteral
+floatingPointLiteral
::= digit {digit} ‘.’ digit {digit} [exponentPart] [floatType]
| ‘.’ digit {digit} [exponentPart] [floatType]
| digit {digit} exponentPart [floatType]
@@ -99,7 +99,7 @@ grammar.
FunctionArgTypes ::= InfixType
| ‘(’ [ ParamType {‘,’ ParamType } ] ‘)’
ExistentialClause ::= ‘forSome’ ‘{’ ExistentialDcl {semi ExistentialDcl} ‘}’
- ExistentialDcl ::= ‘type’ TypeDcl
+ ExistentialDcl ::= ‘type’ TypeDcl
| ‘val’ ValDcl
InfixType ::= CompoundType {id [nl] CompoundType}
CompoundType ::= AnnotType {‘with’ AnnotType} [Refinement]
@@ -119,7 +119,7 @@ grammar.
TypePat ::= Type
Ascription ::= ‘:’ InfixType
- | ‘:’ Annotation {Annotation}
+ | ‘:’ Annotation {Annotation}
| ‘:’ ‘_’ ‘*’
Expr ::= (Bindings | [‘implicit’] id | ‘_’) ‘=>’ Expr
@@ -139,7 +139,7 @@ grammar.
PostfixExpr ::= InfixExpr [id [nl]]
InfixExpr ::= PrefixExpr
| InfixExpr id [nl] InfixExpr
- PrefixExpr ::= [‘-’ | ‘+’ | ‘~’ | ‘!’] SimpleExpr
+ PrefixExpr ::= [‘-’ | ‘+’ | ‘~’ | ‘!’] SimpleExpr
SimpleExpr ::= ‘new’ (ClassTemplate | TemplateBody)
| BlockExpr
| SimpleExpr1 [‘_’]
@@ -147,7 +147,7 @@ grammar.
| Path
| ‘_’
| ‘(’ [Exprs] ‘)’
- | SimpleExpr ‘.’ id
+ | SimpleExpr ‘.’ id
| SimpleExpr TypeArgs
| SimpleExpr1 ArgumentExprs
| XmlExpr
@@ -170,7 +170,7 @@ grammar.
Generator ::= Pattern1 ‘<-’ Expr {[semi] Guard | semi Pattern1 ‘=’ Expr}
CaseClauses ::= CaseClause { CaseClause }
- CaseClause ::= ‘case’ Pattern [Guard] ‘=>’ Block
+ CaseClause ::= ‘case’ Pattern [Guard] ‘=>’ Block
Guard ::= ‘if’ PostfixExpr
Pattern ::= Pattern1 { ‘|’ Pattern1 }
@@ -195,16 +195,16 @@ grammar.
TypeParamClause ::= ‘[’ VariantTypeParam {‘,’ VariantTypeParam} ‘]’
FunTypeParamClause::= ‘[’ TypeParam {‘,’ TypeParam} ‘]’
VariantTypeParam ::= {Annotation} [‘+’ | ‘-’] TypeParam
- TypeParam ::= (id | ‘_’) [TypeParamClause] [‘>:’ Type] [‘<:’ Type]
+ TypeParam ::= (id | ‘_’) [TypeParamClause] [‘>:’ Type] [‘<:’ Type]
{‘<%’ Type} {‘:’ Type}
ParamClauses ::= {ParamClause} [[nl] ‘(’ ‘implicit’ Params ‘)’]
ParamClause ::= [nl] ‘(’ [Params] ‘)’
Params ::= Param {‘,’ Param}
Param ::= {Annotation} id [‘:’ ParamType] [‘=’ Expr]
- ParamType ::= Type
- | ‘=>’ Type
+ ParamType ::= Type
+ | ‘=>’ Type
| Type ‘*’
- ClassParamClauses ::= {ClassParamClause}
+ ClassParamClauses ::= {ClassParamClause}
[[nl] ‘(’ ‘implicit’ ClassParams ‘)’]
ClassParamClause ::= [nl] ‘(’ [ClassParams] ‘)’
ClassParams ::= ClassParam {‘,’ ClassParam}
@@ -213,7 +213,7 @@ grammar.
Bindings ::= ‘(’ Binding {‘,’ Binding ‘)’
Binding ::= (id | ‘_’) [‘:’ Type]
- Modifier ::= LocalModifier
+ Modifier ::= LocalModifier
| AccessModifier
| ‘override’
LocalModifier ::= ‘abstract’
@@ -234,7 +234,7 @@ grammar.
| Expr
|
SelfType ::= id [‘:’ Type] ‘=>’
- | ‘this’ ‘:’ Type ‘=>’
+ | ‘this’ ‘:’ Type ‘=>’
Import ::= ‘import’ ImportExpr {‘,’ ImportExpr}
ImportExpr ::= StableId ‘.’ (id | ‘_’ | ImportSelectors)
@@ -263,15 +263,15 @@ grammar.
| ids ‘:’ Type ‘=’ ‘_’
FunDef ::= FunSig [‘:’ Type] ‘=’ Expr
| FunSig [nl] ‘{’ Block ‘}’
- | ‘this’ ParamClause ParamClauses
+ | ‘this’ ParamClause ParamClauses
(‘=’ ConstrExpr | [nl] ConstrBlock)
TypeDef ::= id [TypeParamClause] ‘=’ Type
TmplDef ::= [‘case’] ‘class’ ClassDef
| [‘case’] ‘object’ ObjectDef
| ‘trait’ TraitDef
- ClassDef ::= id [TypeParamClause] {ConstrAnnotation} [AccessModifier]
- ClassParamClauses ClassTemplateOpt
+ ClassDef ::= id [TypeParamClause] {ConstrAnnotation} [AccessModifier]
+ ClassParamClauses ClassTemplateOpt
TraitDef ::= id [TypeParamClause] TraitTemplateOpt
ObjectDef ::= id ClassTemplateOpt
ClassTemplateOpt ::= ‘extends’ ClassTemplate | [[‘extends’] TemplateBody]
@@ -284,7 +284,7 @@ grammar.
EarlyDefs ::= ‘{’ [EarlyDef {semi EarlyDef}] ‘}’ ‘with’
EarlyDef ::= {Annotation [nl]} {Modifier} PatVarDef
- ConstrExpr ::= SelfInvocation
+ ConstrExpr ::= SelfInvocation
| ConstrBlock
ConstrBlock ::= ‘{’ SelfInvocation {semi BlockStat} ‘}’
SelfInvocation ::= ‘this’ ArgumentExprs {ArgumentExprs}
@@ -294,7 +294,7 @@ grammar.
| Import
| Packaging
| PackageObject
- |
+ |
Packaging ::= ‘package’ QualId [nl] ‘{’ TopStatSeq ‘}’
PackageObject ::= ‘package’ ‘object’ ObjectDef
diff --git a/spec/14-references.md b/spec/14-references.md
index 8c169b9ea4..caae5796b2 100644
--- a/spec/14-references.md
+++ b/spec/14-references.md
@@ -4,7 +4,6 @@ layout: default
chapter: 14
---
-
# References
TODO (see comments in markdown source)
@@ -49,7 +48,6 @@ for syntactic definitions?",
month = nov
}
-
%% Book
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -116,7 +114,6 @@ for syntactic definitions?",
OPTannote = {}
}
-
%% InProceedings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -131,7 +128,6 @@ for syntactic definitions?",
\verb@http://www.cis.upenn.edu/~bcpierce/FOOL/FOOL10.html@}
}
-
%% Misc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -208,6 +204,4 @@ for syntactic definitions?",
short = {http://www.cis.upenn.edu/~bcpierce/papers/variance.pdf}
}
-
-
---> \ No newline at end of file
+-->
diff --git a/spec/README.md b/spec/README.md
index 4bba86feba..97c3fdf832 100644
--- a/spec/README.md
+++ b/spec/README.md
@@ -12,19 +12,17 @@ We use redcarpet 3.1 and jekyll 2 (currently in alpha) to generate the html. Ess
## Building
-Travis CI builds the spec automatically on every commit to master and publishes to http://www.scala-lang.org/files/archive/spec/2.11/.
+Travis CI builds the spec automatically on every commit to master and publishes to http://www.scala-lang.org/files/archive/spec/2.11/.
To preview locally, run `bundle exec jekyll serve -d build/spec/ -s spec/ -w --baseurl=""` (in the root of your checkout of scala/scala),
and open http://0.0.0.0:4000/. Jekyll will rebuild as you edit the markdown, but make sure to restart it when you change `_config.yml`.
-
## General Advice for editors
- All files must be saved as UTF-8: ensure your editors are configured appropriately.
- Use of the appropriate unicode characters instead of the latex modifiers for accents, etc. is necessary. For example, é instead of `\'e`.
- MathJAX errors will appear within the rendered DOM as span elements with class `mtext` and style attribute `color: red` applied. It is possible to search for this combination in the development tools of the browser of your choice. In chrome, CTRL+F / CMD+F within the inspect element panel allows you to do this.
-
### Macro replacements:
- While MathJAX just support LaTeX style command definition, it is recommended to not use this as it will likely cause issues with preparing the document for PDF or ebook distribution.
@@ -36,7 +34,6 @@ and open http://0.0.0.0:4000/. Jekyll will rebuild as you edit the markdown, but
- The macro \commadots can be replaced with ` , … , `.
- There is no adequate replacement for `\textsc{...}` (small caps) in pandoc markdown. While unicode contains a number of small capital letters, it is notably missing Q and X as these glyphs are intended for phonetic spelling, therefore these cannot be reliably used. For now, the best option is to use underscore emphasis and capitalise the text manually, `_LIKE THIS_`.
-
### Unicode Character replacements
- The unicode left and right single quotation marks (‘ and ’) have been used in place of ` and ', where the quotation marks are intended to be paired. These can be typed on a mac using Option+] for a left quote and Option+Shift+] for the right quote.
diff --git a/spec/_includes/numbering.css b/spec/_includes/numbering.css
index 86b946354d..8df08098bc 100644
--- a/spec/_includes/numbering.css
+++ b/spec/_includes/numbering.css
@@ -54,3 +54,9 @@ h3[id*='example']:before {
display: inline;
margin-right: 1em;
}
+
+.no-numbering, .no-numbering:before, .no-numbering:after {
+ content: normal;
+ counter-reset: none;
+ counter-increment: none;
+}
diff --git a/spec/_layouts/default.yml b/spec/_layouts/default.yml
index d3296c6f5d..64ba4a1639 100644
--- a/spec/_layouts/default.yml
+++ b/spec/_layouts/default.yml
@@ -2,6 +2,10 @@
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
+
+ <link rel="icon" type="image/png" href="public/favicon.ico">
+ <link rel="shortcut icon" type="image/png" href="public/favicon.ico">
+
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
@@ -13,24 +17,74 @@
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/2.3-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
+ <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.2/styles/default.min.css">
+ <link rel="stylesheet" href="public/octicons/octicons.css">
+ <script src="public/highlight/highlight.pack.js"></script>
+ <script src="public/scripts/navigation.js"></script>
<!-- need to use include to see value of page.chapter variable -->
<style type="text/css">
{% include numbering.css %}
+
+ /* proper rendering of MathJax into highlighted code blocks */
+ .fixws { white-space: pre; }
+ .fixws .math { white-space: nowrap; }
</style>
<script type="text/javascript">
// clear content of H3 nodes that start with "Example:"
// the content is only there to determine ID of the H3 element (redcarpet doesn't let us set css id)
$( document ).ready(function(){ $("h3[id*='example']").text("") })
+
+ // no language auto-detect so that EBDF isn't detected as scala
+ hljs.configure({
+ languages: []
+ });
+
+ // syntax highlighting after mathjax is loaded so that mathjax can be used in code blocks
+ MathJax.Hub.Queue(function () {
+ hljs.initHighlighting();
+ $("pre nobr").addClass("fixws");
+ })
+
+ // and finally TOC generation
+ $(document).ready(function() {
+ $('.toc').navigation();
+ })
</script>
<link rel="stylesheet" type="text/css" href="public/stylesheets/screen.css">
-
+ <link rel="stylesheet" type="text/css" media="print" href="public/stylesheets/print.css">
+ <title>{{ page.title }}</title>
</head>
<body>
-
+<div id="header">
+<a alt="The Scala Language Specification" href="{{site.baseurl}}/"><img id="scala-logo" src="public/images/scala-logo-red-spiral-dark.png" />
+<h1 class="no-numbering">Language Specification</h1></a>
+</div>
+<div id="container">
+<div id="navigation">
+<ol>
+ {% assign sorted_pages = site.pages | sort:"name" %}
+ {% for post in sorted_pages %}
+ {% if post.chapter >= 0 %}
+ {% if page.url == post.url %}
+ <li class="active-page">
+ <a href="{{site.baseurl}}{{ post.url }}"> {{ post.title }}</a>
+ <div class="toc"></div>
+ </li>
+ {% else %}
+ <li>
+ <a href="{{site.baseurl}}{{ post.url }}"> {{ post.title }}</a>
+ </li>
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+</ol>
+</div>
+<div id="content-container">
{{ content }}
-
+</div>
+</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/spec/_layouts/toc.yml b/spec/_layouts/toc.yml
index d77ea62a19..caf0be1a3a 100644
--- a/spec/_layouts/toc.yml
+++ b/spec/_layouts/toc.yml
@@ -3,13 +3,26 @@
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
+ <link rel="icon" type="image/png" href="public/favicon.ico">
+ <link rel="shortcut icon" type="image/png" href="public/favicon.ico">
+
<link rel="stylesheet" type="text/css" href="public/stylesheets/screen.css">
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
+ <title>{{ page.title }}</title>
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#the-scala-language-specification').css('display','none');
+ })
+ </script>
</head>
<body>
-
+<div id="header">
+<a alt="The Scala Language Specification" href="{{site.baseurl}}/"><img id="scala-logo" src="public/images/scala-logo-red-spiral-dark.png" />
+<h1 class="no-numbering">Language Specification</h1></a>
+</div>
{{ content }}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/spec/index.md b/spec/index.md
index b47cb033cb..3815265ad5 100644
--- a/spec/index.md
+++ b/spec/index.md
@@ -25,7 +25,6 @@ layout: toc
{% endfor %}
</ol>
-
## Preface
Scala is a Java-like programming language which unifies
@@ -68,4 +67,3 @@ the language through lively and inspiring discussions and comments on
previous versions of this document. The contributors to the Scala
mailing list have also given very useful feedback that helped us
improve the language and its tools.
-
diff --git a/spec/public/favicon.ico b/spec/public/favicon.ico
new file mode 100644
index 0000000000..9eb6ef5164
--- /dev/null
+++ b/spec/public/favicon.ico
Binary files differ
diff --git a/spec/public/highlight/LICENSE b/spec/public/highlight/LICENSE
new file mode 100644
index 0000000000..422deb7350
--- /dev/null
+++ b/spec/public/highlight/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2006, Ivan Sagalaev
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of highlight.js nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/spec/public/highlight/highlight.pack.js b/spec/public/highlight/highlight.pack.js
new file mode 100644
index 0000000000..bfeca09abb
--- /dev/null
+++ b/spec/public/highlight/highlight.pack.js
@@ -0,0 +1 @@
+var hljs=new function(){function j(v){return v.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(v){return v.nodeName.toLowerCase()}function h(w,x){var v=w&&w.exec(x);return v&&v.index==0}function r(w){var v=(w.className+" "+(w.parentNode?w.parentNode.className:"")).split(/\s+/);v=v.map(function(x){return x.replace(/^lang(uage)?-/,"")});return v.filter(function(x){return i(x)||/no(-?)highlight/.test(x)})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(A.nodeType==1){v.push({event:"start",offset:z,node:A});z=w(A,z);if(!t(A).match(/br|hr|img|input/)){v.push({event:"stop",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F="";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset<y[0].offset)?w:y}return y[0].event=="start"?w:y}function A(H){function G(I){return" "+I.nodeName+'="'+j(I.value)+'"'}F+="<"+t(H)+Array.prototype.map.call(H.attributes,G).join("")+">"}function E(G){F+="</"+t(G)+">"}function v(G){(G.event=="start"?A:E)(G.node)}while(w.length||y.length){var D=B();F+=j(C.substr(x,D[0].offset-x));x=D[0].offset;if(D==w){z.reverse().forEach(E);do{v(D.splice(0,1)[0]);D=B()}while(D==w&&D.length&&D[0].offset==x);z.reverse().forEach(A)}else{if(D[0].event=="start"){z.push(D[0].node)}else{z.pop()}v(D.splice(0,1)[0])}}return F+j(C.substr(x))}function m(y){function v(z){return(z&&z.source)||z}function w(A,z){return RegExp(v(A),"m"+(y.cI?"i":"")+(z?"g":""))}function x(D,C){if(D.compiled){return}D.compiled=true;D.k=D.k||D.bK;if(D.k){var z={};var E=function(G,F){if(y.cI){F=F.toLowerCase()}F.split(" ").forEach(function(H){var I=H.split("|");z[I[0]]=[G,I[1]?Number(I[1]):1]})};if(typeof D.k=="string"){E("keyword",D.k)}else{Object.keys(D.k).forEach(function(F){E(F,D.k[F])})}D.k=z}D.lR=w(D.l||/\b[A-Za-z0-9_]+\b/,true);if(C){if(D.bK){D.b="\\b("+D.bK.split(" ").join("|")+")\\b"}if(!D.b){D.b=/\B|\b/}D.bR=w(D.b);if(!D.e&&!D.eW){D.e=/\B|\b/}if(D.e){D.eR=w(D.e)}D.tE=v(D.e)||"";if(D.eW&&C.tE){D.tE+=(D.e?"|":"")+C.tE}}if(D.i){D.iR=w(D.i)}if(D.r===undefined){D.r=1}if(!D.c){D.c=[]}var B=[];D.c.forEach(function(F){if(F.v){F.v.forEach(function(G){B.push(o(F,G))})}else{B.push(F=="self"?D:F)}});D.c=B;D.c.forEach(function(F){x(F,D)});if(D.starts){x(D.starts,C)}var A=D.c.map(function(F){return F.bK?"\\.?("+F.b+")\\.?":F.b}).concat([D.tE,D.i]).map(v).filter(Boolean);D.t=A.length?w(A.join("|"),true):{exec:function(F){return null}}}x(y)}function c(T,L,J,R){function v(V,W){for(var U=0;U<W.c.length;U++){if(h(W.c[U].bR,V)){return W.c[U]}}}function z(V,U){if(h(V.eR,U)){return V}if(V.eW){return z(V.parent,U)}}function A(U,V){return !J&&h(V.iR,U)}function E(W,U){var V=M.cI?U[0].toLowerCase():U[0];return W.k.hasOwnProperty(V)&&W.k[V]}function w(aa,Y,X,W){var U=W?"":b.classPrefix,V='<span class="'+U,Z=X?"":"</span>";V+=aa+'">';return V+Y+Z}function N(){if(!I.k){return j(C)}var U="";var X=0;I.lR.lastIndex=0;var V=I.lR.exec(C);while(V){U+=j(C.substr(X,V.index-X));var W=E(I,V);if(W){H+=W[1];U+=w(W[0],j(V[0]))}else{U+=j(V[0])}X=I.lR.lastIndex;V=I.lR.exec(C)}return U+j(C.substr(X))}function F(){if(I.sL&&!f[I.sL]){return j(C)}var U=I.sL?c(I.sL,C,true,S):e(C);if(I.r>0){H+=U.r}if(I.subLanguageMode=="continuous"){S=U.top}return w(U.language,U.value,false,true)}function Q(){return I.sL!==undefined?F():N()}function P(W,V){var U=W.cN?w(W.cN,"",true):"";if(W.rB){D+=U;C=""}else{if(W.eB){D+=j(V)+U;C=""}else{D+=U;C=V}}I=Object.create(W,{parent:{value:I}})}function G(U,Y){C+=U;if(Y===undefined){D+=Q();return 0}var W=v(Y,I);if(W){D+=Q();P(W,Y);return W.rB?0:Y.length}var X=z(I,Y);if(X){var V=I;if(!(V.rE||V.eE)){C+=Y}D+=Q();do{if(I.cN){D+="</span>"}H+=I.r;I=I.parent}while(I!=X.parent);if(V.eE){D+=j(Y)}C="";if(X.starts){P(X.starts,"")}return V.rE?0:Y.length}if(A(Y,I)){throw new Error('Illegal lexeme "'+Y+'" for mode "'+(I.cN||"<unnamed>")+'"')}C+=Y;return Y.length||1}var M=i(T);if(!M){throw new Error('Unknown language: "'+T+'"')}m(M);var I=R||M;var S;var D="";for(var K=I;K!=M;K=K.parent){if(K.cN){D=w(K.cN,"",true)+D}}var C="";var H=0;try{var B,y,x=0;while(true){I.t.lastIndex=x;B=I.t.exec(L);if(!B){break}y=G(L.substr(x,B.index-x),B[0]);x=B.index+y}G(L.substr(x));for(var K=I;K.parent;K=K.parent){if(K.cN){D+="</span>"}}return{r:H,value:D,language:T,top:I}}catch(O){if(O.message.indexOf("Illegal")!=-1){return{r:0,value:j(L)}}else{throw O}}}function e(y,x){x=x||b.languages||Object.keys(f);var v={r:0,value:j(y)};var w=v;x.forEach(function(z){if(!i(z)){return}var A=c(z,y,false);A.language=z;if(A.r>w.r){w=A}if(A.r>v.r){w=v;v=A}});if(w.language){v.second_best=w}return v}function g(v){if(b.tabReplace){v=v.replace(/^((<[^>]+>|\t)+)/gm,function(w,z,y,x){return z.replace(/\t/g,b.tabReplace)})}if(b.useBR){v=v.replace(/\n/g,"<br>")}return v}function p(A){var B=r(A);if(/no(-?)highlight/.test(B)){return}var y;if(b.useBR){y=document.createElementNS("http://www.w3.org/1999/xhtml","div");y.innerHTML=A.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")}else{y=A}var z=y.textContent;var v=B?c(B,z,true):e(z);var x=u(y);if(x.length){var w=document.createElementNS("http://www.w3.org/1999/xhtml","div");w.innerHTML=v.value;v.value=q(x,u(w),z)}v.value=g(v.value);A.innerHTML=v.value;A.className+=" hljs "+(!B&&v.language||"");A.result={language:v.language,re:v.r};if(v.second_best){A.second_best={language:v.second_best.language,re:v.second_best.r}}}var b={classPrefix:"hljs-",tabReplace:null,useBR:false,languages:undefined};function s(v){b=o(b,v)}function l(){if(l.called){return}l.called=true;var v=document.querySelectorAll("pre code");Array.prototype.forEach.call(v,p)}function a(){addEventListener("DOMContentLoaded",l,false);addEventListener("load",l,false)}var f={};var n={};function d(v,x){var w=f[v]=x(this);if(w.aliases){w.aliases.forEach(function(y){n[y]=v})}}function k(){return Object.keys(f)}function i(v){return f[v]||f[n[v]]}this.highlight=c;this.highlightAuto=e;this.fixMarkup=g;this.highlightBlock=p;this.configure=s;this.initHighlighting=l;this.initHighlightingOnLoad=a;this.registerLanguage=d;this.listLanguages=k;this.getLanguage=i;this.inherit=o;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]};this.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/};this.CLCM={cN:"comment",b:"//",e:"$",c:[this.PWM]};this.CBCM={cN:"comment",b:"/\\*",e:"\\*/",c:[this.PWM]};this.HCM={cN:"comment",b:"#",e:"$",c:[this.PWM]};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.CSSNM={cN:"number",b:this.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0};this.RM={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.TM={cN:"title",b:this.IR,r:0};this.UTM={cN:"title",b:this.UIR,r:0}}();hljs.registerLanguage("scala",function(d){var b={cN:"annotation",b:"@[A-Za-z]+"};var c={cN:"string",b:'u?r?"""',e:'"""',r:10};var a={cN:"symbol",b:"'\\w[\\w\\d_]*(?!')"};var e={cN:"type",b:"\\b[A-Z][A-Za-z0-9_]*",r:0};var h={cN:"title",b:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,r:0};var i={cN:"class",bK:"class object trait type",e:/[:={\[(\n;]/,c:[{cN:"keyword",bK:"extends with",r:10},h]};var g={cN:"function",bK:"def val",e:/[:={\[(\n;]/,c:[h]};var f={cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"@[A-Za-z]+"}],r:10};return{k:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},c:[d.CLCM,d.CBCM,c,d.QSM,a,e,g,i,d.CNM,b]}}); \ No newline at end of file
diff --git a/spec/public/images/scala-logo-red-spiral-dark.png b/spec/public/images/scala-logo-red-spiral-dark.png
new file mode 100644
index 0000000000..09b66b5e6a
--- /dev/null
+++ b/spec/public/images/scala-logo-red-spiral-dark.png
Binary files differ
diff --git a/spec/public/octicons/LICENSE.txt b/spec/public/octicons/LICENSE.txt
new file mode 100644
index 0000000000..259b43d14d
--- /dev/null
+++ b/spec/public/octicons/LICENSE.txt
@@ -0,0 +1,9 @@
+(c) 2012-2014 GitHub
+
+When using the GitHub logos, be sure to follow the GitHub logo guidelines (https://github.com/logos)
+
+Font License: SIL OFL 1.1 (http://scripts.sil.org/OFL)
+Applies to all font files
+
+Code License: MIT (http://choosealicense.com/licenses/mit/)
+Applies to all other files
diff --git a/spec/public/octicons/octicons.css b/spec/public/octicons/octicons.css
new file mode 100644
index 0000000000..a5dcd153a8
--- /dev/null
+++ b/spec/public/octicons/octicons.css
@@ -0,0 +1,235 @@
+@font-face {
+ font-family: 'octicons';
+ src: url('octicons.eot?#iefix') format('embedded-opentype'),
+ url('octicons.woff') format('woff'),
+ url('octicons.ttf') format('truetype'),
+ url('octicons.svg#octicons') format('svg');
+ font-weight: normal;
+ font-style: normal;
+}
+
+/*
+
+.octicon is optimized for 16px.
+.mega-octicon is optimized for 32px but can be used larger.
+
+*/
+.octicon, .mega-octicon {
+ font: normal normal normal 16px/1 octicons;
+ display: inline-block;
+ text-decoration: none;
+ text-rendering: auto;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.mega-octicon { font-size: 32px; }
+
+
+.octicon-alert:before { content: '\f02d'} /*  */
+.octicon-alignment-align:before { content: '\f08a'} /*  */
+.octicon-alignment-aligned-to:before { content: '\f08e'} /*  */
+.octicon-alignment-unalign:before { content: '\f08b'} /*  */
+.octicon-arrow-down:before { content: '\f03f'} /*  */
+.octicon-arrow-left:before { content: '\f040'} /*  */
+.octicon-arrow-right:before { content: '\f03e'} /*  */
+.octicon-arrow-small-down:before { content: '\f0a0'} /*  */
+.octicon-arrow-small-left:before { content: '\f0a1'} /*  */
+.octicon-arrow-small-right:before { content: '\f071'} /*  */
+.octicon-arrow-small-up:before { content: '\f09f'} /*  */
+.octicon-arrow-up:before { content: '\f03d'} /*  */
+.octicon-beer:before { content: '\f069'} /*  */
+.octicon-book:before { content: '\f007'} /*  */
+.octicon-bookmark:before { content: '\f07b'} /*  */
+.octicon-briefcase:before { content: '\f0d3'} /*  */
+.octicon-broadcast:before { content: '\f048'} /*  */
+.octicon-browser:before { content: '\f0c5'} /*  */
+.octicon-bug:before { content: '\f091'} /*  */
+.octicon-calendar:before { content: '\f068'} /*  */
+.octicon-check:before { content: '\f03a'} /*  */
+.octicon-checklist:before { content: '\f076'} /*  */
+.octicon-chevron-down:before { content: '\f0a3'} /*  */
+.octicon-chevron-left:before { content: '\f0a4'} /*  */
+.octicon-chevron-right:before { content: '\f078'} /*  */
+.octicon-chevron-up:before { content: '\f0a2'} /*  */
+.octicon-circle-slash:before { content: '\f084'} /*  */
+.octicon-circuit-board:before { content: '\f0d6'} /*  */
+.octicon-clippy:before { content: '\f035'} /*  */
+.octicon-clock:before { content: '\f046'} /*  */
+.octicon-cloud-download:before { content: '\f00b'} /*  */
+.octicon-cloud-upload:before { content: '\f00c'} /*  */
+.octicon-code:before { content: '\f05f'} /*  */
+.octicon-color-mode:before { content: '\f065'} /*  */
+.octicon-comment-add:before,
+.octicon-comment:before { content: '\f02b'} /*  */
+.octicon-comment-discussion:before { content: '\f04f'} /*  */
+.octicon-credit-card:before { content: '\f045'} /*  */
+.octicon-dash:before { content: '\f0ca'} /*  */
+.octicon-dashboard:before { content: '\f07d'} /*  */
+.octicon-database:before { content: '\f096'} /*  */
+.octicon-device-camera:before { content: '\f056'} /*  */
+.octicon-device-camera-video:before { content: '\f057'} /*  */
+.octicon-device-desktop:before { content: '\f27c'} /*  */
+.octicon-device-mobile:before { content: '\f038'} /*  */
+.octicon-diff:before { content: '\f04d'} /*  */
+.octicon-diff-added:before { content: '\f06b'} /*  */
+.octicon-diff-ignored:before { content: '\f099'} /*  */
+.octicon-diff-modified:before { content: '\f06d'} /*  */
+.octicon-diff-removed:before { content: '\f06c'} /*  */
+.octicon-diff-renamed:before { content: '\f06e'} /*  */
+.octicon-ellipsis:before { content: '\f09a'} /*  */
+.octicon-eye-unwatch:before,
+.octicon-eye-watch:before,
+.octicon-eye:before { content: '\f04e'} /*  */
+.octicon-file-binary:before { content: '\f094'} /*  */
+.octicon-file-code:before { content: '\f010'} /*  */
+.octicon-file-directory:before { content: '\f016'} /*  */
+.octicon-file-media:before { content: '\f012'} /*  */
+.octicon-file-pdf:before { content: '\f014'} /*  */
+.octicon-file-submodule:before { content: '\f017'} /*  */
+.octicon-file-symlink-directory:before { content: '\f0b1'} /*  */
+.octicon-file-symlink-file:before { content: '\f0b0'} /*  */
+.octicon-file-text:before { content: '\f011'} /*  */
+.octicon-file-zip:before { content: '\f013'} /*  */
+.octicon-flame:before { content: '\f0d2'} /*  */
+.octicon-fold:before { content: '\f0cc'} /*  */
+.octicon-gear:before { content: '\f02f'} /*  */
+.octicon-gift:before { content: '\f042'} /*  */
+.octicon-gist:before { content: '\f00e'} /*  */
+.octicon-gist-secret:before { content: '\f08c'} /*  */
+.octicon-git-branch-create:before,
+.octicon-git-branch-delete:before,
+.octicon-git-branch:before { content: '\f020'} /*  */
+.octicon-git-commit:before { content: '\f01f'} /*  */
+.octicon-git-compare:before { content: '\f0ac'} /*  */
+.octicon-git-merge:before { content: '\f023'} /*  */
+.octicon-git-pull-request-abandoned:before,
+.octicon-git-pull-request:before { content: '\f009'} /*  */
+.octicon-globe:before { content: '\f0b6'} /*  */
+.octicon-graph:before { content: '\f043'} /*  */
+.octicon-heart:before { content: '\2665'} /* ♥ */
+.octicon-history:before { content: '\f07e'} /*  */
+.octicon-home:before { content: '\f08d'} /*  */
+.octicon-horizontal-rule:before { content: '\f070'} /*  */
+.octicon-hourglass:before { content: '\f09e'} /*  */
+.octicon-hubot:before { content: '\f09d'} /*  */
+.octicon-inbox:before { content: '\f0cf'} /*  */
+.octicon-info:before { content: '\f059'} /*  */
+.octicon-issue-closed:before { content: '\f028'} /*  */
+.octicon-issue-opened:before { content: '\f026'} /*  */
+.octicon-issue-reopened:before { content: '\f027'} /*  */
+.octicon-jersey:before { content: '\f019'} /*  */
+.octicon-jump-down:before { content: '\f072'} /*  */
+.octicon-jump-left:before { content: '\f0a5'} /*  */
+.octicon-jump-right:before { content: '\f0a6'} /*  */
+.octicon-jump-up:before { content: '\f073'} /*  */
+.octicon-key:before { content: '\f049'} /*  */
+.octicon-keyboard:before { content: '\f00d'} /*  */
+.octicon-law:before { content: '\f0d8'} /* */
+.octicon-light-bulb:before { content: '\f000'} /*  */
+.octicon-link:before { content: '\f05c'} /*  */
+.octicon-link-external:before { content: '\f07f'} /*  */
+.octicon-list-ordered:before { content: '\f062'} /*  */
+.octicon-list-unordered:before { content: '\f061'} /*  */
+.octicon-location:before { content: '\f060'} /*  */
+.octicon-gist-private:before,
+.octicon-mirror-private:before,
+.octicon-git-fork-private:before,
+.octicon-lock:before { content: '\f06a'} /*  */
+.octicon-logo-github:before { content: '\f092'} /*  */
+.octicon-mail:before { content: '\f03b'} /*  */
+.octicon-mail-read:before { content: '\f03c'} /*  */
+.octicon-mail-reply:before { content: '\f051'} /*  */
+.octicon-mark-github:before { content: '\f00a'} /*  */
+.octicon-markdown:before { content: '\f0c9'} /*  */
+.octicon-megaphone:before { content: '\f077'} /*  */
+.octicon-mention:before { content: '\f0be'} /*  */
+.octicon-microscope:before { content: '\f089'} /*  */
+.octicon-milestone:before { content: '\f075'} /*  */
+.octicon-mirror-public:before,
+.octicon-mirror:before { content: '\f024'} /*  */
+.octicon-mortar-board:before { content: '\f0d7'} /* */
+.octicon-move-down:before { content: '\f0a8'} /*  */
+.octicon-move-left:before { content: '\f074'} /*  */
+.octicon-move-right:before { content: '\f0a9'} /*  */
+.octicon-move-up:before { content: '\f0a7'} /*  */
+.octicon-mute:before { content: '\f080'} /*  */
+.octicon-no-newline:before { content: '\f09c'} /*  */
+.octicon-octoface:before { content: '\f008'} /*  */
+.octicon-organization:before { content: '\f037'} /*  */
+.octicon-package:before { content: '\f0c4'} /*  */
+.octicon-paintcan:before { content: '\f0d1'} /*  */
+.octicon-pencil:before { content: '\f058'} /*  */
+.octicon-person-add:before,
+.octicon-person-follow:before,
+.octicon-person:before { content: '\f018'} /*  */
+.octicon-pin:before { content: '\f041'} /*  */
+.octicon-playback-fast-forward:before { content: '\f0bd'} /*  */
+.octicon-playback-pause:before { content: '\f0bb'} /*  */
+.octicon-playback-play:before { content: '\f0bf'} /*  */
+.octicon-playback-rewind:before { content: '\f0bc'} /*  */
+.octicon-plug:before { content: '\f0d4'} /*  */
+.octicon-repo-create:before,
+.octicon-gist-new:before,
+.octicon-file-directory-create:before,
+.octicon-file-add:before,
+.octicon-plus:before { content: '\f05d'} /*  */
+.octicon-podium:before { content: '\f0af'} /*  */
+.octicon-primitive-dot:before { content: '\f052'} /*  */
+.octicon-primitive-square:before { content: '\f053'} /*  */
+.octicon-pulse:before { content: '\f085'} /*  */
+.octicon-puzzle:before { content: '\f0c0'} /*  */
+.octicon-question:before { content: '\f02c'} /*  */
+.octicon-quote:before { content: '\f063'} /*  */
+.octicon-radio-tower:before { content: '\f030'} /*  */
+.octicon-repo-delete:before,
+.octicon-repo:before { content: '\f001'} /*  */
+.octicon-repo-clone:before { content: '\f04c'} /*  */
+.octicon-repo-force-push:before { content: '\f04a'} /*  */
+.octicon-gist-fork:before,
+.octicon-repo-forked:before { content: '\f002'} /*  */
+.octicon-repo-pull:before { content: '\f006'} /*  */
+.octicon-repo-push:before { content: '\f005'} /*  */
+.octicon-rocket:before { content: '\f033'} /*  */
+.octicon-rss:before { content: '\f034'} /*  */
+.octicon-ruby:before { content: '\f047'} /*  */
+.octicon-screen-full:before { content: '\f066'} /*  */
+.octicon-screen-normal:before { content: '\f067'} /*  */
+.octicon-search-save:before,
+.octicon-search:before { content: '\f02e'} /*  */
+.octicon-server:before { content: '\f097'} /*  */
+.octicon-settings:before { content: '\f07c'} /*  */
+.octicon-log-in:before,
+.octicon-sign-in:before { content: '\f036'} /*  */
+.octicon-log-out:before,
+.octicon-sign-out:before { content: '\f032'} /*  */
+.octicon-split:before { content: '\f0c6'} /*  */
+.octicon-squirrel:before { content: '\f0b2'} /*  */
+.octicon-star-add:before,
+.octicon-star-delete:before,
+.octicon-star:before { content: '\f02a'} /*  */
+.octicon-steps:before { content: '\f0c7'} /*  */
+.octicon-stop:before { content: '\f08f'} /*  */
+.octicon-repo-sync:before,
+.octicon-sync:before { content: '\f087'} /*  */
+.octicon-tag-remove:before,
+.octicon-tag-add:before,
+.octicon-tag:before { content: '\f015'} /*  */
+.octicon-telescope:before { content: '\f088'} /*  */
+.octicon-terminal:before { content: '\f0c8'} /*  */
+.octicon-three-bars:before { content: '\f05e'} /*  */
+.octicon-tools:before { content: '\f031'} /*  */
+.octicon-trashcan:before { content: '\f0d0'} /*  */
+.octicon-triangle-down:before { content: '\f05b'} /*  */
+.octicon-triangle-left:before { content: '\f044'} /*  */
+.octicon-triangle-right:before { content: '\f05a'} /*  */
+.octicon-triangle-up:before { content: '\f0aa'} /*  */
+.octicon-unfold:before { content: '\f039'} /*  */
+.octicon-unmute:before { content: '\f0ba'} /*  */
+.octicon-versions:before { content: '\f064'} /*  */
+.octicon-remove-close:before,
+.octicon-x:before { content: '\f081'} /*  */
+.octicon-zap:before { content: '\26A1'} /* ⚡ */
diff --git a/spec/public/octicons/octicons.eot b/spec/public/octicons/octicons.eot
new file mode 100644
index 0000000000..22881a8b6c
--- /dev/null
+++ b/spec/public/octicons/octicons.eot
Binary files differ
diff --git a/spec/public/octicons/octicons.svg b/spec/public/octicons/octicons.svg
new file mode 100644
index 0000000000..ea3e0f1615
--- /dev/null
+++ b/spec/public/octicons/octicons.svg
@@ -0,0 +1,198 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+(c) 2012-2014 GitHub
+
+When using the GitHub logos, be sure to follow the GitHub logo guidelines (https://github.com/logos)
+
+Font License: SIL OFL 1.1 (http://scripts.sil.org/OFL)
+Applies to all font files
+
+Code License: MIT (http://choosealicense.com/licenses/mit/)
+Applies to all other files
+</metadata>
+<defs>
+<font id="octicons" horiz-adv-x="1024" >
+<font-face font-family="octicons" font-weight="400" font-stretch="normal" units-per-em="1024" ascent="832" descent="-192" />
+<missing-glyph d="M512 832C229.25 832 0 602.75 0 320c0-226.25 146.688-418.125 350.156-485.812 25.594-4.688 34.938 11.125 34.938 24.625 0 12.188-0.469 52.562-0.719 95.312C242-76.81200000000001 211.906 14.5 211.906 14.5c-23.312 59.125-56.844 74.875-56.844 74.875-46.531 31.75 3.53 31.125 3.53 31.125 51.406-3.562 78.47-52.75 78.47-52.75 45.688-78.25 119.875-55.625 149-42.5 4.654 33 17.904 55.625 32.5 68.375C304.906 106.56200000000001 185.344 150.5 185.344 346.688c0 55.938 19.969 101.562 52.656 137.406-5.219 13-22.844 65.094 5.062 135.562 0 0 42.938 13.75 140.812-52.5 40.812 11.406 84.594 17.031 128.125 17.219 43.5-0.188 87.312-5.875 128.188-17.281 97.688 66.312 140.688 52.5 140.688 52.5 28-70.531 10.375-122.562 5.125-135.5 32.812-35.844 52.625-81.469 52.625-137.406 0-196.688-119.75-240-233.812-252.688 18.438-15.875 34.75-47 34.75-94.75 0-68.438-0.688-123.625-0.688-140.5 0-13.625 9.312-29.562 35.25-24.562C877.438-98 1024 93.875 1024 320 1024 602.75 794.75 832 512 832z" horiz-adv-x="1024" />
+<glyph glyph-name="alert" unicode="&#xf02d;" d="M1005.854 31.753000000000043l-438.286 767C556.173 818.694 534.967 831 512 831s-44.173-12.306-55.567-32.247l-438.286-767c-11.319-19.809-11.238-44.144 0.213-63.876C29.811-51.85500000000002 50.899-64 73.714-64h876.572c22.814 0 43.903 12.145 55.354 31.877S1017.173 11.94399999999996 1005.854 31.753000000000043zM576 64H448V192h128V64zM576 256H448V512h128V256z" horiz-adv-x="1024" />
+<glyph glyph-name="alignment-align" unicode="&#xf08a;" d="M192 768C85.938 768 0 682.062 0 576s85.938-192 192-192c106.062 0 192 85.938 192 192S298.062 768 192 768zM672 224l160 160H384v-448l160 160 288-288 128 128L672 224z" horiz-adv-x="960" />
+<glyph glyph-name="alignment-aligned-to" unicode="&#xf08e;" d="M384 256l128 128 288-288 160 160v-448H512l160 160L384 256zM192 384C85.938 384 0 469.938 0 576S85.938 768 192 768c106.062 0 192-85.938 192-192S298.062 384 192 384z" horiz-adv-x="960" />
+<glyph glyph-name="alignment-unalign" unicode="&#xf08b;" d="M512 640L384 512 128 768 0 640l256-256L128 256l64-64 384 384L512 640zM640 256l128 128-64 64L320 64l64-64 128 128 256-256 128 128L640 256z" horiz-adv-x="896" />
+<glyph glyph-name="arrow-down" unicode="&#xf03f;" d="M448 384V640H192v-256H0l320-384 320 384H448z" horiz-adv-x="640" />
+<glyph glyph-name="arrow-left" unicode="&#xf040;" d="M384 448V640L0 320l384-320V192h256V448H384z" horiz-adv-x="640" />
+<glyph glyph-name="arrow-right" unicode="&#xf03e;" d="M640 320L256 640v-192H0v-256h256v-192L640 320z" horiz-adv-x="640" />
+<glyph glyph-name="arrow-small-down" unicode="&#xf0a0;" d="M256 384V512H128v-128H0l192-256 192 256H256z" horiz-adv-x="384" />
+<glyph glyph-name="arrow-small-left" unicode="&#xf0a1;" d="M256 384V512L0 320l256-192V256h128V384H256z" horiz-adv-x="384" />
+<glyph glyph-name="arrow-small-right" unicode="&#xf071;" d="M384 320L128 512v-128H0v-128h128v-128L384 320z" horiz-adv-x="384" />
+<glyph glyph-name="arrow-small-up" unicode="&#xf09f;" d="M192 512L0 256h128v-128h128V256h128L192 512z" horiz-adv-x="384" />
+<glyph glyph-name="arrow-up" unicode="&#xf03d;" d="M320 640L0 256h192v-256h256V256h192L320 640z" horiz-adv-x="640" />
+<glyph glyph-name="beer" unicode="&#xf069;" d="M896 576c-31 0-192 0-192 0v128c0 71-158 128-352 128s-352-57-352-128v-768c0-71 158-128 352-128s352 57 352 128v128s160 0 192 0 64 30 64 64 0 350 0 384-29 64-64 64z m-704-576h-64v512h64v-512z m192-64h-64v512h64v-512z m192 64h-64v512h64v-512z m-224 640c-124 0-224 29-224 64s100 64 224 64 224-29 224-64-100-64-224-64z m480-448h-128v256h128v-256z" horiz-adv-x="1024" />
+<glyph glyph-name="book" unicode="&#xf007;" d="M768 256h-128c-34 0-64-32-64-64h256c0 34-32 64-64 64z m-55 416c-167 0-209-32-233-56-24 24-66 56-233 56s-247-46-247-78v-586c29 16 119 48 214 56 115 9 234-9 234-32 0-16 8-31 31-32 0 0 0 0 1 0 0 0 0 0 1 0 23 1 31 16 31 32 0 23 119 41 234 32 94-7 185-40 214-56v586c0 32-80 78-247 78z m-265-572c-30 16-103 28-192 28s-170-12-192-27c0 0 0 411 0 443s64 59 192 59 192-27 192-59 0-444 0-444z m448 1c-22 15-103 27-192 27s-162-12-192-28c0 0 0 412 0 444s64 59 192 59 192-27 192-59 0-443 0-443z m-128 283h-128c-34 0-64-32-64-64h256c0 34-32 64-64 64z m0 128h-128c-34 0-64-32-64-64h256c0 34-32 64-64 64z m-448-128h-128c-32 0-64-30-64-64h256c0 32-30 64-64 64z m0-128h-128c-32 0-64-30-64-64h256c0 32-30 64-64 64z m0 256h-128c-32 0-64-30-64-64h256c0 32-30 64-64 64z" horiz-adv-x="1024" />
+<glyph glyph-name="bookmark" unicode="&#xf07b;" d="M0 704v-768l192 128 192-128V704H0zM316.25 507.25l-71.875-51.938 27.188-83.406c2.75-8.375-0.688-11.062-7.562-6.594l-72 52.094-72-52.031c-6.844-4.469-10.312-1.781-7.562 6.594l27.219 83.406L67.783 507.25c-6.469 5.125-5 9.219 3.906 9.219l88 0.125 27.125 83.094c2.812 8.812 7.562 8.812 10.375 0l27.188-83.094 87.938-0.125C321.25 516.469 322.688 512.375 316.25 507.25z" horiz-adv-x="384" />
+<glyph glyph-name="briefcase" unicode="&#xf0d3;" d="M896 640H640v66c0 34.2-27.8 62-62 62H446c-34.2 0-62-27.8-62-62v-66H128c-35.3 0-64-28.7-64-64v-512c0-35.3 28.7-64 64-64h768c35.3 0 64 28.7 64 64V576C960 611.3 931.3 640 896 640zM448 688c0 8.8 7.2 16 16 16h96c8.8 0 16-7.2 16-16v-48H448V688zM896 320H576v-64H448v64H128V576h64v-192h640V576h64V320z" horiz-adv-x="1024" />
+<glyph glyph-name="broadcast" unicode="&#xf048;" d="M448 640c142 0 256-115 256-256 0-69-28-132-72-178l-16-93c91 56 152 156 152 271 0 177-143 320-320 320s-320-143-320-320c0-115 61-215 152-271l-16 93c-45 46-72 109-72 178 0 142 114 256 256 256z m-64-320c-36 0-64-29-64-64v-128c0-36 30-64 64-64v-256h128v256c34 0 64 28 64 64v128c0 35-28 64-64 64s-64 0-64 0-28 0-64 0z m192 128c0 71-57 128-128 128s-128-57-128-128 57-128 128-128 128 57 128 128z m-128 384c-247 0-448-201-448-448 0-197 128-363 305-423l-12 72c-135 60-229 194-229 351 0 212 172 384 384 384s384-172 384-384c0-157-94-291-229-351l-12-72c177 60 305 225 305 423 0 247-201 448-448 448z" horiz-adv-x="896" />
+<glyph glyph-name="browser" unicode="&#xf0c5;" d="M320 640h64v-64h-64V640zM192 640h64v-64h-64V640zM64 640h64v-64H64V640zM832 0H64V512h768V0zM832 576H448v64h384V576zM896 640c0 35.35-28.65 64-64 64H64c-35.35 0-64-28.65-64-64v-640c0-35.35 28.65-64 64-64h768c35.35 0 64 28.65 64 64V640z" horiz-adv-x="896" />
+<glyph glyph-name="bug" unicode="&#xf091;" d="M243.621 675.469C190.747 618.688 205.34 528 205.34 528s53.968-64 160-64c106.031 0 160.031 64 160.031 64s14.375 89.469-37.375 146.312c32.375 18.031 51.438 44.094 43.562 61.812-8.938 19.969-48.375 21.75-88.25 3.969-14.812-6.594-27.438-14.969-37.25-23.875-12.438 2.25-25.625 3.781-40.72 3.781-14.061 0-26.561-1.344-38.344-3.25-9.656 8.75-22.062 16.875-36.531 23.344-39.875 17.719-79.375 15.938-88.25-3.969C194.465 718.781 212.497 693.438 243.621 675.469zM644.746 262.25c-8.25 1.75-16.125 2.75-23.75 3.5 0 2.125 0.375 4.125 0.375 6.312 0 33.594-4.75 65.654-12.438 96.125 16.438-1.406 37.375 2.375 58.562 11.779 39.875 17.781 65 48.375 56.125 68.219-8.875 19.969-48.375 21.75-88.25 3.969-18.625-8.312-33.812-19.469-44-30.906-7.75 18.25-16.5 35.781-26.812 51.719-30.188-25.156-87.312-62.719-167.062-71.062v-321.781c0 0-0.25-32-32.031-32-31.75 0-32 32-32 32V401.781c-79.811 8.344-136.968 45.969-167.093 71.062-9.875-15.312-18.375-32-25.938-49.344-10.281 10.625-24.625 20.844-41.969 28.594-39.875 17.719-79.375 15.938-88.25-3.969-8.906-19.906 16.25-50.438 56.125-68.219 19.844-8.846 39.531-12.812 55.469-12.096-7.656-30.404-12.469-62.344-12.469-95.812 0-2.188 0.375-4.25 0.438-6.5-6.719-0.75-13.688-1.75-20.781-3.25-51.969-10.75-91.781-37.625-88.844-59.812 2.938-22.312 47.5-31.5 99.594-20.688 6.781 1.375 13.438 3.125 19.781 5.062C128.684 146 143.34 108.125 163.622 75.5c-12.031-6.062-24.531-15-36.031-26.625C95.715 17 82.779-21.75 98.715-37.68799999999999c15.938-15.937 54.656-3 86.531 28.812 9.344 9.375 16.844 19.25 22.656 29C251.434-22.5 305.965-48 365.465-48c60.343 0 115.781 26.25 159.531 69.938 5.875-10.312 13.75-20.812 23.625-30.688 31.812-31.875 70.625-44.812 86.562-28.875s3 54.625-28.875 86.5c-12.312 12.375-25.688 21.75-38.438 27.938 20.125 32.5 34.625 70.375 43.688 111.062 7.188-2.25 14.688-4.375 22.562-6.062 52.061-10.812 96.625-1.562 99.625 20.688C736.558 224.625 696.746 251.5 644.746 262.25z" horiz-adv-x="733.886" />
+<glyph glyph-name="calendar" unicode="&#xf068;" d="M704 320h-64v-128h64V320zM576 320h-64v-128h64V320zM704 512h-64v-128h64V512zM832 320h-64v-128h64V320zM576 128h-64v-128h64V128zM768 832h-64v-128h64V832zM256 832h-64v-128h64V832zM832 512h-64v-128h64V512zM576 512h-64v-128h64V512zM320 128h-64v-128h64V128zM192 320h-64v-128h64V320zM320 320h-64v-128h64V320zM832 768v-128H640V768H320v-128H128V768H0v-896h960V768H832zM896-64H64V576h832V-64zM192 128h-64v-128h64V128zM448 512h-64v-128h64V512zM448 128h-64v-128h64V128zM320 512h-64v-128h64V512zM448 320h-64v-128h64V320zM704 128h-64v-128h64V128z" horiz-adv-x="1024" />
+<glyph glyph-name="check" unicode="&#xf03a;" d="M640 640L256 256 128 384 0 256l256-256 512 512L640 640z" horiz-adv-x="768" />
+<glyph glyph-name="checklist" unicode="&#xf076;" d="M760.688 315.78099999999995l-49.812 49.656c-6.438 6.529-16.938 6.594-23.375 0L582.5 260.5 462.375 140.125l-93.031 93.125c-6.531 6.562-17.031 6.562-23.5 0l-49.719-49.688c-6.531-6.562-6.531-17.062 0-23.562l104.781-104.875 17.969-17.875 31.688-31.812c6.562-6.562 17.188-6.562 23.562 0l49.625 49.688L760.625 292.22C767.25 298.688 767.25 309.188 760.688 315.78099999999995zM228.469 251.188L278.156 301c42.469 42.375 116.344 42.438 158.781-0.062l25.312-25.312L576 384V704H0v-704h320l-91.531 92.125C184.688 136.062 184.688 207.375 228.469 251.188zM192 640h320v-64H192V640zM192 512h320v-64H192V512zM128 320H64v64h64V320zM128 448H64v64h64V448zM128 576H64v64h64V576zM192 384h64v-64h-64V384z" horiz-adv-x="765.602" />
+<glyph glyph-name="chevron-down" unicode="&#xf0a3;" d="M512 512L320 320 128 512 0 384l320-320 320 320L512 512z" horiz-adv-x="640" />
+<glyph glyph-name="chevron-left" unicode="&#xf0a4;" d="M448 512L320 640 0 320l320-320 128 128L256 320 448 512z" horiz-adv-x="448" />
+<glyph glyph-name="chevron-right" unicode="&#xf078;" d="M128 640L0 512l192-192L0 128l128-128 320 320L128 640z" horiz-adv-x="448" />
+<glyph glyph-name="chevron-up" unicode="&#xf0a2;" d="M320 576L0 256l128-128 192 192 192-192 128 128L320 576z" horiz-adv-x="640" />
+<glyph glyph-name="circle-slash" unicode="&#xf084;" d="M320 640C143.219 640 0 496.781 0 320c0-176.75 143.219-320 320-320 176.75 0 320 143.25 320 320C640 496.781 496.75 640 320 640zM320 512c27.656 0 53.688-6.094 77.438-16.562L144.562 242.562C134.094 266.312 128 292.34400000000005 128 320 128 426 213.938 512 320 512zM320 128c-28.031 0-54.531 6.375-78.594 17.125l253.906 252.5C505.875 373.812 512 347.719 512 320 512 213.938 426.062 128 320 128z" horiz-adv-x="640" />
+<glyph glyph-name="circuit-board" unicode="&#xf0d6;" d="M320 576c35.346 0 64-28.654 64-64 0-35.346-28.654-64-64-64s-64 28.654-64 64C256 547.346 284.654 576 320 576zM960 64c0-106.039-85.961-192-192-192H320l192 192h81.128c22.132-38.258 63.494-64 110.872-64 70.692 0 128 57.308 128 128s-57.308 128-128 128c-47.377 0-88.74-25.742-110.872-64H448L156.044-99.95600000000002C100.845-66.23199999999997 64-5.419999999999959 64 64V576c0 106.039 85.961 192 192 192v-145.128C217.742 600.74 192 559.377 192 512c0-70.692 57.308-128 128-128 47.276 0 88.56 25.633 110.727 63.756l162.416 0.219C615.279 409.731 656.633 384 704 384c70.692 0 128 57.308 128 128s-57.308 128-128 128c-47.388 0-88.758-25.753-110.887-64.025l-162.097-0.219c-11.246 19.54-27.503 35.828-47.016 47.116V768h384c106.039 0 192-85.961 192-192V64zM640 128c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64S640 92.654 640 128zM640 512c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64S640 476.654 640 512z" horiz-adv-x="1024" />
+<glyph glyph-name="clippy" unicode="&#xf035;" d="M704-64h-640v576h640v-192h64v320c0 35-29 64-64 64h-192c0 71-57 128-128 128s-128-57-128-128h-192c-35 0-64-29-64-64v-704c0-35 29-64 64-64h640c35 0 64 29 64 64v128h-64v-128z m-512 704c29 0 29 0 64 0s64 29 64 64 29 64 64 64 64-29 64-64 32-64 64-64 33 0 64 0 64-29 64-64h-512c0 39 28 64 64 64z m-64-512h128v64h-128v-64z m448 128v128l-256-192 256-192v128h320v128h-320z m-448-256h192v64h-192v-64z m320 448h-320v-64h320v64z m-192-128h-128v-64h128v64z" horiz-adv-x="896" />
+<glyph glyph-name="clock" unicode="&#xf046;" d="M384 256h256l64 64-64 64H512V576l-64 64-64-64V256zM448 768C200.562 768 0 567.438 0 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448C896 567.438 695.438 768 448 768zM448 0c-176.25 0-320 143.75-320 320 0 175.938 144.188 319.5 320 320 175.812-0.5 320-144.062 320-320C768 143.75 624.25 0 448 0z" horiz-adv-x="896" />
+<glyph glyph-name="cloud-download" unicode="&#xf00b;" d="M832 512c-8.75 0-17.125-1.406-25.625-2.562C757.625 623.75 644.125 704 512 704c-132.156 0-245.562-80.25-294.406-194.562C209.156 510.594 200.781 512 192 512 85.938 512 0 426.062 0 320s85.938-192 192-192c20.531 0 39.875 4.25 58.375 10.375C284.469 100.625 331.312 75.25 384 67.5v65.25c-49.844 10.375-91.594 42.812-112.625 87.875C249.531 203 222.219 192 192 192c-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 25.281 0 48.625-7.562 68.406-20.094C281.344 548.219 385.594 640 512 640c126.5 0 229.75-92.219 250.5-212.75 20 13 43.875 20.75 69.5 20.75 70.625 0 128-57.344 128-128 0-70.625-57.375-128-128-128-10.25 0-20 1.5-29.625 3.75C773.438 154.875 725.938 128 672 128c-11.062 0-21.625 1.625-32 4v-64.938c10.438-1.688 21.062-3.062 32-3.062 61.188 0 116.5 24.625 156.938 64.438C830 128.375 830.875 128 832 128c106.062 0 192 85.938 192 192S938.062 512 832 512zM576 320H448v-320H320l192-192 192 192H576V320z" horiz-adv-x="1024" />
+<glyph glyph-name="cloud-upload" unicode="&#xf00c;" d="M512 448L320 256h128v-320h128V256h128L512 448zM832 512c-8.75 0-17.125-1.406-25.625-2.562C757.625 623.812 644.125 704 512 704c-132.156 0-245.562-80.188-294.406-194.562C209.156 510.594 200.781 512 192 512 85.938 512 0 426 0 320c0-106.062 85.938-192 192-192 20.531 0 39.875 4.25 58.375 10.438C284.469 100.625 331.312 75.25 384 67.5v65.25c-49.844 10.375-91.594 42.812-112.625 87.75C249.531 203 222.219 192 192 192c-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 25.281 0 48.625-7.562 68.406-20.156C281.344 548.219 385.594 640 512 640c126.5 0 229.75-92.219 250.5-212.75 20 13 43.875 20.75 69.5 20.75 70.625 0 128-57.344 128-128 0-70.625-57.375-128-128-128-10.25 0-20 1.5-29.625 3.75C773.438 154.875 725.938 128 672 128c-11.062 0-21.625 1.625-32 4v-64.938c10.438-1.688 21.062-3.062 32-3.062 61.188 0 116.5 24.688 157 64.438 1 0 1.875-0.438 3-0.438 106.062 0 192 85.938 192 192C1024 426 938.062 512 832 512z" horiz-adv-x="1024" />
+<glyph glyph-name="code" unicode="&#xf05f;" d="M608 640l-96-96 224-224L512 96l96-96 288 320L608 640zM288 640L0 320l288-320 96 96L160 320l224 224L288 640z" horiz-adv-x="896" />
+<glyph glyph-name="color-mode" unicode="&#xf065;" d="M0 704v-768h768V704H0zM64 0V640h640L64 0z" horiz-adv-x="768" />
+<glyph glyph-name="comment" unicode="&#xf02b;" d="M768 704H128C66 704 0 640 0 576v-384c0-128 128-128 128-128h64v-256l256 256c0 0 258 0 320 0s128 68 128 128V576C896 638 832 704 768 704z" horiz-adv-x="896" />
+<glyph glyph-name="comment-discussion" unicode="&#xf04f;" d="M256 320c0 64 0 192 0 192s-160 0-192 0-64-32-64-64 0-288 0-320 32-64 64-64 64 0 64 0v-192l194 192s162 0 192 0 62 32 62 64 0 64 0 64-128 0-192 0-128 64-128 128z m576 384c-32 0-416 0-448 0s-64-32-64-64 0-288 0-320 32-64 64-64 190 0 190 0l194-192v192s32 0 64 0 64 32 64 64 0 288 0 320-32 64-64 64z" horiz-adv-x="896" />
+<glyph glyph-name="credit-card" unicode="&#xf045;" d="M128 128h128v64h-128v-64z m192 0h128v64h-128v-64z m64 192h-256v-64h256v64z m-128 64h64l128 128h-64l-128-128z m192-128h192v64h-192v-64z m512 384c-32 0-864 0-896 0s-64-32-64-64 0-480 0-512 32-64 64-64 864 0 896 0 64 32 64 64 0 480 0 512-32 64-64 64z m0-256v-288s0-32-32-32h-832c-32 0-32 32-32 32v288h64l128 128h-192v32s0 32 32 32h832c32 0 32-32 32-32v-32h-384l-128-128h512z" horiz-adv-x="1024" />
+<glyph glyph-name="dash" unicode="&#xf0ca;" d="M0 384v-128h512V384H0z" horiz-adv-x="512" />
+<glyph glyph-name="dashboard" unicode="&#xf07d;" d="M416 367.5c-61.562 0-111.5-49.938-111.5-111.5S354.438 144.5 416 144.5 527.5 194.438 527.5 256c0 8.5-1.125 16.75-3 24.688C606.125 375.625 732.5 523.656 800 608c23.125 28.875-2.312 56.188-32 32-85.188-69.375-232.312-194.688-326.906-275.594C433.031 366.281 424.625 367.5 416 367.5zM447.875 576.125c0 17.656-14.344 32-32 32s-32-14.344-32-32 14.344-32 32-32S447.875 558.469 447.875 576.125zM639.875 320.125c0-17.656 14.375-32 32-32s32 14.344 32 32-14.375 32-32 32S639.875 337.781 639.875 320.125zM287.875 576.125c-17.656 0-32-14.344-32-32s14.344-32 32-32 32 14.344 32 32S305.531 576.125 287.875 576.125zM223.875 448.125c0 17.656-14.344 32-32 32s-32-14.344-32-32 14.344-32 32-32S223.875 430.469 223.875 448.125zM127.875 320.125c0-17.656 14.344-32 32-32s32 14.344 32 32-14.344 32-32 32S127.875 337.781 127.875 320.125zM575.875 544.125c0 17.656-14.375 32-32 32s-32-14.344-32-32 14.375-32 32-32S575.875 526.469 575.875 544.125zM792.875 495.312l-68.75-89.938C731.625 378.188 736 349.625 736 320c0-176.75-143.312-320-320-320S96 143.25 96 320c0 176.688 143.312 320 320 320 65.875 0 127-19.969 177.875-54.094l79.25 60.625C602.375 702.406 513.25 736 416 736 186.25 736 0 549.75 0 320s186.25-416 416-416 416 186.25 416 416C832 382.719 817.75 442 792.875 495.312z" horiz-adv-x="832" />
+<glyph glyph-name="database" unicode="&#xf096;" d="M384-128C171.969-128 0-70.625 0 0c0 38.625 0 80.875 0 128 0 11.125 5.562 21.688 13.562 32C56.375 104.875 205.25 64 384 64s327.625 40.875 370.438 96c8-10.312 13.562-20.875 13.562-32 0-37.062 0-76.375 0-128C768-70.625 596-128 384-128zM384 128C171.969 128 0 185.375 0 256c0 38.656 0 80.844 0 128 0 6.781 2.562 13.375 6 19.906l0 0C7.938 408 10.5 412.031 13.562 416 56.375 360.906 205.25 320 384 320s327.625 40.906 370.438 96c3.062-3.969 5.625-8 7.562-12.094l0 0c3.438-6.531 6-13.125 6-19.906 0-37.062 0-76.344 0-128C768 185.375 596 128 384 128zM384 384C171.969 384 0 441.344 0 512c0 20.219 0 41.594 0 64 0 20.344 0 41.469 0 64C0 710.656 171.969 768 384 768c212 0 384-57.344 384-128 0-19.969 0-41.156 0-64 0-19.594 0-40.25 0-64C768 441.344 596 384 384 384zM384 704c-141.375 0-256-28.594-256-64s114.625-64 256-64 256 28.594 256 64S525.375 704 384 704z" horiz-adv-x="768" />
+<glyph glyph-name="device-camera" unicode="&#xf056;" d="M512 447.999c-70.691 0-127.999-57.308-127.999-127.999S441.309 192.00099999999998 512 192.00099999999998c5.713 0 11.337 0.38 16.852 1.105-46.344 7.058-81.851 47.079-81.851 95.394 0 53.295 43.204 96.499 96.499 96.499 48.314 0 88.336-35.507 95.394-81.851 0.726 5.515 1.105 11.139 1.105 16.852C639.999 390.691 582.691 447.999 512 447.999zM896 576H767.999L640 704H384L255.999 576H128c-35.348 0-64-28.652-64-64v-448c0-35.347 28.652-64 64-64h768c35.347 0 64 28.653 64 64V512C960 547.348 931.347 576 896 576zM416 640h192l64-64H352L416 640zM160.143 64C142.391 64 128 78.39099999999996 128 96.14300000000003V384h64v64h-64v31.857C128 497.609 142.391 512 160.143 512h182.526c-3.98-3.518-7.881-7.174-11.688-10.98-99.974-99.975-99.974-262.064 0-362.039l74.98-74.98H160.143zM512 128.00099999999998c-106.038 0-191.999 85.961-191.999 191.999S405.962 511.999 512 511.999 703.999 426.038 703.999 320 618.038 128.00099999999998 512 128.00099999999998zM832 352L681.327 512H832V352z" horiz-adv-x="1024" />
+<glyph glyph-name="device-camera-video" unicode="&#xf057;" d="M576 640c-35.347 0-64-28.653-64-64s28.653-64 64-64 64 28.653 64 64S611.347 640 576 640zM896 448L768 320v64c0 30.625-21.515 56.21-50.25 62.503C748.958 480.646 768 526.097 768 575.998 768 682.038 682.039 768 576 768c-101.123 0-183.986-78.178-191.45-177.393C350.516 621.306 305.442 640 256 640c-106.038 0-192-85.962-192-192.002C64 341.961 149.962 256 256 256h-64v-128h64v-128c0-35.347 28.653-64 64-64h384c35.347 0 64 28.653 64 64v64l128-128h64V448H896zM256 512c-35.347 0-64-28.653-64-64s28.653-64 64-64v-64c-70.692 0-128 57.308-128 127.999C128 518.692 185.308 576 256 576s128-57.307 128-128h-64C320 483.347 291.347 512 256 512zM576 128H448V256h128V128zM704 237.21299999999997c-33.526 33.547-70.276 70.317-73.373 73.414C624.837 316.418 616.837 320 608 320H416c-17.674 0-32-14.326-32-32v-192c0-8.329 3.183-15.915 8.396-21.607 0.53-0.58 39.123-39.164 74.409-74.393H352c-17.674 0-32 14.326-32 32V352c0 17.674 14.326 32 32 32h320c17.674 0 32-14.326 32-32V237.21299999999997zM576 448c-70.692 0-128 57.308-128 127.999C448 646.692 505.308 704 576 704s128-57.308 128-128.001C704 505.308 646.692 448 576 448zM896 128l-64 64 0.082 128.084L896 384.002V128z" horiz-adv-x="1024" />
+<glyph glyph-name="device-desktop" unicode="&#xf27c;" d="M960 768c-32 0-864 0-896 0s-64-32-64-64 0-544 0-576 32-64 64-64 320 0 320 0-192-64-192-128c0-32 32-64 64-64s480 0 512 0 64 32 64 64c0 64-192 128-192 128s288 0 320 0 64 32 64 64 0 544 0 576-32 64-64 64z m0-640h-896v576h896v-576z m-64 512h-192c-384-64-542-300-576-384v-64h768v448z" horiz-adv-x="1024" />
+<glyph glyph-name="device-mobile" unicode="&#xf038;" d="M576 832H64C28.688 832 0 803.312 0 768v-896c0-35.375 28.688-64 64-64h512c35.375 0 64 28.625 64 64V768C640 803.312 611.375 832 576 832zM288 768h64c17.625 0 32-14.344 32-32s-14.375-32-32-32h-64c-17.656 0-32 14.344-32 32S270.344 768 288 768zM352-128h-64c-17.656 0-32 14.375-32 32s14.344 32 32 32h64c17.625 0 32-14.375 32-32S369.625-128 352-128zM576 0H64V640h512V0z" horiz-adv-x="640" />
+<glyph glyph-name="diff" unicode="&#xf04d;" d="M448 576H320v-128H192v-128h128v-128h128V320h128V448H448V576zM192-64h384V64H192V-64zM640 832H128v-64h480l224-224v-608h64V576L640 832zM0 704v-896h768V512L576 704H0zM704-128H64V640h480l160-160V-128z" horiz-adv-x="896" />
+<glyph glyph-name="diff-added" unicode="&#xf06b;" d="M512 512h-128v-128h-128v-128h128v-128h128v128h128v128h-128v128z m320 256c-32 0-736 0-768 0s-64-32-64-64 0-736 0-768 32-64 64-64 736 0 768 0 64 32 64 64 0 736 0 768-32 64-64 64z m-64-736c0-16-17-32-32-32s-558 0-576 0-32 12-32 32c0 16 0 560 0 576s16 32 32 32 561 0 576 0 32-16 32-32 0-560 0-576z" horiz-adv-x="896" />
+<glyph glyph-name="diff-ignored" unicode="&#xf099;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-512 194v-98h98l286 286v98h-98l-286-286z" horiz-adv-x="896" />
+<glyph glyph-name="diff-modified" unicode="&#xf06d;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-320 416c-71 0-128-57-128-128s57-128 128-128 128 57 128 128-57 128-128 128z" horiz-adv-x="896" />
+<glyph glyph-name="diff-removed" unicode="&#xf06c;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-512 224h384v128h-384v-128z" horiz-adv-x="896" />
+<glyph glyph-name="diff-renamed" unicode="&#xf06e;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-320 352h-192v-128h192v-128l256 192-256 192v-128z" horiz-adv-x="896" />
+<glyph glyph-name="ellipsis" unicode="&#xf09a;" d="M640 512c-64 0-448 0-512 0s-128-64-128-128 0-64 0-128 64-128 128-128 448 0 512 0 128 64 128 128 0 64 0 128-64 128-128 128z m-384-256h-128v128h128v-128z m192 0h-128v128h128v-128z m192 0h-128v128h128v-128z" horiz-adv-x="768" />
+<glyph glyph-name="eye" unicode="&#xf04e;" d="M512 704c-192 0-416-128-512-384 96-192 288-320 512-320s416 128 512 320c-96 256-320 384-512 384z m0-640c-192 0-352 128-384 256 32 128 192 256 384 256s352-128 384-256c-32-128-192-256-384-256z m0 448c-20 0-38-4-56-9 33-15 56-48 56-87 0-53-43-96-96-96-39 0-72 23-87 56-5-18-9-36-9-56 0-106 86-192 192-192s192 86 192 192-86 192-192 192z" horiz-adv-x="1024" />
+<glyph glyph-name="file-binary" unicode="&#xf094;" d="M0-128V768h576l192-192v-704H0zM704 512L512 704H64v-768h640V512zM320 320H128V576h192V320zM256 512h-64v-128h64V512zM256 64h64v-64H128v64h64V192h-64v64h128V64zM512 384h64v-64H384v64h64V512h-64v64h128V384zM576 0H384V256h192V0zM512 192h-64v-128h64V192z" horiz-adv-x="768" />
+<glyph glyph-name="file-code" unicode="&#xf010;" d="M288 448L128 288l160-160 64 64-96 96 96 96L288 448zM416 384l96-96-96-96 64-64 160 160L480 448 416 384zM576 768H0v-896h768V576L576 768zM704-64H64V704h448l192-192V-64z" horiz-adv-x="768" />
+<glyph glyph-name="file-directory" unicode="&#xf016;" d="M832 640c-32 0-336 0-352 0s-32 16-32 32 0 0 0 32-32 64-64 64-288 0-320 0-64-32-64-64 0-704 0-704h896s0 544 0 576-32 64-64 64z m-448 0h-320s0 15 0 32 16 32 32 32 241 0 256 0 32-15 32-32 0-32 0-32z" horiz-adv-x="896" />
+<glyph glyph-name="file-media" unicode="&#xf012;" d="M576 768H0v-896h768V576L576 768zM704-64H64V704h448l192-192V-64zM128 576v-512h128c0 70.625 57.344 128 128 128-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 70.625 0 128-57.344 128-128 0-70.625-57.375-128-128-128 70.625 0 128-57.375 128-128h128V448L512 576H128z" horiz-adv-x="768" />
+<glyph glyph-name="file-pdf" unicode="&#xf014;" d="M576 768H0v-896h768V576L576 768zM64 704h255.812c-13.188-4.094-27.281-15.031-34.625-42.875-13.25-49.406-7.031-130.75 15.625-209.344C276.688 370.562 178.188 175.125 171.531 163.5c-15.625-4.875-65.344-23.625-107.531-59.812V704zM347.125 396.531c57.625-149.781 95-149.531 135.188-167.594C398.344 216 334.219 206.75 249.781 169.5 246.094 163.062 326.281 315.40599999999995 347.125 396.531zM704-64H65.844 64v0.375c0.781-0.062 1.094-0.375 1.844-0.375 33.812 0 84.75 21 180.562 182.375 38.188 15.438 72.062 26.875 78.469 28.938 58.812 14.875 125 26.625 187.562 33.375C566.875 153.5 639.125 135 680.25 132.375c9.625-0.5 16.062 1.188 23.75 2V-64zM704 246.625c-23.688 14.688-54 25-89.125 25-24.25 0-50.625-1.375-78.688-4.375-26.938 13-92.562 32.719-147.188 190.219 17.094 103.625 12.719 173.562 12.719 173.562 6.781 52.938-23.344 72.844-51.625 72.844 0 0-0.279 0.125-0.344 0.125H512l192-192V246.625z" horiz-adv-x="768" />
+<glyph glyph-name="file-submodule" unicode="&#xf017;" d="M832 320c-32 0-192 0-192 0 0 32-32 64-64 64s-96 0-128 0-64-32-64-64 0-320 0-320h512s0 224 0 256-32 64-64 64z m-256-64h-128s0 17 0 32 15 32 32 32 48 0 64 0 32-15 32-32 0-32 0-32z m256 320c-32 0-336 0-352 0s-32 17-32 32 0 0 0 32-32 64-64 64-288 0-320 0-64-32-64-64 0-640 0-640h320s0 352 0 384 32 64 64 64 224 0 256 0 64-32 64-64h192s0 96 0 128-32 64-64 64z m-448 0h-320s0 16 0 32 16 32 32 32 240 0 256 0 32-17 32-32 0-32 0-32z" horiz-adv-x="896" />
+<glyph glyph-name="file-symlink-directory" unicode="&#xf0b1;" d="M832 640h-352c-16 0-32 16-32 32s0 0 0 32-32 64-64 64h-320c-32 0-64-32-64-64s0-704 0-704h896s0 544 0 576-32 64-64 64z m-768 32c0 17 16 32 32 32h256c15 0 32-15 32-32s0-32 0-32h-320s0 15 0 32z m384-544v128c-125 0-224-56-256-192 0 209 107 320 256 320 0 49 0 128 0 128l256-192-256-192z" horiz-adv-x="896" />
+<glyph glyph-name="file-symlink-file" unicode="&#xf0b0;" d="M576 768h-576v-896h768v704l-192 192z m128-832h-640v768h448l192-192v-576z m-320 448c-149 0-256-111-256-320 32 136 131 192 256 192v-128l256 192-256 192s0-79 0-128z" horiz-adv-x="768" />
+<glyph glyph-name="file-text" unicode="&#xf011;" d="M448 576H128v-64h320V576zM576 768H0v-896h768V576L576 768zM704-64H64V704h448l192-192V-64zM128 64h512v64H128V64zM128 192h512v64H128V192zM128 320h512v64H128V320z" horiz-adv-x="768" />
+<glyph glyph-name="file-zip" unicode="&#xf013;" d="M320 256v64h-64v-64H320zM320 384v64h-64v-64H320zM320 512v64h-64v-64H320zM192 448h64v64h-64V448zM576 768H0v-896h768V576L576 768zM704-64H64V704h192v-64h64v64h192l192-192V-64zM192 576h64v64h-64V576zM192 320h64v64h-64V320zM192 192l-64-64v-128h256V128l-64 64h-64v64h-64V192zM320 128v-64H192v64H320z" horiz-adv-x="768" />
+<glyph glyph-name="flame" unicode="&#xf0d2;" d="M433 787c50-134 24-207-32-265-61-64-156-112-223-206-89-125-104-400 217-472-135 71-164 277-18 406-38-125 32-205 119-176 85 29 141-32 139-102-1-48-20-89-69-112 209 37 293 210 293 342 0 174-155 198-77 344-93-8-125-69-116-169 6-66-63-111-114-81-41 25-40 73-4 109 77 76 107 251-115 382z" horiz-adv-x="1024" />
+<glyph glyph-name="fold" unicode="&#xf0cc;" d="M896 576H672l-64-64h192L672 384H224L96 512h192l-64 64H0v-63.999L160 352 0 192v-64h224l64 64H96l128 128h448l128-128H608l64-64h224v64L736 352l160 160.001V576zM640 640H512V832H384v-192H256l192-192L640 640zM256 64h128v-192h128V64h128L448 256 256 64z" horiz-adv-x="896" />
+<glyph glyph-name="gear" unicode="&#xf02f;" d="M447.938 482C358.531 482 286 409.469 286 320c0-89.375 72.531-162.062 161.938-162.062 89.438 0 161.438 72.688 161.438 162.062C609.375 409.469 537.375 482 447.938 482zM772.625 226.938l-29.188-70.312 52.062-102.25 6.875-13.5-72.188-72.188L611.75 24.625l-70.312-28.875L505.75-113.5l-4.562-14.5H399.156L355-4.687999999999988l-70.312 29-102.404-51.938-13.5-6.75-72.156 72.125 55.875 118.5-28.969 70.25L14.469 262.125 0 266.812V368.781L123.406 413l28.969 70.188-51.906 102.469-6.844 13.438 72.062 72.062 118.594-55.844 70.219 29.031 35.656 109.188L394.75 768h102l44.188-123.469 70.125-29.031L713.5 667.469l13.625 6.844 72.125-72.062-55.875-118.406L772.25 413.5l109.375-35.656L896 373.25v-101.938L772.625 226.938z" horiz-adv-x="896" />
+<glyph glyph-name="gift" unicode="&#xf042;" d="M448-128h320V192H448V-128zM64-128h320V192H64V-128zM447.75 455.812c31.469 3.5 66.875 7.406 87.375 9.719C619 474.875 694.5 550.406 703.812 634.25c9.312 83.75-51 144.125-134.688 134.719C503.688 761.656 443.844 714 416 653.625 388.156 714 328.312 761.656 262.906 769.031 179.188 778.375 118.781 718 128.188 634.25c9.344-83.844 84.875-159.312 168.656-168.719 20.531-2.312 55.938-6.281 87.406-9.719C383.75 451.594 384 448 384 448h64C448 448 448.25 451.594 447.75 455.812zM555.375 691.312c45.25 5.062 78-27.562 72.875-72.875-5-45.312-45.875-86.156-91.125-91.219-45.375-5.031-78 27.594-72.938 72.906C469.249 645.436 510.125 686.281 555.375 691.312zM294.906 527.219c-45.25 5.062-86.062 45.906-91.125 91.219-5.063 45.313 27.594 77.938 72.812 72.875 45.312-5.031 86.156-45.875 91.222-91.188C372.875 554.812 340.219 522.188 294.906 527.219zM448 448v-192h384V448H448zM0 256h384V448H0V256z" horiz-adv-x="896" />
+<glyph glyph-name="gist" unicode="&#xf00e;" d="M416 448l96-96-96-96 64-64 160 160-160 160-64-64z m-416 320v-832h768v832h-768z m704-768h-640v704h640v-704z m-352 256l-96 96 96 96-64 64-160-160 160-160 64 64z" horiz-adv-x="768" />
+<glyph glyph-name="gist-secret" unicode="&#xf08c;" d="M193 128l128-192h-256l-65 256 257 64-64-128z m448 128l64-128-128-192h256l64 256-256 64z m-84 0h-216l44-102-64-218h256l-64 218 44 102z m84 192h-384l-128-64h640l-128 64z m-64 256l-128-64-128 64-64-192h384l-64 192z" horiz-adv-x="896" />
+<glyph glyph-name="git-branch" unicode="&#xf020;" d="M512 640c-71 0-128-57-128-128 0-47 26-88 64-110v-18c0-64-64-128-128-128-53 0-95-11-128-29v303c38 22 64 63 64 110 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 34-13 64-34 87 19 23 49 41 98 41 128 0 256 128 256 256v18c38 22 64 63 64 110 0 71-57 128-128 128z m-384 64c35 0 64-29 64-64s-29-64-64-64-64 29-64 64 29 64 64 64z m0-768c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m384 512c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="640" />
+<glyph glyph-name="git-commit" unicode="&#xf01f;" d="M694.875 384C666.375 494.219 567.125 576 448 576c-119.094 0-218.375-81.781-246.906-192H0v-128h201.094C229.625 145.75 328.906 64 448 64c119.125 0 218.375 81.75 246.875 192H896V384H694.875zM448 192c-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 70.625 0 128-57.344 128-128C576 249.375 518.625 192 448 192z" horiz-adv-x="896" />
+<glyph glyph-name="git-compare" unicode="&#xf0ac;" d="M832 110s0 306 0 402-96 192-192 192c-64 0-64 0-64 0v128l-192-192 192-192v128s32 0 64 0 64-32 64-64 0-402 0-402c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110z m-64-174c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m-448 128s-32 0-64 0-64 32-64 64 0 402 0 402c38 22 64 63 64 110 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110 0 0 0-306 0-402s96-192 192-192c64 0 64 0 64 0v-128l192 192-192 192v-128z m-192 512c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="896" />
+<glyph glyph-name="git-merge" unicode="&#xf023;" d="M640 384c-47.625 0-88.625-26.312-110.625-64.906C523.625 319.5 518 320 512 320c-131.062 0-255.438 99.844-300.812 223.438C238.469 566.906 256 601.281 256 640c0 70.656-57.344 128-128 128S0 710.656 0 640c0-47.219 25.844-88.062 64-110.281V110.25C25.844 88.06200000000001 0 47.25 0 0c0-70.625 57.344-128 128-128s128 57.375 128 128c0 47.25-25.844 88.062-64 110.25V340.531C276.156 251.5 392.375 192 512 192c6.375 0 11.625 0.438 17.375 0.625C551.5 154.188 592.5 128 640 128c70.625 0 128 57.375 128 128C768 326.656 710.625 384 640 384zM128-64c-35.312 0-64 28.625-64 64 0 35.312 28.688 64 64 64 35.406 0 64-28.688 64-64C192-35.375 163.406-64 128-64zM128 576c-35.312 0-64 28.594-64 64s28.688 64 64 64c35.406 0 64-28.594 64-64S163.406 576 128 576zM640 192c-35.312 0-64 28.625-64 64 0 35.406 28.688 64 64 64 35.375 0 64-28.594 64-64C704 220.625 675.375 192 640 192z" horiz-adv-x="768" />
+<glyph glyph-name="git-pull-request" unicode="&#xf009;" d="M704 110s0 306 0 402-96 192-192 192c-64 0-64 0-64 0v128l-192-192 192-192v128s32 0 64 0 64-32 64-64 0-402 0-402c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110z m-64-174c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m-512 832c-71 0-128-57-128-128 0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110v419c38 22 64 63 64 110 0 71-57 128-128 128z m0-832c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m0 640c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="768" />
+<glyph glyph-name="globe" unicode="&#xf0b6;" d="M512 704c-212.077 0-384-171.923-384-384s171.923-384 384-384c25.953 0 51.303 2.582 75.812 7.49-9.879 4.725-10.957 40.174-1.188 60.385 10.875 22.5 45 79.5 11.25 98.625s-24.375 27.75-45 49.875-12.19 25.451-13.5 31.125c-4.5 19.5 19.875 48.75 21 51.75s1.125 14.25 0.75 17.625S545.75 265.25 542 265.625s-5.625-6-10.875-6.375-28.125 13.875-33 17.625-7.125 12.75-13.875 19.5-7.5 1.5-18 5.625-44.25 16.5-70.125 27-28.125 25.219-28.5 35.625-15.75 25.5-22.961 36.375c-7.209 10.875-8.539 25.875-11.164 22.5s13.5-42.75 10.875-43.875-8.25 10.875-15.75 20.625 7.875 4.5-16.125 51.75 7.5 71.344 9 96 20.25-9 10.5 6.75 0.75 48.75-6.75 60.75S275 602 275 602c1.125 11.625 37.5 31.5 63.75 49.875s42.281 4.125 63.375-2.625 22.5-4.5 15.375 2.25 3 10.125 19.5 7.5 21-22.5 46.125-20.625 2.625-4.875 6-11.25-3.75-5.625-20.25-16.875S469.25 599 498.5 577.625s20.25 14.25 17.25 30S537.125 611 537.125 611c18-12 14.674-0.66 27.799-4.785S613.625 572 613.625 572c-44.625-24.375-16.5-27-9-32.625s-15.375-16.5-15.375-16.5c-9.375 9.375-10.875-0.375-16.875-3.75s-0.375-12-0.375-12c-31.031-4.875-24-37.5-23.625-45.375s-19.875-19.875-25.125-31.125S536.75 395 527 393.5s-19.5 36.75-72 22.5c-15.828-4.297-51-22.5-32.25-59.625s49.875 10.5 60.375 5.25-3-28.875-0.75-29.25 29.625-1.031 31.125-33 41.625-29.25 50.25-30 37.5 23.625 41.625 24.75S626 309.125 662 288.5s54.375-17.625 66.75-26.25 3.75-25.875 15.375-31.5 58.125 1.875 69.75-17.25-48-115.125-66.75-125.625S719.75 53.375 701 38s-45-34.406-69.75-49.125c-21.908-13.027-25.85-36.365-35.609-43.732C767.496-16.67999999999995 896 136.64999999999998 896 320 896 532.077 724.077 704 512 704zM602 343.625c-5.25-1.5-16.125-11.25-42.75 4.5s-45 12.75-47.25 15.375c0 0-2.25 6.375 9.375 7.5 23.871 2.311 54-22.125 60.75-22.5s10.125 6.75 22.125 2.883C616.25 347.52 607.25 345.125 602 343.625zM476.375 665.75c-2.615 1.902 2.166 4.092 5.016 7.875 1.645 2.186 0.425 5.815 2.484 7.875 5.625 5.625 33.375 13.5 27.949-1.875C506.4 664.25 480.5 662.75 476.375 665.75zM543.5 617c-9.375 0.375-31.443 2.707-27.375 6.75 15.844 15.75-6 20.25-19.5 21.375S477.5 653.75 484.25 654.5s33.75-0.375 38.25-4.125 28.875-13.5 30.375-20.625S552.875 616.625 543.5 617zM624.875 619.625c-7.5-6-45.24 21.529-52.5 27.75-31.5 27-48.375 18-54.99 22.5-6.617 4.5-4.26 10.5 5.865 19.5s38.625-3 55.125-4.875 35.625-14.625 36-29.781C614.75 639.564 632.375 625.625 624.875 619.625z" horiz-adv-x="1024" />
+<glyph glyph-name="graph" unicode="&#xf043;" d="M704 576H512v-640h192V576zM960 384H768v-448h192V384zM64-128V0h64v64H64V192h64v64H64V384h64v64H64V576h64v64H64V768h64V832H0v-1024h1024v64H64zM448 256H256v-320h192V256z" horiz-adv-x="1024" />
+<glyph glyph-name="heart" unicode="&#x2665;" d="M384-32c399 314 384 425 384 512s-72 192-192 192-192-128-192-128-72 128-192 128-192-105-192-192-15-198 384-512z" horiz-adv-x="768.199" />
+<glyph glyph-name="history" unicode="&#xf07e;" d="M448 768c-90.938 0-175.312-27.531-245.938-74.062L128 768v-256h256l-88 88c45.438 24.688 96.688 40 152 40 176.75 0 320-143.219 320-320 0-176.75-143.25-320-320-320-176.781 0-320 143.25-320 320 0 45.562 9.781 88.781 27 128H64v99.406C24.312 480.5 0 403.406 0 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448C896 567.438 695.438 768 448 768zM447.031 1L512 64V256h128l64 64-64 64H512l-64 64L320 320l64-64v-192L447.031 1z" horiz-adv-x="896" />
+<glyph glyph-name="home" unicode="&#xf08d;" d="M192 256l64-384h192V192h128v-320h192l64 384L512 576 192 256zM832 448V704H704l0.312-128.312L512 768 0 256h128l384 384 384-384h128L832 448z" horiz-adv-x="1024" />
+<glyph glyph-name="horizontal-rule" unicode="&#xf070;" d="M63.938 384h128v-128h64V639.938h-64V448h-128V639.938H0V256h63.938V384zM639.875 256V384h-63.938v-128H639.875zM639.875 448V575.938h-63.938V448H639.875zM447.938 448V575.938h128v64h-192V256h64V384h128v64H447.938zM0 0h639.875V128H0V0z" horiz-adv-x="639.875" />
+<glyph glyph-name="hourglass" unicode="&#xf09e;" d="M571 320c118 85 197 240 197 384 0 71-172 128-384 128s-384-57-384-128c0-144 80-299 197-384-118-85-197-240-197-384 0-71 172-128 384-128s384 57 384 128c0 144-80 299-197 384z m-187 448c141 0 256-29 256-64s-115-64-256-64-256 29-256 64 115 64 256 64z m-64-706c-154-7-238-40-253-82 16 114 75 189 141 251 73 68 112 60 112 103v-273z m-105 352c-70 55-122 130-142 215 70-32 183-53 311-53s241 21 311 53c-20-85-72-160-142-215-24 17-70 34-169 34s-145-17-169-34z m233-352v273c0-43 39-35 112-103 66-62 125-138 141-251-14 41-99 75-253 82z" horiz-adv-x="768" />
+<glyph glyph-name="hubot" unicode="&#xf09d;" d="M512 768c-283 0-512-229-512-512 0 0 0-192 0-256s64-128 128-128 704 0 768 0 128 64 128 128 0 256 0 256c0 283-229 512-512 512z m96-768h-192c-18 0-32 14-32 32s14 32 32 32h192c18 0 32-14 32-32s-14-32-32-32z m288 128c0-32-32-64-64-64s-128 0-128 0c0 32-32 64-64 64s-224 0-256 0-64-32-64-64c0 0-96 0-128 0s-64 32-64 64 0 360 0 360c78 129 220 216 384 216s306-87 384-216c0 0 0-328 0-360z m-128 384c-32 0-480 0-512 0s-64-32-64-64 0-96 0-128 32-64 64-64 480 0 512 0 64 32 64 64 0 96 0 128-32 64-64 64z m0-128l-64-64h-128l-64 64-64-64h-128l-64 64v64h64l64-64 64 64h128l64-64 64 64h64v-64z" horiz-adv-x="1024" />
+<glyph glyph-name="inbox" unicode="&#xf0cf;" d="M704 640H64L0 256v-256h768V256L704 640zM576 256l-64-128H256l-64 128H79l49 320h512l49-320H576z" horiz-adv-x="768" />
+<glyph glyph-name="info" unicode="&#xf059;" d="M448 448c35 0 64 29 64 64s-29 64-64 64-64-29-64-64 29-64 64-64z m0 320c-247 0-448-201-448-448s201-448 448-448 448 201 448 448-201 448-448 448z m0-768c-177 0-320 143-320 320s143 320 320 320 320-143 320-320-143-320-320-320z m64 320c0 32-32 64-64 64s-32 0-64 0-64-32-64-64h64s0-160 0-192 32-64 64-64 32 0 64 0 64 32 64 64h-64s0 160 0 192z" horiz-adv-x="896" />
+<glyph glyph-name="issue-closed" unicode="&#xf028;" d="M704 515.969l-96-96L768 256l256 256-96 96L769.25 449.219 704 515.969zM512 0c-176.781 0-320 143.25-320 320 0 176.781 143.219 320 320 320 88.375 0 168.375-35.844 226.25-93.75l90.562 90.5C747.75 717.875 635.75 768 512 768 264.562 768 64 567.438 64 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448L759.75 119.75C768.688 130.75 684.75 0 512 0zM576 576H448v-320h128V576zM448 64h128V192H448V64z" horiz-adv-x="1024" />
+<glyph glyph-name="issue-opened" unicode="&#xf026;" d="M448 768C200.562 768 0 567.438 0 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448C896 567.438 695.438 768 448 768zM448 0c-176.781 0-320 143.25-320 320 0 176.781 143.219 320 320 320 176.75 0 320-143.219 320-320C768 143.25 624.75 0 448 0zM384 64h128V192H384V64zM384 256h128V576H384V256z" horiz-adv-x="896" />
+<glyph glyph-name="issue-reopened" unicode="&#xf027;" d="M639.125 64.75C585.75 24.625 520 0 448 0c-176.781 0-320 143.25-320 320 0 45.562 9.781 88.781 27 128H64v99.469C24.312 480.562 0 403.406 0 320c0-247.438 200.562-448 448-448 107.375 0 204.5 39.312 281.75 102.25L768-64V128H576L639.125 64.75zM384 64h128V192H384V64zM512 576H384v-320h128V576zM896 320c0 247.438-200.562 448-448 448-107.406 0-204.531-39.312-281.656-102.344L128 704v-192h192l-63.156 63.156C310.281 615.312 376 640 448 640c176.75 0 320-143.219 320-320 0-45.562-9.75-88.75-27-128h91v-99.5C871.688 159.438 896 236.5 896 320z" horiz-adv-x="896" />
+<glyph glyph-name="jersey" unicode="&#xf019;" d="M704 832h-192c0-32-33-64-97-64s-95 32-95 64h-192c0-128-2-384-128-384 0 0-1-544-1-576s32-64 64-64 672 0 704 0 64 32 64 64 0 576 0 576c-126 0-128 256-128 384z m-609-960c-16 0-31 10-31 32 0 32 0 480 0 480 119 64 128 192 128 384h64c0-96 32-191 160-192s160 96 160 192h64c0-186 32-276 64-339v-557s-593 0-609 0z m385 576l-32-32v-320l32-32h128l32 32v320l-32 32h-128z m96-320h-64v256h64v-256z m-352 320l-32-32v-320l32-32h128l32 32v320l-32 32h-128z m96-320h-64v256h64v-256z" horiz-adv-x="896" />
+<glyph glyph-name="jump-down" unicode="&#xf072;" d="M767.75 640H0.25L384 256.25 767.75 640zM0 128v-128h768V128H0z" horiz-adv-x="768" />
+<glyph glyph-name="jump-left" unicode="&#xf0a5;" d="M256.25 320L640-63.75v767.5L256.25 320zM0-64h128V704H0V-64z" horiz-adv-x="640" />
+<glyph glyph-name="jump-right" unicode="&#xf0a6;" d="M0-63.75L383.75 320 0 703.812V-63.75zM512 704v-768h128V704H512z" horiz-adv-x="640" />
+<glyph glyph-name="jump-up" unicode="&#xf073;" d="M0.188 0h767.5L384 383.75 0.188 0zM0 640v-128h768V640H0z" horiz-adv-x="768" />
+<glyph glyph-name="key" unicode="&#xf049;" d="M640.9 768.1c-141.4 0-256-114.6-256-256 0-19.6 2.2-38.6 6.4-56.9L0 64v-64l64-64h128l64 64v64h64v64h64v64h128l70.8 70.8c18.7-4.3 38.1-6.6 58.1-6.6 141.4 0 256 114.6 256 256S782.2 768.1 640.9 768.1zM384 320L64 0v64l320 320V320zM704 512c-35.3 0-64 28.7-64 64 0 35.3 28.7 64 64 64s64-28.7 64-64C768 540.7 739.3 512 704 512z" horiz-adv-x="896.9" />
+<glyph glyph-name="keyboard" unicode="&#xf00d;" d="M640 256h64V384h-64V256zM768 576h-64v-128h64V576zM640 576h-64v-128h64V576zM512 256h64V384h-64V256zM384 64h320V192H384V64zM768 256h128V576h-64v-192h-64V256zM256 64h64V192h-64V64zM768 64h128V192H768V64zM512 576h-64v-128h64V576zM192 384h-64v-128h64V384zM192 192h-64v-128h64V192zM0 704v-768h1024V704H0zM960 0H64V640h896V0zM384 256h64V384h-64V256zM256 576H128v-128h128V576zM384 576h-64v-128h64V576zM256 256h64V384h-64V256z" horiz-adv-x="1024" />
+<glyph glyph-name="law" unicode="&#xf0d8;" d="M514 640c34 1 61 28 62 62 1 37-29 67-66 66-34-1-61-28-62-62-1-37 29-67 66-66z m464-384h-18l-127 246c18 2 36 9 52 16 24 11 29 43 11 62l-1 1c-11 11-28 15-43 8-14-6-34-13-53-13-56 0-81 64-287 64s-231-64-287-64c-20 0-39 6-53 13-15 6-32 3-43-8l-1-1c-18-19-13-50 11-62 16-8 34-14 52-16l-127-246h-18c-8 0-14-7-13-15 11-64 92-113 191-113s180 49 191 113c1 8-5 15-13 15h-18l-127 245c83 7 127 49 191 49v-486c-35 0-64-29-64-64h-71c-28 0-57-29-57-64h512c0 35-29 64-71 64h-57c0 35-29 64-64 64v486c64 0 108-42 191-49l-127-245h-18c-8 0-14-7-13-15 11-64 92-113 191-113s180 49 191 113c1 8-5 15-13 15z m-658 0h-192l96 180 96-180z m384 0l96 180 96-180h-192z" horiz-adv-x="1024" />
+<glyph glyph-name="light-bulb" unicode="&#xf000;" d="M512 768c-176.731 0-320-143.269-320-320 0-104.69 50.278-197.633 128-256.015V0c0-35.346 28.653-64 64-64 0-35.346 28.653-64 64-64h128c35.347 0 64 28.654 64 64 35.347 0 64 28.654 64 64V191.985C781.722 250.36699999999996 832 343.31 832 448 832 624.731 688.731 768 512 768zM640 32c0-17.673-14.326-32-32-32H416c-17.674 0-32 14.327-32 32v32h256V32zM704 278.693c-33.234-33.03-64-42.389-64-124.041V128h-64V256l128 128v64l-64 64-64-64-64 64-64-64-64 64-64-64v-64l128-128v-128h-64v26.652c0 81.652-30.766 91.011-64 124.041C280.177 323.82 256 383.082 256 448c0 141.385 114.615 256 256 256s256-114.615 256-256C768 383.082 743.823 323.82 704 278.693zM512 256L384 384v64l64-64 64 64 64-64 64 64v-64L512 256z" horiz-adv-x="1024" />
+<glyph glyph-name="link" unicode="&#xf05c;" d="M768 576h-138c48-32 93-89 107-128h30c65 0 128-64 128-128s-65-128-128-128h-192c-63 0-128 64-128 128 0 23 7 45 18 64h-137c-5-21-8-42-8-64 0-128 127-256 255-256s65 0 193 0 256 128 256 256-128 256-256 256z m-481-384h-30c-65 0-128 64-128 128s65 128 128 128h192c63 0 128-64 128-128 0-23-7-45-18-64h137c5 21 8 42 8 64 0 128-127 256-255 256s-65 0-193 0-256-128-256-256 128-256 256-256h138c-48 32-93 89-107 128z" horiz-adv-x="1024" />
+<glyph glyph-name="link-external" unicode="&#xf07f;" d="M640 64H128V574.094L256 576V704H0v-768h768V256H640V64zM384 704l128-128L320 384l128-128 192 192 128-128V704H384z" horiz-adv-x="768" />
+<glyph glyph-name="list-ordered" unicode="&#xf062;" d="M320 256h448v128h-448v-128z m0-256h448v128h-448v-128z m0 640v-128h448v128h-448z m-241-256h78v256h-36l-85-23v-50l43 2v-185z m110-206c0 36-12 78-96 78-33 0-64-6-83-16l1-66c21 10 42 15 67 15s32-11 32-28c0-26-30-58-110-112v-50h192v67l-91-2c49 30 87 66 87 113l1 1z" horiz-adv-x="768" />
+<glyph glyph-name="list-unordered" unicode="&#xf061;" d="M0 256h128v128h-128v-128z m0 256h128v128h-128v-128z m0-512h128v128h-128v-128z m256 256h512v128h-512v-128z m0 256h512v128h-512v-128z m0-512h512v128h-512v-128z" horiz-adv-x="768" />
+<glyph glyph-name="location" unicode="&#xf060;" d="M320 832c-177 0-320-143-320-320s160-416 320-704c160 288 320 527 320 704s-143 320-320 320z m0-448c-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128z" horiz-adv-x="640" />
+<glyph glyph-name="lock" unicode="&#xf06a;" d="M704 384c-32 0-64 0-64 0s0 64 0 192-128 256-256 256-256-128-256-256 0-192 0-192-32 0-64 0-64-32-64-64 0-416 0-448 32-64 64-64 608 0 640 0 64 32 64 64 0 416 0 448-32 64-64 64z m-192-128h-384v-64h384v-64h-384v-64h384v-64h-384v-64h384v-64h-448v448h448v-64z m0 128h-256s0 128 0 192 64 128 128 128 128-64 128-128 0-192 0-192z" horiz-adv-x="768" />
+<glyph glyph-name="logo-github" unicode="&#xf092;" d="M552.73 499.865H311.557c-6.205 0-11.25-5.045-11.25-11.297v-117.887c0-6.252 5.045-11.272 11.25-11.272h94.109v-146.542c0 0-21.145-7.057-79.496-7.057-68.914 0-165.156 25.244-165.156 236.795 0 211.642 100.197 239.491 194.307 239.491 81.465 0 116.514-14.304 138.869-21.241 7.01-2.203 13.404 4.831 13.404 11.105L534.543 785.87c0 2.912-1.041 6.417-4.262 8.785C521.186 801.048 465.865 832 326.168 832 165.133 832 0 763.513 0 434.243 0 105.02099999999996 189.051 56 348.381 56c131.883 0 212.021 56.314 212.021 56.314 3.268 1.801 3.6 6.395 3.6 8.479V488.568C563.955 494.773 558.887 499.865 552.73 499.865zM1772.381 803.866h-135.695c-6.252 0-11.271-5.044-11.271-11.296v-262.393h-211.619V792.57c0 6.252-5.068 11.296-11.178 11.296h-135.838c-6.111 0-11.084-5.044-11.084-11.296v-710.473c0-6.299 5.021-11.32 11.084-11.32h135.838c6.203 0 11.178 5.068 11.178 11.32V385.933h211.619l-0.475-303.883c0-6.3 5.021-11.272 11.084-11.272h135.885c6.252 0 11.131 5.068 11.131 11.272l0.473 710.521C1783.607 798.822 1778.539 803.866 1772.381 803.866zM714.949 787.763c-48.357 0-87.574-39.572-87.574-88.403 0-48.855 39.217-88.428 87.574-88.428s87.527 39.572 87.527 88.428C802.477 748.19 763.307 787.763 714.949 787.763zM792.861 559.874c0 6.205-5.02 11.344-11.131 11.344H646.32c-6.348 0-11.746-6.394-11.746-12.67 0 0 0-394.654 0-469.867 0-13.735 8.572-17.903 19.703-17.903 0 0 57.688 0 121.959 0 13.311 0 16.814 6.536 16.814 18.188-0.094 25.197-0.094 123.808-0.094 142.942C792.861 250.09500000000003 792.861 559.874 792.861 559.874zM2297.973 570.152h-134.701c-6.158 0-11.084-5.092-11.084-11.344v-348.31c0 0-34.244-25.197-82.934-25.197-48.547 0-61.525 22.024-61.525 69.719 0 47.553 0 303.835 0 303.835 0 6.252-5.068 11.345-11.131 11.345h-136.643c-6.252 0-11.178-5.093-11.178-11.345 0 0 0-185.521 0-326.807 0-141.284 78.766-175.906 186.99-175.906 88.854 0 160.609 49.115 160.609 49.115s3.363-25.766 5.068-28.844c1.422-3.078 5.447-6.158 9.852-6.158h86.58c6.158 0 11.178 5.069 11.178 11.321l0.379 477.278C2309.15 565.0609999999999 2304.129 570.152 2297.973 570.152zM2666.932 586.1610000000001c-76.539 0-128.592-34.148-128.592-34.148V792.57c0 6.252-5.068 11.296-11.131 11.296h-136.264c-6.109 0-11.131-5.044-11.131-11.296l-0.379-710.521c0-6.3 5.068-11.272 11.225-11.272 0 0 94.773 0 94.869 0 4.215 0 7.389 2.179 9.805 5.968 2.369 3.837 5.73 32.775 5.73 32.775s55.557-52.763 161.035-52.763c123.807 0 194.758 62.804 194.758 281.906C2856.859 557.482 2743.471 586.1610000000001 2666.932 586.1610000000001zM2613.791 185.77499999999998c-46.701 1.421-78.34 22.64-78.34 22.64v225.07c0 0 31.307 19.206 69.672 22.593 48.547 4.31 95.438-10.326 95.438-126.13C2700.322 207.94100000000003 2679.199 183.83399999999995 2613.791 185.77499999999998zM1185.125 188.33299999999997c-5.969 0-21.219-2.368-36.85-2.368-49.92 0-66.971 23.256-66.971 53.331 0 30.218 0 199.85 0 199.85h101.926c6.252 0 11.178 5.044 11.178 11.343v109.48c0.094 6.299-4.926 11.344-11.178 11.344h-101.926l-0.143 134.535c0 5.092-2.699 7.625-8.572 7.625H933.861c-5.352 0-8.336-2.391-8.336-7.578v-139.035c0 0-69.576-16.79-74.266-18.188-4.641-1.326-8.051-5.684-8.051-10.822v-87.408c0-6.252 5.068-11.344 11.178-11.344h71.139c0 0 0-91.34 0-210.222 0-156.109 109.553-171.455 183.439-171.455 33.723 0 74.076 10.988 80.848 13.356 4.074 1.421 6.395 5.637 6.395 10.136l0.047 96.101C1196.254 183.312 1190.998 188.428 1185.125 188.33299999999997z" horiz-adv-x="2856.857" />
+<glyph glyph-name="mail" unicode="&#xf03b;" d="M0 640v-640h896V640H0zM768 576L448 312 128 576H768zM64 512l252.031-191.625L64 128V512zM128 64l254 206.25L448 220l65.875 50.125L768 64H128zM832 128L579.625 320.062 832 512V128z" horiz-adv-x="896" />
+<glyph glyph-name="mail-read" unicode="&#xf03c;" d="M576 448H256v-64h320V448zM384 576H256v-64h128V576zM768 603.469V704H627.188L448 832 268.812 704H128v-100.531L0 512v-640h896V512L768 603.469zM192 640h512v-244.812L448 184 192 395.188V640zM64 384l252.031-191.625L64 0V384zM128-64l254 206.25L448 92l65.875 50.125L768-64H128zM832 0L579.625 192.062 832 384V0z" horiz-adv-x="896" />
+<glyph glyph-name="mail-reply" unicode="&#xf051;" d="M384 672l-384-288 384-288v192c111 0 329-61 384-280 0 291-196 451-384 472v192z" horiz-adv-x="768" />
+<glyph glyph-name="mark-github" unicode="&#xf00a;" d="M512 832C229.25 832 0 602.75 0 320c0-226.25 146.688-418.125 350.156-485.812 25.594-4.688 34.938 11.125 34.938 24.625 0 12.188-0.469 52.562-0.719 95.312C242-76.81200000000001 211.906 14.5 211.906 14.5c-23.312 59.125-56.844 74.875-56.844 74.875-46.531 31.75 3.53 31.125 3.53 31.125 51.406-3.562 78.47-52.75 78.47-52.75 45.688-78.25 119.875-55.625 149-42.5 4.654 33 17.904 55.625 32.5 68.375C304.906 106.56200000000001 185.344 150.5 185.344 346.688c0 55.938 19.969 101.562 52.656 137.406-5.219 13-22.844 65.094 5.062 135.562 0 0 42.938 13.75 140.812-52.5 40.812 11.406 84.594 17.031 128.125 17.219 43.5-0.188 87.312-5.875 128.188-17.281 97.688 66.312 140.688 52.5 140.688 52.5 28-70.531 10.375-122.562 5.125-135.5 32.812-35.844 52.625-81.469 52.625-137.406 0-196.688-119.75-240-233.812-252.688 18.438-15.875 34.75-47 34.75-94.75 0-68.438-0.688-123.625-0.688-140.5 0-13.625 9.312-29.562 35.25-24.562C877.438-98 1024 93.875 1024 320 1024 602.75 794.75 832 512 832z" horiz-adv-x="1024" />
+<glyph glyph-name="markdown" unicode="&#xf0c9;" d="M950.154 640H73.846C33.127 640 0 606.873 0 566.154v-492.308C0 33.125 33.127 0 73.846 0h876.308c40.721 0 73.846 33.125 73.846 73.846V566.154C1024 606.873 990.875 640 950.154 640zM576 128.125L448 128V320l-96-123.077L256 320v-192H128V512h128l96-128 96 128 128 0.125V128.125zM767.091 96.125L608 320h96V512h128v-192h96L767.091 96.125z" horiz-adv-x="1024" />
+<glyph glyph-name="megaphone" unicode="&#xf077;" d="M832 800c-130 0-124-130-704-128C57.344 672 0 557.375 0 416s57.344-256 128-256c22.781 0 43.188-0.5 64.188-0.875L256-128l192-32 64 96-45.125 203.125C709.375 102.875 733.75 32 832 32c106 0 192 172 192 384C1024 628.031 938 800 832 800zM197 349.062c-39.188 1.469-82.188 2.25-127.562 2.625C66 371.406 64 393.094 64 416c0 88.375 28.688 192 64 192 39.031-0.125 75 0.438 109 1.406C209.656 562.438 192 493.688 192 416 192 392.688 194.062 370.562 197 349.062zM261.312 346.062C258.125 368.312 256 391.625 256 416c0 79.5 18.438 149.5 46.906 196.219 155.156 8.312 251.906 28.469 319.031 50.188C593.625 595.531 576 510.344 576 416c0-40 3.875-78 9.5-114.312C513.344 320.375 412.812 337.406 261.312 346.062zM832 128c-12.125 0-23.688 5.062-34.812 12.125-15.25 67.312-83.438 418.344 117.438 494.188C942.125 581.5 960 503.812 960 416 960 257 902.625 128 832 128z" horiz-adv-x="1024" />
+<glyph glyph-name="mention" unicode="&#xf0be;" d="M466.697 732.899C238.66 760.898 31.1 598.735 3.102 370.698c-28-228.038 134.163-435.598 362.2-463.597 71.429-8.756 145.115 0.913 213.325 29.946l-0.016 0.032c24.404 10.357 35.788 38.538 25.431 62.939-10.359 24.403-38.538 35.787-62.94 25.43l-0.001 0.004c-52.472-22.339-109.15-29.799-164.1-23.067-175.413 21.538-300.153 181.2-278.616 356.613 21.538 175.413 181.199 300.154 356.613 278.616 175.412-21.538 300.154-181.199 278.617-356.612-4.309-35.083-21.542-55.725-61.6-55.725-42.5 0-64 45.889-64 81.222V432c0 26.51-21.49 48-48 48-9.699 0-18.72-2.887-26.269-7.833-25.684 20.259-57.437 33.87-94.349 38.402-105.246 12.923-201.045-61.924-213.967-167.17C212.508 238.15200000000004 287.354 142.35400000000004 392.6 129.43200000000002c57.379-7.045 116.216 14.707 157.871 53.13 24.959-28.124 59.866-47.624 100.121-52.567 87.707-10.769 167.537 51.602 178.307 139.309C856.898 497.34 694.734 704.899 466.697 732.899zM511.285 308.30100000000004c-6.462-52.623-54.361-90.047-106.985-83.585-52.623 6.461-90.046 54.36-83.585 106.984 6.461 52.623 54.361 90.046 106.984 83.585C480.322 408.823 517.746 360.924 511.285 308.30100000000004z" horiz-adv-x="832" />
+<glyph glyph-name="microscope" unicode="&#xf089;" d="M617-64c86.312 18.75 151 100 151 192 0 58.438-26.625 110.125-67.875 145.375C702.5 288.625 704 304.125 704 320c0 104.844-49.875 197.875-128 256l64 64v64l64 64L640 832l-64-64h-64L256 512l-128-64v-128l64-64h128l64 128 96 96c55.5-33.406 96-90.438 96-160-106.062 0-192-85.938-192-192H0v-64h192c19.125-14.25 42.062-22.125 64-32v-96H128L0-192h768L640-64H617zM512 128c0 35.375 28.625 64 64 64s64-28.625 64-64c0-35.312-28.625-64-64-64S512 92.68799999999999 512 128z" horiz-adv-x="768" />
+<glyph glyph-name="milestone" unicode="&#xf075;" d="M704 640H0v-256h704l128 128L704 640zM448 448H320V576h128V448zM448 832H320v-128h128V832zM320-192h128V320H320V-192z" horiz-adv-x="832" />
+<glyph glyph-name="mirror" unicode="&#xf024;" d="M320 512L128 320l192-192V256h384v-128l192 192L704 512v-128H320V512zM512 832L0 512v-704l512 256 512-256V512L512 832zM960-64L576 128v64H448v-64L64-64V448l384 256v-256h128V704l384-256V-64z" horiz-adv-x="1024" />
+<glyph glyph-name="mortar-board" unicode="&#xf0d7;" d="M501 244l-245 76s0-96 0-160 115-96 256-96 256 32 256 96 0 160 0 160l-245-76c-7-2-15-2-23 0h1z m18 409c-4 1-9 1-13 0l-489-152c-21-7-21-36 0-43l111-35v-113c-19-11-32-32-32-55 0-12 3-23 9-32-5-9-9-20-9-32v-165c0-35 128-35 128 0v165c0 12-3 23-9 32 5 9 9 20 9 32 0 24-13 44-32 55v93l313-98c4-1 9-1 13 0l489 152c21 7 21 36 0 43l-488 153z m-6-205c-35 0-64 14-64 32s29 32 64 32 64-14 64-32-29-32-64-32z" horiz-adv-x="1024" />
+<glyph glyph-name="move-down" unicode="&#xf0a8;" d="M640 512H448V832H192v-320H0l320-384L640 512zM0-192h640V0H0V-192z" horiz-adv-x="640" />
+<glyph glyph-name="move-left" unicode="&#xf074;" d="M0 0h192V640H0V0zM704 448V640L320 320l384-320V192h320V448H704z" horiz-adv-x="1024" />
+<glyph glyph-name="move-right" unicode="&#xf0a9;" d="M832 640v-640h192V640H832zM320 448H0v-256h320v-192l384 320L320 640V448z" horiz-adv-x="1024" />
+<glyph glyph-name="move-up" unicode="&#xf0a7;" d="M0 128h192v-320h256V128h192L320 512 0 128zM0 832v-192h640V832H0z" horiz-adv-x="640" />
+<glyph glyph-name="mute" unicode="&#xf080;" d="M128 448H0v-256h128l256-192h64V640h-64L128 448zM864 416l-64 64-96-96-96 96-63-63.5 95-96.5-96-96 64-64 96 96 96-96 64 64-96 96L864 416z" horiz-adv-x="896" />
+<glyph glyph-name="no-newline" unicode="&#xf09c;" d="M896 512v-128H768V512L576 320l192-192V256h192c0 0 64 0.375 64 64s0 192 0 192H896zM224 544C100.281 544 0 443.719 0 320c0-123.75 100.281-224 224-224s224 100.25 224 224C448 443.719 347.719 544 224 544zM96 320c0 70.656 57.344 128 128 128 18.75 0 36.406-4.219 52.469-11.531L107.531 267.5C100.219 283.625 96 301.25 96 320zM224 192c-18.75 0-36.406 4.25-52.469 11.5l168.938 168.969C347.781 356.406 352 338.75 352 320 352 249.375 294.656 192 224 192z" horiz-adv-x="1024" />
+<glyph glyph-name="octoface" unicode="&#xf008;" d="M940.812 554.312c8.25 20.219 35.375 101.75-8.562 211.906 0 0-67.375 21.312-219.875-82.906C648.5 700.875 579.875 703.5 512 703.5c-67.906 0-136.438-2.625-200.5-20.25C159.031 787.531 91.719 766.219 91.719 766.219 47.812 656 74.938 574.531 83.188 554.312 31.5 498.438 0 427.125 0 339.656 0 10.437999999999988 213.25-64 510.844-64 808.562-64 1024 10.437999999999988 1024 339.656 1024 427.125 992.5 498.438 940.812 554.312zM512-1c-211.406 0-382.781 9.875-382.781 214.688 0 48.938 24.062 94.595 65.344 132.312 68.75 62.969 185.281 29.688 317.438 29.688 132.25 0 248.625 33.281 317.438-29.625 41.312-37.78 65.438-83.312 65.438-132.312C894.875 8.875 723.375-1 512-1zM351.156 319.562c-42.469 0-76.906-51.062-76.906-114.188s34.438-114.312 76.906-114.312c42.375 0 76.812 51.188 76.812 114.312S393.531 319.562 351.156 319.562zM672.875 319.562C630.5 319.562 596 268.5 596 205.375s34.5-114.312 76.875-114.312 76.812 51.188 76.812 114.312C749.75 268.5 715.312 319.562 672.875 319.562z" horiz-adv-x="1024" />
+<glyph glyph-name="organization" unicode="&#xf037;" d="M768 448h-64H576h-64-64-64-64H192h-64C57.344 448 0 390.656 0 320v-64c0-47.25 25.844-88.062 64-110.25V-64h256v-128h256V-64h256V145.75c38.125 22.188 64 62.938 64 110.25v64C896 390.656 838.625 448 768 448zM256 0H128V256H64v64c0 35.312 28.688 64 64 64h81.719c-11-18.875-17.719-40.562-17.719-64v-128c0-47.25 25.844-88.062 64-110.25V0zM576 128V256h-64v-384H384V256h-64v-128c-35.312 0-64 28.625-64 64V320c0 35.312 28.688 64 64 64h256c35.375 0 64-28.688 64-64v-128C640 156.625 611.375 128 576 128zM832 256h-64v-256H640v81.75c38.125 22.188 64 62.938 64 110.25V320c0 23.438-6.75 45.125-17.75 64H768c35.375 0 64-28.688 64-64V256zM303.688 514.625C338.875 474.125 390.156 448 448 448c57.875 0 109.125 26.125 144.312 66.625C614.125 475.062 655.688 448 704 448c70.625 0 128 57.344 128 128s-57.375 128-128 128c-25.625 0-49.375-7.688-69.375-20.688C614.875 768.438 539.062 832 448 832S281.094 768.438 261.375 683.312C241.344 696.312 217.594 704 192 704c-70.656 0-128-57.344-128-128s57.344-128 128-128C240.312 448 281.844 475.062 303.688 514.625zM704 640c35.375 0 64-28.594 64-64s-28.625-64-64-64c-35.312 0-64 28.594-64 64S668.688 640 704 640zM448 768c70.625 0 128-57.344 128-128s-57.375-128-128-128c-70.656 0-128 57.344-128 128S377.344 768 448 768zM192 512c-35.312 0-64 28.594-64 64s28.688 64 64 64c35.406 0 64-28.594 64-64S227.406 512 192 512z" horiz-adv-x="896" />
+<glyph glyph-name="package" unicode="&#xf0c4;" d="M480 768L0 640v-576l480-128 480 128V640L480 768zM63.875 111.06600000000003L63.5 544l384.498-102.533 0.001-432.833L63.875 111.06600000000003zM63.5 608l160.254 42.734L640 539.735v-0.135l-160-42.667L63.5 608zM896.125 111.06600000000003L512.001 8.634000000000015l0.001 432.833L640 475.6v-156l128 34.135V509.733L896.5 544 896.125 111.06600000000003zM768 573.733v0.125L351.734 684.862 480 719.066 896.5 608 768 573.733z" horiz-adv-x="1024" />
+<glyph glyph-name="paintcan" unicode="&#xf0d1;" d="M384 832C171.923 832 0 660.077 0 448v-64c0-35.346 28.654-64 64-64v-320c0-70.692 143.269-128 320-128s320 57.308 320 128V320c35.346 0 64 28.654 64 64v64C768 660.077 596.077 832 384 832zM576 192v-32c0-17.673-14.327-32-32-32s-32 14.327-32 32v32c0 17.673-14.327 32-32 32s-32-14.327-32-32v-160c0-17.673-14.327-32-32-32s-32 14.327-32 32V160c0 17.673-14.327 32-32 32s-32-14.327-32-32v-32c0-35.346-28.654-64-64-64s-64 28.654-64 64v64c-35.346 0-64 28.654-64 64V371.193C186.382 340.108 279.318 320 384 320s197.618 20.108 256 51.193V256C640 220.654 611.346 192 576 192zM384 384c-107.433 0-199.393 26.474-237.372 64 37.979 37.526 129.939 64 237.372 64s199.393-26.474 237.372-64C583.393 410.474 491.433 384 384 384zM384 576c-176.62 0-319.816-57.236-319.996-127.867-0.001 0.001-0.002 0.001-0.003 0.002C64.075 624.804 207.314 768 384 768c176.731 0 320-143.269 320-320C704 518.692 560.731 576 384 576z" horiz-adv-x="768" />
+<glyph glyph-name="pencil" unicode="&#xf058;" d="M704 768L576 640l192-192 128 128L704 768zM0 64l0.688-192.562L192-128l512 512L512 576 0 64zM192-64H64V64h64v-64h64V-64z" horiz-adv-x="896" />
+<glyph glyph-name="person" unicode="&#xf018;" d="M448 640C448 746 362.062 832 256 832S64 746 64 640c0-106.062 85.938-192 192-192S448 533.938 448 640zM256 512c-70.656 0-128 57.344-128 128S185.344 768 256 768c70.625 0 128-57.344 128-128S326.625 512 256 512zM384 448H256 128C57.344 448 0 390.656 0 320v-128c0-70.625 57.344-128 128-128v-256h256V64c70.625 0 128 57.375 128 128V320C512 390.656 454.625 448 384 448zM448 192c0-35.375-28.625-64-64-64V256h-64v-384H192V256h-64v-128c-35.312 0-64 28.625-64 64V320c0 35.312 28.688 64 64 64h256c35.375 0 64-28.688 64-64V192z" horiz-adv-x="512" />
+<glyph glyph-name="pin" unicode="&#xf041;" d="M196 128l64-320 64 320c-20-2-43-3-64-3s-44 1-64 3z m254 299c-33 17-62 59-62 85v64c0 22 12 39 23 52 15 13 24 29 24 45 0 53-61 95-175 95s-175-42-175-95c0-16 9-32 24-45 11-13 23-30 23-52v-64c0-26-29-68-62-85-38-19-70-54-70-88 0-74 101-148 260-148s260 73 260 148c0 33-31 68-70 88z" horiz-adv-x="519.657" />
+<glyph glyph-name="playback-fast-forward" unicode="&#xf0bd;" d="M0 64l384 256L0 576V64zM768 320L384 576v-256-256L768 320z" horiz-adv-x="768" />
+<glyph glyph-name="playback-pause" unicode="&#xf0bb;" d="M0 0h192V640H0V0zM320 640v-640h192V640H320z" horiz-adv-x="512" />
+<glyph glyph-name="playback-play" unicode="&#xf0bf;" d="M0 640l512-320L0 0V640z" horiz-adv-x="512" />
+<glyph glyph-name="playback-rewind" unicode="&#xf0bc;" d="M384 320l384-256V576L384 320zM0 320l384-256V320 576L0 320z" horiz-adv-x="768" />
+<glyph glyph-name="plug" unicode="&#xf0d4;" d="M1003.386 627.336l-0.905 0.905c-24.744 24.744-64.861 24.744-89.605 0l-45.707-45.707-90.51 90.51 45.707 45.707c24.744 24.744 24.744 64.861 0 89.605l-0.905 0.905c-24.744 24.744-64.861 24.744-89.605 0l-47.973-47.973C621.76 802.446 537.237 795.66 482.502 740.926l-24.89-24.89c-109.011-109.011-121.948-277.692-38.854-400.892l-4.138-4.138c-62.392-62.392-62.484-163.493-0.275-225.999 12.41-12.469 12.642-33.327 0.121-45.683-12.509-12.343-32.655-12.292-45.101 0.153l-89.427 89.427c-62.637 62.638-164.63 63.747-227.299 1.141-62.542-62.479-62.562-163.829-0.058-226.332l8.763-8.763c24.744-24.744 64.861-24.744 89.605 0l0.905 0.905c24.744 24.744 24.744 64.861 0 89.605l-8.292 8.292c-12.329 12.329-13.085 32.418-1.098 45.081 12.437 13.138 33.174 13.353 45.882 0.645l89.328-89.328c62.92-62.92 165.504-63.814 228.081-0.553 61.793 62.468 61.65 163.161-0.431 225.451-12.55 12.592-12.777 32.866-0.207 45.437l4.151 4.151c123.2-83.095 291.881-70.158 400.892 38.854l24.89 24.89c54.734 54.735 61.52 139.258 20.362 201.382l47.973 47.973C1028.129 562.475 1028.129 602.593 1003.386 627.336zM889.796 333.632c-37.49-37.49-98.274-37.49-135.765 0L527.757 559.906c-37.49 37.49-37.49 98.274 0 135.765 29.556 29.556 73.585 35.804 109.269 18.759l-41.839-41.839c-24.744-24.744-24.744-64.861 0-89.604l0.905-0.905c24.744-24.744 64.861-24.744 89.605 0l45.707 45.707 90.51-90.51-45.707-45.707c-24.744-24.744-24.744-64.861 0-89.605l0.905-0.905c24.744-24.744 64.861-24.744 89.604 0l41.839 41.839C925.6 407.218 919.351 363.188 889.796 333.632z" horiz-adv-x="1024" />
+<glyph glyph-name="plus" unicode="&#xf05d;" d="M384 384V640H256v-256H0v-128h256v-256h128V256h256V384H384z" horiz-adv-x="640" />
+<glyph glyph-name="podium" unicode="&#xf0af;" d="M320 832c-32 0-64-32-64-64s0-64 0-64h-64l-192-192v-128h192l64-384-128-64v-64h512v64l-128 64 64 384h192v128l-192 192h-256v64s14 0 32 0 32 17 32 32-16 32-32 32 0 0-32 0z m0-832l-53 320h118l-1-320h-64z m-224 512l128 128h32v-64h64v64h224l128-128h-576z" horiz-adv-x="768" />
+<glyph glyph-name="primitive-dot" unicode="&#xf052;" d="M-0.088 320c0 141.5 114.5 256 256 256 141.438 0 256-114.5 256-256s-114.562-256-256-256C114.413 64-0.088 178.5-0.088 320z" horiz-adv-x="511.825" />
+<glyph glyph-name="primitive-square" unicode="&#xf053;" d="M512 64H0V576h512V64z" horiz-adv-x="512" />
+<glyph glyph-name="pulse" unicode="&#xf085;" d="M736 320.062L563.188 486.406 422.406 288 352 729.594 152.438 320.062H0V192h230.406L288 307.188l57.594-345.562L576 288l102.375-96H896V320.062H736z" horiz-adv-x="896" />
+<glyph glyph-name="puzzle" unicode="&#xf0c0;" d="M755.75 256.85c-13.95 9.96-28.52 16.59-43.47 19.92-8.84 1.69-18.06 2.33-27.57 1.81-8.99-0.5-17.56-1.68-25.69-3.52-6.1-1.69-12.22-3.89-18.35-6.59-18.18-8.02-33.89-18.12-46.79-30.33-12.22-12.9-22.32-28.62-30.34-46.79-2.7-6.12-4.9-12.24-6.59-18.34-1.84-8.14-3.03-16.7-3.52-25.69-0.52-9.51 0.12-18.73 1.81-27.57 3.33-14.95 9.96-29.52 19.92-43.47 3.89-5.44 8.08-10.4 12.56-14.88 20.06-20.03 45.83-30.7 75.42-34.11 8.92-1.02 18.12-1.68 26.53-4.48 5.12-1.7 9.16-4.08 12.08-7.02 6.65-6.6 7.63-16.1 2.5-27.24-3.15-6.84-7.7-13.45-12.96-18.84l-2.79-2.86c-3.93-3.92-6.41-6.4-7.05-7.04-3.13-3.16-6.1-6.15-9.06-9.15l-2.96-2.92c-10.52-10.58-21.09-21.12-31.66-31.65-22.76-22.82-45.57-45.58-68.38-68.36-7.5-7.5-15-15-22.5-22.49-3.46-3.45-7.07-6.38-10.78-8.79-1.8-1.22-3.49-2.24-5.18-3.16-19.6-9.89-41.43-5.92-59.24 11.88-5.4 5.4-10.62 10.62-15.85 15.84-30.25 30.25-60.48 60.52-90.77 90.73-8.59 8.57-17.13 17.08-25.68 25.59-6.12 6.09-12.67 11.85-19.56 17.06-5.72 4.33-11.59 7.56-17.46 9.73-21.16 7.32-41.41 2.01-54.67-13.26-3.81-4.8-7-10.47-9.39-16.94-3.43-9.26-4.6-19.47-5.9-29.36-4.9-37.53-25.8-68.43-55.98-82.65-7.48-3.65-15.49-6.29-23.9-7.78-7.95-1.41-15.95-1.71-23.85-1.04-26.61 1.35-49.48 13.09-68.51 32.57-1.68 1.67-2.1 2.09-2.51 2.51-19.48 19.02-31.22 41.9-32.57 68.5-0.68 7.9-0.37 15.9 1.04 23.85 1.49 8.41 4.13 16.43 7.78 23.9 14.22 30.18 45.13 51.07 82.65 55.97 9.89 1.29 20.1 2.47 29.36 5.9 6.94 2.56 12.96 6.05 17.97 10.23 14.54 13.15 19.59 32.63 12.84 52.34-2.78 7.35-6 13.22-10.33 18.94-5.21 6.88-10.97 13.43-17.06 19.55-8.51 8.55-17.03 17.09-25.55 25.63-26.92 26.98-53.84 53.88-80.75 80.78l-10.03 10.03c-5.22 5.22-10.45 10.45-15.26 15.27-18.39 18.4-22.35 40.22-12.46 59.82 0.92 1.69 1.94 3.37 3.08 5.05 2.49 3.84 5.42 7.45 8.87 10.91 7.49 7.5 14.99 15 22.49 22.5 22.77 22.81 45.54 45.62 68.36 68.38 10.53 10.57 21.06 21.14 31.65 31.66l2.92 2.96c2.99 2.97 5.99 5.93 8.98 8.9 0.8 0.81 3.28 3.29 7.2 7.22l2.86 2.79c5.39 5.26 12 9.8 18.84 12.96 11.14 5.13 20.63 4.15 27.24-2.5 2.94-2.92 5.32-6.96 7.02-12.08 2.79-8.41 3.45-17.61 4.48-26.53 3.41-29.59 14.08-55.35 34.11-75.41 4.49-4.48 9.44-8.67 14.88-12.56 13.95-9.96 28.52-16.59 43.47-19.92 8.84-1.69 18.06-2.33 27.57-1.81 8.99 0.5 17.56 1.68 25.69 3.52 6.1 1.69 12.22 3.89 18.35 6.59 18.18 8.02 33.89 18.12 46.79 30.33 12.22 12.9 22.32 28.62 30.34 46.79 2.7 6.12 4.9 12.24 6.59 18.34 1.84 8.14 3.03 16.7 3.52 25.69 0.52 9.51-0.12 18.73-1.81 27.57-3.33 14.95-9.96 29.52-19.92 43.47-3.89 5.44-8.08 10.4-12.56 14.88-20.06 20.03-45.83 30.7-75.42 34.11-8.92 1.02-18.12 1.68-26.53 4.48-5.12 1.7-9.16 4.08-12.08 7.02-6.65 6.6-7.63 16.1-2.5 27.24 3.15 6.84 7.7 13.45 12.96 18.84l2.79 2.86c3.93 3.92 6.41 6.4 7.05 7.04 3.13 3.16 6.1 6.15 9.06 9.15l2.96 2.92c10.52 10.58 21.09 21.12 31.66 31.65 22.76 22.82 45.57 45.58 68.38 68.35 7.5 7.5 15 15 22.5 22.49 3.46 3.45 7.07 6.38 10.78 8.79 1.8 1.22 3.49 2.24 5.18 3.16 19.6 9.89 41.43 5.92 59.24-11.88 5.4-5.4 10.62-10.62 15.85-15.84 30.25-30.25 60.48-60.52 90.77-90.73 8.59-8.57 17.13-17.08 25.68-25.59 6.12-6.09 12.67-11.85 19.56-17.06 5.72-4.33 11.59-7.56 17.46-9.73 21.16-7.32 41.41-2.01 54.67 13.26 3.81 4.8 7 10.47 9.39 16.94 3.43 9.26 4.6 19.47 5.9 29.36 4.9 37.53 25.8 68.43 55.98 82.65 7.48 3.65 15.49 6.28 23.9 7.78 7.95 1.41 15.95 1.71 23.85 1.04 26.61-1.35 49.48-13.09 68.51-32.57 1.68-1.67 2.1-2.09 2.51-2.51 19.48-19.02 31.22-41.9 32.57-68.5 0.68-7.9 0.37-15.9-1.04-23.85-1.49-8.41-4.13-16.43-7.78-23.9-14.22-30.18-45.13-51.07-82.65-55.97-9.89-1.29-20.1-2.47-29.36-5.9-6.94-2.56-12.96-6.05-17.97-10.23-14.54-13.15-19.59-32.63-12.84-52.34 2.78-7.35 6-13.22 10.33-18.94 5.21-6.88 10.97-13.43 17.06-19.55 8.51-8.55 17.03-17.09 25.55-25.63 30.26-30.33 60.54-60.56 90.78-90.81 5.22-5.22 10.45-10.45 15.26-15.27 18.39-18.4 22.35-40.22 12.46-59.82-0.92-1.69-1.94-3.37-3.08-5.05-2.49-3.84-5.42-7.45-8.87-10.91-7.49-7.5-14.99-15-22.49-22.5-22.77-22.81-45.54-45.62-68.36-68.38-10.53-10.57-21.06-21.14-31.65-31.66l-2.92-2.96c-2.99-2.97-5.99-5.93-8.98-8.9-0.8-0.81-3.28-3.29-7.2-7.22l-2.86-2.79c-5.39-5.26-12-9.8-18.84-12.96-11.14-5.13-20.63-4.15-27.24 2.5-2.94 2.92-5.32 6.96-7.02 12.08-2.79 8.41-3.45 17.61-4.48 26.53-3.41 29.59-14.08 55.35-34.11 75.41C766.15 248.76999999999998 761.19 252.97000000000003 755.75 256.85z" horiz-adv-x="1024" />
+<glyph glyph-name="question" unicode="&#xf02c;" d="M448 64h128v128h-128v-128z m64 512c-96 0-192-96-192-192h128c0 32 32 64 64 64s64-32 64-64c0-64-128-64-128-128h128c64 22 128 64 128 160s-96 160-192 160z m0 256c-283 0-512-229-512-512s229-512 512-512 512 229 512 512-229 512-512 512z m0-896c-212 0-384 172-384 384s172 384 384 384 384-172 384-384-172-384-384-384z" horiz-adv-x="1024" />
+<glyph glyph-name="quote" unicode="&#xf063;" d="M0 320v-256h256V320H128c0 0 0 128 128 128V576C256 576 0 576 0 320zM640 448V576c0 0-256 0-256-256v-256h256V320H512C512 320 512 448 640 448z" horiz-adv-x="640" />
+<glyph glyph-name="radio-tower" unicode="&#xf030;" d="M306.838 441.261c15.868 16.306 15.868 42.731 0 59.037-20.521 21.116-30.643 48.417-30.705 76.124 0.062 27.77 10.183 55.039 30.705 76.186 15.868 16.337 15.868 42.764 0 59.069-7.934 8.184-18.272 12.275-28.706 12.275-10.371 0-20.804-4.029-28.738-12.213-36.266-37.297-54.633-86.433-54.57-135.317-0.062-48.792 18.305-97.927 54.57-135.161C265.262 424.955 290.97 424.955 306.838 441.261zM149.093 798.858c-8.121 8.309-18.68 12.463-29.3 12.463-10.558 0-21.179-4.154-29.237-12.463C30.8 737.509 0.751 656.856 0.813 576.422 0.751 496.081 30.8 415.272 90.494 353.985c16.181-16.618 42.356-16.618 58.537 0 16.118 16.587 16.118 43.513 0 60.067-43.7 44.98-65.44 103.456-65.44 162.368s21.74 117.449 65.44 162.368C165.149 755.439 165.149 782.365 149.093 798.858zM513.031 472.153c57.351 0 103.956 46.574 103.956 103.956 0 57.382-46.605 103.955-103.956 103.955-57.381 0-103.956-46.573-103.956-103.955C409.076 518.727 455.65 472.153 513.031 472.153zM933.539 798.233c-16.181 16.618-42.355 16.618-58.475 0-16.181-16.587-16.181-43.513 0-60.068 43.668-44.918 65.409-103.456 65.409-162.368 0-58.85-21.805-117.387-65.473-162.306-16.117-16.618-16.117-43.575 0.062-60.068 8.059-8.309 18.616-12.463 29.237-12.463 10.558 0 21.178 4.154 29.236 12.463 59.726 61.287 89.774 142.096 89.649 222.437C1023.313 656.138 993.264 736.947 933.539 798.233zM513.281 389.127L513.281 389.127c-26.489-0.062-53.04 6.466-77.091 19.429L235.057-127.59000000000003h95.209l54.819 63.973h255.891l53.977-63.973h95.272L589.124 408.431C565.384 395.655 539.395 389.127 513.281 389.127zM512.656 358.483L577.004 128.29999999999995H449.059L512.656 358.483zM385.086 0.3550000000000182l63.974 63.973h127.944l63.974-63.973H385.086zM717.194 710.958c-15.868-16.306-15.868-42.731 0-59.037 20.491-21.116 30.611-48.511 30.674-76.124-0.062-27.77-10.183-55.102-30.674-76.187-15.868-16.336-15.868-42.763 0-59.068 7.871-8.184 18.242-12.213 28.737-12.213 10.309 0 20.741 4.029 28.675 12.213 36.298 37.234 54.665 86.433 54.54 135.255 0.125 48.792-18.181 97.927-54.54 135.161C758.801 727.264 733.062 727.264 717.194 710.958z" horiz-adv-x="1024" />
+<glyph glyph-name="repo" unicode="&#xf001;" d="M320 576h-64v-64h64v64z m0 128h-64v-64h64v64z m384 128c-32 0-608 0-640 0s-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l96 96 96-96v128s288 0 320 0 64 32 64 64 0 736 0 768-32 64-64 64z m0-800c0-16-15-32-32-32s-288 0-288 0v64h-192v-64s-79 0-96 0-32 17-32 32 0 96 0 96h640s0-80 0-96z m0 160h-512v576h513l-1-576z m-384 128h-64v-64h64v64z m0 128h-64v-64h64v64z" horiz-adv-x="768" />
+<glyph glyph-name="repo-clone" unicode="&#xf04c;" d="M320 448h-64v-64h64v64z m-128 320h256v64s-352 0-384 0-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l96 96 96-96v128s286 0 320 0 64 32 64 64 0 192 0 192h-576v576z m512-640s0-79 0-96-14-32-32-32-288 0-288 0v64h-192v-64s-80 0-96 0-32 16-32 32 0 96 0 96h640z m-384 448h-64v-64h64v64z m-64-320h64v64h-64v-64z m704 576c-32 0-288 0-320 0s-64-32-64-64 0-352 0-384 32-64 64-64 64 0 64 0v-64l32 32 32-32v64s160 0 192 0 64 32 64 64 0 352 0 384-32 64-64 64z m-256-448s-15 0-32 0-32 15-32 32 0 32 0 32h64v-64z m256 32c0-16-15-32-32-32s-160 0-160 0v64h192s0-16 0-32z m0 96h-256v256h224s32 0 32-32 0-224 0-224z m-640 192h-64v-64h64v64z" horiz-adv-x="1024" />
+<glyph glyph-name="repo-force-push" unicode="&#xf04a;" d="M768 768c0 32-32 64-64 64s-608 0-640 0-64-32-64-64 0-768 0-768 0 32 0 0 32-64 64-64 128 0 128 0v-128l128 128v128h-128v-64s-79 0-96 0-32 15-32 32 0 96 0 96h256v64h-128v576h512v-576h-128v-64h128s0-80 0-96-15-32-32-32-96 0-96 0v-64s96 0 128 0 64 32 64 64 0 736 0 768z m-272-320h144l-192 256-192-256h144l-144-192h128v-448h128v448h128l-144 192z" horiz-adv-x="767.896" />
+<glyph glyph-name="repo-forked" unicode="&#xf002;" d="M768 704c0 71-57 128-128 128s-128-57-128-128c0-47 26-89 64-111v-106l-192-212-192 212v106c38 22 64 63 64 111 0 71-57 128-128 128s-128-57-128-128c0-47 26-89 64-111v-156l256-282v-109c-38-22-64-63-64-111 0-71 57-128 128-128s128 57 128 128c0 47-26 89-64 111v109l256 282v156c38 22 64 63 64 111z m-640 63c34 0 62-28 62-62s-28-62-62-62-62 28-62 62 28 62 62 62z m256-891c-34 0-62 28-62 62s28 62 62 62 62-28 62-62-28-62-62-62z m256 891c34 0 62-28 62-62s-28-62-62-62-62 28-62 62 28 62 62 62z" horiz-adv-x="768" />
+<glyph glyph-name="repo-pull" unicode="&#xf006;" d="M1024 512l-192 192v-128h-384v-128h384v-128l192 192z m-320-320h-512v576h512v-128h64s0 96 0 128-32 64-64 64-608 0-640 0-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l96 96 96-96v128s288 0 320 0 64 32 64 64 0 384 0 384h-64v-192z m0-160c0-15-15-32-32-32s-288 0-288 0v64h-192v-64s-79 0-96 0-32 16-32 32 0 96 0 96h640s0-81 0-96z m-384 544h-64v-64h64v64z m0 128h-64v-64h64v64z m0-256h-64v-64h64v64z m-64-192h64v64h-64v-64z" horiz-adv-x="1024" />
+<glyph glyph-name="repo-push" unicode="&#xf005;" d="M448 512l-192-256h128v-448h128v448h128l-192 256z m-192 0h64v64h-64v-64z m64 192h-64v-64h64v64z m384 128c-32 0-608 0-640 0s-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l128 128v128h-128v-64s-79 0-96 0-32 14-32 32 0 96 0 96h256v64h-128v576h513l-1-576h-128v-64h128s0-79 0-96-15-32-32-32-96 0-96 0v-64s96 0 128 0 64 32 64 64 0 736 0 768-32 64-64 64z" horiz-adv-x="768" />
+<glyph glyph-name="rocket" unicode="&#xf033;" d="M716.737 707.944c-71.926-41.686-148.041-96.13-218.436-166.555-45-45.031-81.213-88.78-110.39-129.778L209.538 378.65 0.047 169.00300000000004l186.818-5.815 131.562 131.562c-46.439-96.224-50.536-160.019-50.536-160.019l58.854-58.792c0 0 65.827 6.255 162.737 53.163L355.107-5.119000000000028l5.88-186.881 209.585 209.521 33.086 179.252c41.403 29.02 85.185 65.046 129.716 109.545 70.425 70.455 124.837 146.541 166.555 218.466-45.97 9.351-88.125 28.488-121.397 61.668C745.257 619.819 725.994 661.975 716.737 707.944zM786.161 745.157c5.004-45 19.952-81.274 44.78-105.98 24.769-24.985 60.98-39.902 106.138-44.844C1003.063 727.677 1023.953 832 1023.953 832S919.63 811.142 786.161 745.157z" horiz-adv-x="1024" />
+<glyph glyph-name="rss" unicode="&#xf034;" d="M128 192C57.344 192 0 134.625 0 64s57.344-128 128-128 128 57.375 128 128S198.656 192 128 192zM128 448c0 0-64-2-64-64s64-64 64-64c141.375 0 256-114.625 256-256 0 0 0-64 64-64s64 64 64 64C512 276 340.031 448 128 448zM128 704c0 0-64 0-64-64s64-64 64-64c282.75 0 512-229.25 512-512 0 0 0-64 64-64s64 64 64 64C768 417.406 481.5 704 128 704z" horiz-adv-x="768" />
+<glyph glyph-name="ruby" unicode="&#xf047;" d="M768 704H256L0 448l512-512 512 512L768 704zM128 448l192 192h384l192-192L512 64 128 448zM704 576H512v-448l320 320L704 576z" horiz-adv-x="1024" />
+<glyph glyph-name="screen-full" unicode="&#xf066;" d="M128 64h639.875V576H128V64zM255.938 448h384v-256h-384V448zM64 639.938h191.938v64H0V448h64V639.938zM64 192H0v-255.938h255.938V0H64V192zM639.938 703.938v-64h191.938V448h64V703.938H639.938zM831.875 0H639.938v-63.938h255.938V192h-64V0z" horiz-adv-x="895.875" />
+<glyph glyph-name="screen-normal" unicode="&#xf067;" d="M127.938 640.062H0v-64h191.938V768h-64V640.062zM0-0.06200000000001182h127.938V-128h64V63.93799999999999H0V-0.06200000000001182zM768.062 640.062V768h-64v-191.938H896v64H768.062zM704.062-128h64V-0.06200000000001182H896v64H704.062V-128zM192.062 128H704V512H192.062V128zM320 384h256v-128H320V384z" horiz-adv-x="896" />
+<glyph glyph-name="search" unicode="&#xf02e;" d="M960 0L710.875 249.125C746.438 307.188 768 374.844 768 448 768 660.031 596 832 384 832 171.969 832 0 660.031 0 448c0-212 171.969-384 384-384 73.156 0 140.812 21.562 198.875 57L832-128c17.5-17.5 46.5-17.375 64 0l64 64C977.5-46.5 977.5-17.5 960 0zM384 192c-141.375 0-256 114.625-256 256s114.625 256 256 256 256-114.625 256-256S525.375 192 384 192z" horiz-adv-x="973.125" />
+<glyph glyph-name="server" unicode="&#xf097;" d="M704 448h-640c-35 0-64-32-64-64v-128c0-32 32-64 64-64h640c32 0 64 32 64 64v128c0 32-32 64-64 64z m-576-192h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m192-128h-640c-35 0-64-32-64-64v-128c0-32 32-64 64-64h640c32 0 64 32 64 64v128c0 32-32 64-64 64z m-576-192h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m192 832h-640c-35 0-64-32-64-64v-128c0-32 32-64 64-64h640c32 0 64 32 64 64v128c0 32-32 64-64 64z m-576-192h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m192 64h-64v64h64v-64z" horiz-adv-x="768" />
+<glyph glyph-name="settings" unicode="&#xf07c;" d="M64-64h128V128H64V-64zM192 704H64v-320h128V704zM512 704H384v-128h128V704zM0 192h256V320H0V192zM384-64h128V320H384V-64zM320 384h256V512H320V384zM832 704H704v-384h128V704zM640 256v-128h256V256H640zM704-64h128V64H704V-64z" horiz-adv-x="896" />
+<glyph glyph-name="sign-in" unicode="&#xf036;" d="M640 256L640 384 896 384 896 512 640 512 640 640 448 496 448 640 192 768 704 768 704 576 768 576 768 832 64 832 64 0 448-192 448 0 768 0 768 320 704 320 704 64 448 64 448 400z" horiz-adv-x="896" />
+<glyph glyph-name="sign-out" unicode="&#xf032;" d="M640 64H384V640L128 768h512v-192h64V832H0v-832l384-192V0h320V320h-64V64zM1024 448L768 640v-128H512v-128h256v-128L1024 448z" horiz-adv-x="1024" />
+<glyph glyph-name="split" unicode="&#xf0c6;" d="M448 576l-256 256-192-192 311-300c15 81 43 136 133 230l5 6z m128 256l133-133-197-197c-99-99-128-162-128-309v-384h256v384c0 52 19 94 53 128l197 197 133-133v448h-448z" horiz-adv-x="1024" />
+<glyph glyph-name="squirrel" unicode="&#xf0b2;" d="M768 768c-141.385 0-256-83.75-256-186.875C512 457.25 544 387 512 192c0 288-177 405.783-256 405.783 3.266 32.17-30.955 42.217-30.955 42.217s-14-7.124-19.354-21.583c-17.231 20.053-36.154 17.54-36.154 17.54l-8.491-37.081c0 0-117.045-40.876-118.635-206.292C56 371 141.311 353.898 201.887 364.882c57.157-2.956 42.991-50.648 30.193-63.446C178.083 247.438 128 320 64 320s-64-64 0-64 64-64 192-64c-198-77 0-256 0-256h-64c-64 0-64-64-64-64s256 0 384 0c192 0 320 64 320 222.182 0 54.34-27.699 114.629-64 162.228C697.057 349.433 782.453 427.566 832 384s192-64 192 128C1024 653.385 909.385 768 768 768zM160 448c-17.674 0-32 14.327-32 32 0 17.674 14.326 32 32 32 17.673 0 32-14.326 32-32C192 462.327 177.673 448 160 448z" horiz-adv-x="1024" />
+<glyph glyph-name="star" unicode="&#xf02a;" d="M896 448l-313.5 40.781L448 768 313.469 488.781 0 448l230.469-208.875L171-63.93799999999999l277 148.812 277.062-148.812L665.5 239.125 896 448z" horiz-adv-x="896" />
+<glyph glyph-name="steps" unicode="&#xf0c7;" d="M136 768C60.89 768 0 667.71 0 544c0-68.83 17.02-141.84 34-254.54C47.3 201.16999999999996 79.67 128 136 128s94.08 48.79 94.08 137.97c0 30.37-24.97 78.75-26.08 120.03-2.02 74.46 49.93 104.17 49.93 173C253.93 682.71 211.1 768 136 768zM502.97 512c-75.1 0-117.93-85.29-117.93-209 0-68.83 51.95-98.54 49.93-173-1.109-41.28-26.08-89.66-26.08-120.03 0-89.18 37.75-137.97 94.08-137.97s88.7 73.17 102 161.46c16.98 112.7 34 185.71 34 254.54C638.97 411.71 578.08 512 502.97 512z" horiz-adv-x="640" />
+<glyph glyph-name="stop" unicode="&#xf08f;" d="M704 832H320L0 512v-384l320-320h384l320 320V512L704 832zM896 192L640-64H384L128 192V448l256 256h256l256-256V192zM448 256h128V576H448V256zM448 64h128V192H448V64z" horiz-adv-x="1024" />
+<glyph glyph-name="sync" unicode="&#xf087;" d="M655.461 358.531c11.875-81.719-13.062-167.781-76.812-230.594-94.188-92.938-239.5-104.375-346.375-34.562l74.875 73L31.96 204.75 70.367-64l84.031 80.5c150.907-111.25 364.938-100.75 502.063 34.562 79.5 78.438 115.75 182.562 111.25 285.312L655.461 358.531zM189.46 511.938c94.156 92.938 239.438 104.438 346.313 34.562l-75-72.969 275.188-38.406L697.586 704l-83.938-80.688C462.711 734.656 248.742 724.031 111.585 588.75 32.085 510.344-4.133 406.219 0.335 303.5l112.25-22.125C100.71 363.125 125.71 449.094 189.46 511.938z" horiz-adv-x="768.051" />
+<glyph glyph-name="tag" unicode="&#xf015;" d="M384 768H128L0 640v-256l512-512 384 384L384 768zM64 416V608l96 96h192l448-448L512-32 64 416zM448 512L256 320l256-256 192 192L448 512zM352 320l96 96 160-160-96-96L352 320zM320 544c0 53-43 96-96 96s-96-43-96-96 43-96 96-96S320 491 320 544zM224 512c-17.656 0-32 14.344-32 32s14.344 32 32 32 32-14.344 32-32S241.656 512 224 512z" horiz-adv-x="896" />
+<glyph glyph-name="telescope" unicode="&#xf088;" d="M76 409c32 8 229 59 229 59-1-6-2-19-2-19 0-71 49-128 128-128s128 59 128 128c0 11-8 22-19 32l49-3s7 2 31 8c-51-14-108 31-126 99s8 135 60 149c-24-6-31-8-31-8l-168-110c-34-9-55-46-46-80 2-9 7-17 12-23-7-12-12-26-15-40-27 1-51 19-59 46-9 34 11 69 45 78l-245-65c-34-9-54-43-45-77s41-54 73-46z m419-153h-128v-64l-320-320h128l192 128v-128h128v128l192-128h128l-320 320v64z m429 448c-18 68-70 110-122 96-69-18-98-28-186-51-51-14-79-80-61-148s74-115 125-102c87 23 117 33 186 51 51 14 76 85 58 154z m-70-90c-17-5-42 17-51 51s-4 66 13 70 42-17 51-51 4-66-13-70z" horiz-adv-x="929.875" />
+<glyph glyph-name="terminal" unicode="&#xf0c8;" d="M831 705H63c-35.35 0-64-28.65-64-64v-640c0-35.35 28.65-64 64-64h768c35.35 0 64 28.65 64 64V641C895 676.35 866.35 705 831 705zM127 257l128 128L127 513l64 64 192-192L191 193 127 257zM639 193H383v64h256V193z" horiz-adv-x="896" />
+<glyph glyph-name="three-bars" unicode="&#xf05e;" d="M0 640v-128h768v128h-768z m0-384h768v128h-768v-128z m0-256h768v128h-768v-128z" horiz-adv-x="768" />
+<glyph glyph-name="tools" unicode="&#xf031;" d="M286.547 366.984c16.843-16.812 81.716-85.279 81.716-85.279l35.968 37.093-56.373 58.248L456.072 491.98c0 0-48.842 47.623-27.468 28.655 20.438 75.903 1.812 160.589-55.842 220.243C315.608 800.064 234.392 819.47 161.425 799.096l123.653-127.715-32.53-125.309-121.06-33.438L7.898 640.3820000000001c-19.718-75.436-0.969-159.339 56.311-218.556C124.302 359.703 210.83 341.453 286.547 366.984zM698.815 242.769L549.694 95.46100000000001l245.932-254.805c20.062-20.812 46.498-31.188 72.872-31.188 26.25 0 52.624 10.375 72.811 31.188 40.249 41.624 40.249 108.997 0 150.62L698.815 242.769zM1023.681 670.162L867.06 832.001 405.387 354.703l56.373-58.248L185.425 10.839000000000055l-63.154-33.749-89.217-145.559 22.719-23.562 140.839 92.247 32.655 65.312 276.336 285.554 56.404-58.248L1023.681 670.162z" horiz-adv-x="1024" />
+<glyph glyph-name="trashcan" unicode="&#xf0d0;" d="M704 704H448c0 0 0 24.057 0 32 0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 0-32 0-32H128c-35.346 0-64-28.654-64-64v-64c0-35.346 28.654-64 64-64v-576c0-35.346 28.654-64 64-64h448c35.346 0 64 28.654 64 64V512c35.346 0 64 28.654 64 64v64C768 675.346 739.346 704 704 704zM640-32c0-17.673-14.327-32-32-32H224c-17.673 0-32 14.327-32 32V512h64v-480c0-17.673 14.327-32 32-32s32 14.327 32 32l0.387 480H384v-480c0-17.673 14.327-32 32-32s32 14.327 32 32l0.387 480h64L512 32c0-17.673 14.327-32 32-32s32 14.327 32 32V512h64V-32zM704 592c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h544c8.837 0 16-7.163 16-16V592z" horiz-adv-x="768" />
+<glyph glyph-name="triangle-down" unicode="&#xf05b;" d="M0 448l383.75-383.75L767.5 448H0z" horiz-adv-x="767.5" />
+<glyph glyph-name="triangle-left" unicode="&#xf044;" d="M0 320.125l383.75-383.75v767.5L0 320.125z" horiz-adv-x="383.75" />
+<glyph glyph-name="triangle-right" unicode="&#xf05a;" d="M0.062 703.75L383.812 320 0.062-63.75V703.75z" horiz-adv-x="383.875" />
+<glyph glyph-name="triangle-up" unicode="&#xf0aa;" d="M383.75 576L0 192.25h767.5L383.75 576z" horiz-adv-x="767.5" />
+<glyph glyph-name="unfold" unicode="&#xf039;" d="M384 448h128V640h128L448 832 256 640h128V448zM576 576v-64h224L672 384H224L96 512h224v64H0v-63.999L160 352 0 192v-64h320v64H96l128 128h448l128-128H576v-64h320v64L736 352l160 160.001V576H576zM512 256H384v-192H256l192-192 192 192H512V256z" horiz-adv-x="896" />
+<glyph glyph-name="unmute" unicode="&#xf0ba;" d="M128 448H0v-256h128l256-192h64V640h-64L128 448zM538.51 410.51c-12.496 12.497-32.758 12.497-45.255 0-12.496-12.496-12.496-32.758 0-45.255 24.994-24.993 24.994-65.516 0-90.51-12.496-12.496-12.496-32.758 0-45.255 12.497-12.496 32.759-12.496 45.255 0C588.497 279.47900000000004 588.497 360.523 538.51 410.51zM629.02 501.019c-12.495 12.497-32.758 12.497-45.255 0-12.495-12.496-12.495-32.758 0-45.255 74.981-74.98 74.981-196.548 0-271.528-12.495-12.497-12.495-32.76 0-45.256 12.497-12.496 32.76-12.496 45.255 0C728.994 238.95399999999995 728.994 401.045 629.02 501.019zM719.529 591.529c-12.497 12.497-32.76 12.497-45.255 0-12.496-12.496-12.496-32.758 0-45.255 124.968-124.968 124.968-327.58 0-452.548-12.496-12.497-12.496-32.759 0-45.255 12.495-12.497 32.758-12.497 45.255 0C869.49 198.433 869.49 441.568 719.529 591.529z" horiz-adv-x="896" />
+<glyph glyph-name="versions" unicode="&#xf064;" d="M0 128h128v64H64V448h64v64H0V128zM384 640v-640h512V640H384zM768 128H512V512h256V128zM192 64h128v64h-64V512h64v64H192V64z" horiz-adv-x="896" />
+<glyph glyph-name="x" unicode="&#xf081;" d="M640 512L512 640 320 448 128 640 0 512l192-192L0 128l128-128 192 192 192-192 128 128L448 320 640 512z" horiz-adv-x="640" />
+<glyph glyph-name="zap" unicode="&#x26A1;" d="M640 384H384L576 832 0 256h256L64-192 640 384z" horiz-adv-x="640" />
+</font>
+</defs>
+</svg>
diff --git a/spec/public/octicons/octicons.ttf b/spec/public/octicons/octicons.ttf
new file mode 100644
index 0000000000..189ca2813d
--- /dev/null
+++ b/spec/public/octicons/octicons.ttf
Binary files differ
diff --git a/spec/public/octicons/octicons.woff b/spec/public/octicons/octicons.woff
new file mode 100644
index 0000000000..2b770e429f
--- /dev/null
+++ b/spec/public/octicons/octicons.woff
Binary files differ
diff --git a/spec/public/scripts/navigation.js b/spec/public/scripts/navigation.js
new file mode 100644
index 0000000000..c046bf4d54
--- /dev/null
+++ b/spec/public/scripts/navigation.js
@@ -0,0 +1,70 @@
+(function($){ $.fn.navigation = function() {
+
+ // the TOC already contains H1 so we start at H2
+ var headers = $('h2, h3, h4, h5').filter(function() {
+ // exclude examples
+ if (this.id.substr(0, 7) == 'example') {
+ return false;
+ }
+
+ // get all headers with an id
+ return this.id;
+ });
+
+ var output = $(this);
+
+ var get_level = function(n) { return parseInt(n.nodeName.replace('H', ''), 10); }
+
+ var back_to_top = '<span title="Return to top" class="to_top octicon octicon-chevron-up"></span>';
+
+ if (headers.length && output.length) {
+ var level = get_level(headers[0]);
+ var current_level;
+ var html = '<ol>';
+
+ headers.each(function(_, header) {
+ current_level = get_level(header);
+
+ if (current_level === level) {
+ // same level as before
+ html += '<li><a href="#' + header.id + '">' + header.innerHTML + '</a>';
+ } else if (current_level <= level) {
+ // higher level, we go back up and chose intermediary lists
+ for(i = current_level; i < level; i++) {
+ html += '</li></ol>';
+ }
+ html += '<li><a href="#' + header.id + '">' + header.innerHTML + '</a>';
+ } else if (current_level > level) {
+ // lower level, we open new nested lists
+ for(i = current_level; i > level; i--) {
+ html += '<ol><li>';
+ }
+ html += '<a href="#' + header.id + '">' + header.innerHTML + '</a>';
+ }
+
+ var header_link = '<a class="anchor" href="#' + header.id + '"><span class="octicon octicon-link"></span></a>';
+ $(header).prepend(header_link);
+
+ if (!$(header).prev().is('h1')) {
+ $(header).after(back_to_top);
+ }
+
+ level = current_level;
+ });
+
+ html += '</ol>';
+
+ output.html(html);
+ }
+
+ // back to top links
+ $(document).on('click', '.to_top', function() {
+ $(window).scrollTop(0);
+ window.location.hash = '';
+ });
+
+ // we add one more at the end of the document
+ $('#content-container').append(back_to_top);
+
+};})(jQuery);
+
diff --git a/spec/public/stylesheets/print.css b/spec/public/stylesheets/print.css
new file mode 100644
index 0000000000..3fbc5596c0
--- /dev/null
+++ b/spec/public/stylesheets/print.css
@@ -0,0 +1,15 @@
+/* This removes a few things from screen.css for printing */
+
+body {
+ padding: 0px;
+ margin: 0.5em;
+}
+
+.anchor, #navigation, .to_top {
+ display: none;
+}
+
+#content-container {
+ width: 100%;
+ float: none;
+}
diff --git a/spec/public/stylesheets/screen.css b/spec/public/stylesheets/screen.css
index 725eb0b3f3..dbb3ebe1b3 100644
--- a/spec/public/stylesheets/screen.css
+++ b/spec/public/stylesheets/screen.css
@@ -4,16 +4,16 @@ body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
- padding-top: 10px;
+
padding-bottom: 10px;
background-color: white;
- padding: 30px;
+ padding-left: 30px;
}
-body > *:first-child {
+#content-container > *:first-child {
margin-top: 0 !important;
}
-body > *:last-child {
+#content-container > *:last-child {
margin-bottom: 0 !important;
}
@@ -25,18 +25,23 @@ a.absent {
}
a.anchor {
display: block;
- padding-left: 30px;
- margin-left: -30px;
+ margin-left: -35px;
+ padding-left: 10px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
bottom: 0;
+ color: black;
+ width: 35px; height: 100%;
+}
+
+a.anchor span {
+ vertical-align: middle;
}
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
- padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
cursor: text;
@@ -44,10 +49,21 @@ h1, h2, h3, h4, h5, h6 {
}
h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
- background: url("../../images/modules/styleguide/para.png") no-repeat 10px center;
text-decoration: none;
}
+h1:hover a.anchor span, h2:hover a.anchor span, h3:hover a.anchor span, h4:hover a.anchor span, h5:hover a.anchor span, h6:hover a.anchor span {
+ display: inline-block;
+}
+
+h1 a.anchor span, h2 a.anchor span, h3 a.anchor span, h4 a.anchor span, h5 a.anchor span, h6 a.anchor span {
+ display: none;
+}
+
+h1 a.anchor:hover span, h2 a.anchor:hover span, h3 a.anchor:hover span, h4 a.anchor:hover span, h5 a.anchor:hover span, h6 a.anchor:hover span {
+ display: inline-block;
+}
+
h1 tt, h1 code {
font-size: inherit;
}
@@ -330,3 +346,83 @@ code {
font-size: 16px;
}
+#navigation {
+ margin-right: 10px;
+ float: right;
+ width: 26%;
+ display: inline;
+ color: #8B8B8B;
+ font-size: 15px;
+ font-weight: bold;
+ background-color: #F3F4F4;
+}
+
+#content-container {
+ float: left;
+ width: 70%;
+ display: inline;
+}
+
+#container {
+ padding-top: 10px;
+ width: 100%;
+}
+
+#navigation a {
+ text-decoration: none;
+ color: #8B8B8B;
+}
+
+#navigation a:hover {
+ text-decoration: underline;
+}
+
+.active-page {
+ color: #171717;
+}
+
+.active-page a {
+ color: #171717 !important;
+}
+
+.to_top {
+ position: absolute;
+ margin-top: -35px;
+ right: 27%;
+ color: gray;
+ cursor: pointer;
+ width: 16px; height: 16px;
+ display: block;
+}
+
+.to_top:hover {
+ color: black;
+}
+
+#scala-logo {
+ float: left;
+ width: 168px;
+ height: 48px;
+ margin-right: 25px;
+}
+
+#header {
+ padding-top: 16px;
+ padding-bottom: 10px;
+ margin-bottom: 10px;
+ height: 64px;
+ border-bottom: 1px solid #cccccc;
+}
+
+#header a {
+ height: 100%;
+ display: block;
+ text-decoration: none;
+}
+
+#header h1 {
+ cursor: pointer;
+ padding-top: 6px;
+ margin-bottom: 0px;
+ font-size: 30px;
+}
diff --git a/src/compiler/scala/tools/nsc/Properties.scala b/src/compiler/scala/tools/nsc/Properties.scala
index 59fefba954..bec686ec05 100644
--- a/src/compiler/scala/tools/nsc/Properties.scala
+++ b/src/compiler/scala/tools/nsc/Properties.scala
@@ -11,7 +11,7 @@ object Properties extends scala.util.PropertiesTrait {
protected def propCategory = "compiler"
protected def pickJarBasedOn = classOf[Global]
- // settings based on jar properties
+ // settings based on jar properties, falling back to System prefixed by "scala."
def residentPromptString = scalaPropOrElse("resident.prompt", "\nnsc> ")
def shellPromptString = scalaPropOrElse("shell.prompt", "\nscala> ")
def shellInterruptedString = scalaPropOrElse("shell.interrupted", ":quit\n")
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index 8d810d456e..15d6a4d1b4 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -1059,7 +1059,7 @@ self =>
def identOrMacro(): Name = if (isMacro) rawIdent() else ident()
def selector(t: Tree): Tree = {
- val point = in.offset
+ val point = if(isIdent) in.offset else in.lastOffset //SI-8459
//assert(t.pos.isDefined, t)
if (t != EmptyTree)
Select(t, ident(skipIt = false)) setPos r2p(t.pos.start, point, in.lastOffset)
diff --git a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala
index 37b00aa9a3..9433ddcf31 100644
--- a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala
+++ b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala
@@ -488,7 +488,8 @@ trait JavaParsers extends ast.parser.ParsersCommon with JavaScanners {
val vparams = formalParams()
if (!isVoid) rtpt = optArrayBrackets(rtpt)
optThrows()
- val bodyOk = !inInterface || (mods hasFlag Flags.DEFAULTMETHOD)
+ val isStatic = mods hasFlag Flags.STATIC
+ val bodyOk = !inInterface || ((mods hasFlag Flags.DEFAULTMETHOD) || isStatic)
val body =
if (bodyOk && in.token == LBRACE) {
methodBody()
@@ -507,7 +508,7 @@ trait JavaParsers extends ast.parser.ParsersCommon with JavaScanners {
EmptyTree
}
}
- if (inInterface) mods1 |= Flags.DEFERRED
+ if (inInterface && !isStatic) mods1 |= Flags.DEFERRED
List {
atPos(pos) {
DefDef(mods1, name.toTermName, tparams, List(vparams), rtpt, body)
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index d7cd92adf2..14be8374b9 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -352,7 +352,7 @@ abstract class ClassfileParser {
}
private def loadClassSymbol(name: Name): Symbol = {
- val file = classPath findSourceFile ("" +name) getOrElse {
+ val file = classPath findClassFile ("" +name) getOrElse {
// SI-5593 Scaladoc's current strategy is to visit all packages in search of user code that can be documented
// therefore, it will rummage through the classpath triggering errors whenever it encounters package objects
// that are not in their correct place (see bug for details)
@@ -1047,7 +1047,7 @@ abstract class ClassfileParser {
for (entry <- innerClasses.entries) {
// create a new class member for immediate inner classes
if (entry.outerName == currentClass) {
- val file = classPath.findSourceFile(entry.externalName.toString) getOrElse {
+ val file = classPath.findClassFile(entry.externalName.toString) getOrElse {
throw new AssertionError(entry.externalName)
}
enterClassAndModule(entry, file)
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
index 149b4fe446..cbe427775a 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
@@ -130,7 +130,7 @@ abstract class ICodeReader extends ClassfileParser {
log("ICodeReader reading " + cls)
val name = cls.javaClassName
- classPath.findSourceFile(name) match {
+ classPath.findClassFile(name) match {
case Some(classFile) => parse(classFile, cls)
case _ => MissingRequirementError.notFound("Could not find bytecode for " + cls)
}
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
index 9b85f1b36a..3544dc9966 100644
--- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala
+++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
@@ -459,7 +459,7 @@ abstract class UnCurry extends InfoTransform
case UnApply(fn, args) =>
val fn1 = transform(fn)
val args1 = fn.symbol.name match {
- case nme.unapplySeq => transformArgs(tree.pos, fn.symbol, args, patmat.alignPatterns(tree).expectedTypes)
+ case nme.unapplySeq => transformArgs(tree.pos, fn.symbol, args, patmat.alignPatterns(global.typer.context, tree).expectedTypes)
case _ => args
}
treeCopy.UnApply(tree, fn1, args1)
diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala
index 0eaffe7cee..d862805a07 100644
--- a/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala
+++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala
@@ -377,8 +377,8 @@ trait MatchTranslation {
object ExtractorCall {
// TODO: check unargs == args
def apply(tree: Tree): ExtractorCall = tree match {
- case UnApply(unfun, args) => new ExtractorCallRegular(alignPatterns(tree), unfun, args) // extractor
- case Apply(fun, args) => new ExtractorCallProd(alignPatterns(tree), fun, args) // case class
+ case UnApply(unfun, args) => new ExtractorCallRegular(alignPatterns(context, tree), unfun, args) // extractor
+ case Apply(fun, args) => new ExtractorCallProd(alignPatterns(context, tree), fun, args) // case class
}
}
diff --git a/src/compiler/scala/tools/nsc/transform/patmat/ScalacPatternExpanders.scala b/src/compiler/scala/tools/nsc/transform/patmat/ScalacPatternExpanders.scala
index 8f21f4ecfc..79f5e3bee8 100644
--- a/src/compiler/scala/tools/nsc/transform/patmat/ScalacPatternExpanders.scala
+++ b/src/compiler/scala/tools/nsc/transform/patmat/ScalacPatternExpanders.scala
@@ -18,6 +18,7 @@ trait ScalacPatternExpanders {
import global._
import definitions._
import treeInfo._
+ import analyzer._
type PatternAligned = ScalacPatternExpander#Aligned
@@ -94,7 +95,7 @@ trait ScalacPatternExpanders {
def tupleExtractor(extractor: Extractor): Extractor =
extractor.copy(fixed = tupleType(extractor.fixed) :: Nil)
- private def validateAligned(tree: Tree, aligned: Aligned): Aligned = {
+ private def validateAligned(context: Context, tree: Tree, aligned: Aligned): Aligned = {
import aligned._
def owner = tree.symbol.owner
@@ -103,8 +104,8 @@ trait ScalacPatternExpanders {
def offerString = if (extractor.isErroneous) "" else s" offering $offering"
def arityExpected = ( if (extractor.hasSeq) "at least " else "" ) + productArity
- def err(msg: String) = reporter.error(tree.pos, msg)
- def warn(msg: String) = reporter.warning(tree.pos, msg)
+ def err(msg: String) = context.error(tree.pos, msg)
+ def warn(msg: String) = context.warning(tree.pos, msg)
def arityError(what: String) = err(s"$what patterns for $owner$offerString: expected $arityExpected, found $totalArity")
if (isStar && !isSeq)
@@ -117,7 +118,7 @@ trait ScalacPatternExpanders {
aligned
}
- def apply(sel: Tree, args: List[Tree]): Aligned = {
+ def apply(context: Context, sel: Tree, args: List[Tree]): Aligned = {
val fn = sel match {
case Unapplied(fn) => fn
case _ => sel
@@ -145,12 +146,12 @@ trait ScalacPatternExpanders {
}
val normalizedExtractor = if (requiresTupling) tupleExtractor(extractor) else extractor
- validateAligned(fn, Aligned(patterns, normalizedExtractor))
+ validateAligned(context, fn, Aligned(patterns, normalizedExtractor))
}
- def apply(tree: Tree): Aligned = tree match {
- case Apply(fn, args) => apply(fn, args)
- case UnApply(fn, args) => apply(fn, args)
+ def apply(context: Context, tree: Tree): Aligned = tree match {
+ case Apply(fn, args) => apply(context, fn, args)
+ case UnApply(fn, args) => apply(context, fn, args)
}
}
}
diff --git a/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala b/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala
index da0e67a2a5..bb8c3c3c6d 100644
--- a/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala
@@ -309,7 +309,7 @@ trait PatternTypers {
// the union of the expected type and the inferred type of the argument to unapply
val glbType = glb(ensureFullyDefined(pt) :: unapplyArg.tpe_* :: Nil)
val wrapInTypeTest = canRemedy && !(fun1.symbol.owner isNonBottomSubClass ClassTagClass)
- val formals = patmat.alignPatterns(fun1, args).unexpandedFormals
+ val formals = patmat.alignPatterns(context.asInstanceOf[analyzer.Context], fun1, args).unexpandedFormals
val args1 = typedArgsForFormals(args, formals, mode)
val result = UnApply(fun1, args1) setPos tree.pos setType glbType
diff --git a/src/compiler/scala/tools/nsc/util/ClassPath.scala b/src/compiler/scala/tools/nsc/util/ClassPath.scala
index d2ba61cc0b..e89f08ec6b 100644
--- a/src/compiler/scala/tools/nsc/util/ClassPath.scala
+++ b/src/compiler/scala/tools/nsc/util/ClassPath.scala
@@ -231,7 +231,7 @@ abstract class ClassPath[T] {
classes find (_.name == name)
}
- def findSourceFile(name: String): Option[AbstractFile] =
+ def findClassFile(name: String): Option[AbstractFile] =
findClass(name) match {
case Some(ClassRep(Some(x: AbstractFile), _)) => Some(x)
case _ => None
diff --git a/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala b/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala
index 681204172b..4962d80a8b 100644
--- a/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala
+++ b/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala
@@ -4,7 +4,7 @@ import scala.tools.nsc.io.Path
/** Common settings for the test. */
private[tests] trait TestSettings {
- protected final val TIMEOUT = 10000 // timeout in milliseconds
+ protected final val TIMEOUT = 30000 // timeout in milliseconds
/** The root directory for this test suite, usually the test kind ("test/files/presentation"). */
protected val outDir = Path(Option(System.getProperty("partest.cwd")).getOrElse("."))
diff --git a/src/library/rootdoc.txt b/src/library/rootdoc.txt
index 4795a47efe..e84942b8c4 100644
--- a/src/library/rootdoc.txt
+++ b/src/library/rootdoc.txt
@@ -12,7 +12,7 @@ Notable packages include:
- [[scala.collection.immutable `scala.collection.immutable`]] - Immutable, sequential data-structures such as
[[scala.collection.immutable.Vector `Vector`]], [[scala.collection.immutable.List `List`]],
[[scala.collection.immutable.Range `Range`]], [[scala.collection.immutable.HashMap `HashMap`]] or
- [[scala.collection.immutable.HashSet `HasSet`]]
+ [[scala.collection.immutable.HashSet `HashSet`]]
- [[scala.collection.mutable `scala.collection.mutable`]] - Mutable, sequential data-structures such as
[[scala.collection.mutable.ArrayBuffer `ArrayBuffer`]],
[[scala.collection.mutable.StringBuilder `StringBuilder`]],
diff --git a/src/library/scala/util/Properties.scala b/src/library/scala/util/Properties.scala
index 8835730d95..367488f116 100644
--- a/src/library/scala/util/Properties.scala
+++ b/src/library/scala/util/Properties.scala
@@ -62,10 +62,10 @@ private[scala] trait PropertiesTrait {
def envOrSome(name: String, alt: Option[String]) = envOrNone(name) orElse alt
- // for values based on propFilename
- def scalaPropOrElse(name: String, alt: String): String = scalaProps.getProperty(name, alt)
+ // for values based on propFilename, falling back to System properties
+ def scalaPropOrElse(name: String, alt: String): String = scalaPropOrNone(name).getOrElse(alt)
def scalaPropOrEmpty(name: String): String = scalaPropOrElse(name, "")
- def scalaPropOrNone(name: String): Option[String] = Option(scalaProps.getProperty(name))
+ def scalaPropOrNone(name: String): Option[String] = Option(scalaProps.getProperty(name)).orElse(propOrNone("scala." + name))
/** The numeric portion of the runtime Scala version, if this is a final
* release. If for instance the versionString says "version 2.9.0.final",
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala
index f26315c538..a95f626a0b 100644
--- a/src/reflect/scala/reflect/internal/Types.scala
+++ b/src/reflect/scala/reflect/internal/Types.scala
@@ -2605,7 +2605,7 @@ trait Types
// derived from the existentially quantified type into the typing environment
// (aka \Gamma, which tracks types for variables and constraints/kinds for types)
// as a nice bonus, delaying this until we need it avoids cyclic errors
- def tpars = underlying.typeSymbol.initialize.typeParams
+ def tpars = underlying.typeSymbolDirect.initialize.typeParams
def newSkolem(quant: Symbol) = owner.newExistentialSkolem(quant, origin)
def newSharpenedSkolem(quant: Symbol, tparam: Symbol): Symbol = {
diff --git a/test/files/neg/macro-invalidret.check b/test/files/neg/macro-invalidret.check
index 568cc7c570..ebdc8ec7da 100644
--- a/test/files/neg/macro-invalidret.check
+++ b/test/files/neg/macro-invalidret.check
@@ -19,8 +19,7 @@ Macros_Test_2.scala:7: warning: macro defs must have explicitly specified return
def foo6 = macro Impls.foo6
^
Macros_Test_2.scala:14: error: exception during macro expansion:
-scala.NotImplementedError: an implementation is missing
- at scala.Predef$.$qmark$qmark$qmark(Predef.scala:225)
+java.lang.NullPointerException
at Impls$.foo3(Impls_1.scala:7)
foo3
diff --git a/test/files/neg/macro-invalidret/Impls_1.scala b/test/files/neg/macro-invalidret/Impls_1.scala
index 434aeef10f..a52e8d8f39 100644
--- a/test/files/neg/macro-invalidret/Impls_1.scala
+++ b/test/files/neg/macro-invalidret/Impls_1.scala
@@ -4,7 +4,7 @@ import scala.reflect.runtime.{universe => ru}
object Impls {
def foo1(c: Context) = 2
def foo2(c: Context) = ru.Literal(ru.Constant(42))
- def foo3(c: Context) = ???
+ def foo3(c: Context) = throw null
def foo5(c: Context) = c.universe.Literal(c.universe.Constant(42))
def foo6(c: Context) = c.Expr[Int](c.universe.Literal(c.universe.Constant(42)))
}
diff --git a/test/files/pos/five-dot-f.flags b/test/files/pos/five-dot-f.flags
deleted file mode 100644
index 112fc720a0..0000000000
--- a/test/files/pos/five-dot-f.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xfuture \ No newline at end of file
diff --git a/test/files/pos/t8719.check b/test/files/pos/t8719.check
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/files/pos/t8719.check
diff --git a/test/files/pos/t8719/Macros_1.scala b/test/files/pos/t8719/Macros_1.scala
new file mode 100644
index 0000000000..152c92f254
--- /dev/null
+++ b/test/files/pos/t8719/Macros_1.scala
@@ -0,0 +1,21 @@
+import scala.language.experimental.macros
+import scala.reflect.macros.TypecheckException
+import scala.reflect.macros.whitebox.Context
+
+object Macros {
+ def typecheck_impl(c: Context)(code: c.Expr[String]): c.Expr[Option[String]] = {
+ import c.universe._
+
+ val Expr(Literal(Constant(codeStr: String))) = code
+
+ try {
+ c.typecheck(c.parse(codeStr))
+ c.Expr(q"None: Option[String]")
+ } catch {
+ case e: TypecheckException =>
+ c.Expr(q"Some(${ e.toString }): Option[String]")
+ }
+ }
+
+ def typecheck(code: String): Option[String] = macro typecheck_impl
+} \ No newline at end of file
diff --git a/test/files/pos/t8719/Test_2.scala b/test/files/pos/t8719/Test_2.scala
new file mode 100644
index 0000000000..997eb2f236
--- /dev/null
+++ b/test/files/pos/t8719/Test_2.scala
@@ -0,0 +1,10 @@
+case class Foo(i: Int, c: Char)
+
+object Bar {
+ def unapply(foo: Foo): Option[(Int, Char)] = Some((foo.i, foo.c))
+}
+
+object Test extends App {
+ println(Macros.typecheck("val Foo(x, y, z) = Foo(1, 'a')"))
+ println(Macros.typecheck("val Bar(x, y, z) = Foo(1, 'a')"))
+} \ No newline at end of file
diff --git a/test/files/pos/t8844.scala b/test/files/pos/t8844.scala
new file mode 100644
index 0000000000..d33c520d1b
--- /dev/null
+++ b/test/files/pos/t8844.scala
@@ -0,0 +1,4 @@
+object Example {
+ type S[A] = String
+ def foo(s: S[_]): String = s
+}
diff --git a/test/files/presentation/t8459.check b/test/files/presentation/t8459.check
new file mode 100644
index 0000000000..336c147141
--- /dev/null
+++ b/test/files/presentation/t8459.check
@@ -0,0 +1,14 @@
+reload: IncompleteDynamicSelect.scala
+
+askType at IncompleteDynamicSelect.scala(12,2)
+================================================================================
+[response] askTypeAt (12,2)
+scala.AnyRef {
+ def <init>(): Foo = {
+ Foo.super.<init>();
+ ()
+ };
+ private[this] val bar: F = new F();
+ Foo.this.bar.<selectDynamic: error>("<error>")
+}
+================================================================================
diff --git a/test/files/presentation/t8459/Test.scala b/test/files/presentation/t8459/Test.scala
new file mode 100644
index 0000000000..bec1131c4c
--- /dev/null
+++ b/test/files/presentation/t8459/Test.scala
@@ -0,0 +1,3 @@
+import scala.tools.nsc.interactive.tests.InteractiveTest
+
+object Test extends InteractiveTest \ No newline at end of file
diff --git a/test/files/presentation/t8459/src/IncompleteDynamicSelect.scala b/test/files/presentation/t8459/src/IncompleteDynamicSelect.scala
new file mode 100644
index 0000000000..61976fe2f9
--- /dev/null
+++ b/test/files/presentation/t8459/src/IncompleteDynamicSelect.scala
@@ -0,0 +1,14 @@
+import scala.language.dynamics
+
+class F extends Dynamic {
+ def applyDynamic(name: String)(args: Any*) =
+ s"method '$name' called with arguments ${args.mkString("'", "', '", "'")}"
+}
+
+class Foo {
+ val bar = new F
+
+ bar. //note whitespace after dot
+ /*?*/ //force typechecking
+}
+
diff --git a/test/files/run/t5530.flags b/test/files/run/t5530.flags
deleted file mode 100644
index e1b37447c9..0000000000
--- a/test/files/run/t5530.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xexperimental \ No newline at end of file
diff --git a/test/files/run/t5532.flags b/test/files/run/t5532.flags
deleted file mode 100644
index e1b37447c9..0000000000
--- a/test/files/run/t5532.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xexperimental \ No newline at end of file
diff --git a/test/files/run/t5614.flags b/test/files/run/t5614.flags
deleted file mode 100644
index 48fd867160..0000000000
--- a/test/files/run/t5614.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xexperimental
diff --git a/test/files/run/t8852a.scala b/test/files/run/t8852a.scala
new file mode 100644
index 0000000000..cbff8ab75b
--- /dev/null
+++ b/test/files/run/t8852a.scala
@@ -0,0 +1,34 @@
+import scala.tools.partest._
+
+// Test that static methods in Java interfaces (new in Java 8)
+// are callable from jointly compiler Scala code.
+object Test extends CompilerTest {
+ import global._
+
+ override lazy val units: List[CompilationUnit] = {
+ // This test itself does not depend on JDK8.
+ javaCompilationUnits(global)(staticMethodInInterface) ++
+ compilationUnits(global)(scalaClient)
+ }
+
+ private def staticMethodInInterface = """
+public interface Interface {
+ public static int staticMethod() {
+ return 42;
+ }
+}
+
+ """
+
+ private def scalaClient = """
+object Test {
+ val x: Int = Interface.staticMethod()
+}
+
+class C extends Interface // expect no errors about unimplemented members.
+
+ """
+
+ // We're only checking we can compile it.
+ def check(source: String, unit: global.CompilationUnit): Unit = ()
+}
diff --git a/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala b/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala
index 91868a5683..e4be42ac96 100644
--- a/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala
+++ b/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala
@@ -33,7 +33,6 @@ class SymbolTableForUnitTesting extends SymbolTable {
lazy val loaders: SymbolTableForUnitTesting.this.loaders.type = SymbolTableForUnitTesting.this.loaders
def platformPhases: List[SubComponent] = Nil
val classPath: ClassPath[AbstractFile] = new PathResolver(settings).result
- def doLoad(cls: ClassPath[AbstractFile]#ClassRep): Boolean = true
def isMaybeBoxed(sym: Symbol): Boolean = ???
def needCompile(bin: AbstractFile, src: AbstractFile): Boolean = ???
def externalEquals: Symbol = ???