Skip to content

Commit a56ddf5

Browse files
committed
Improve documentation
1 parent 420822b commit a56ddf5

34 files changed

+38
-38
lines changed

.github/ISSUE_TEMPLATE/crash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: "\U0001F4A5 Crash report"
3-
about: Report a Dotty Compiler compiler crash
3+
about: Report a Dotty compiler crash
44
title: ''
55
labels: itype:bug, itype:crash
66
assignees: ''

docs/blog/_posts/2016-02-03-essence-of-scala.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ property was shown with a mechanized, (i.e. machine-checked) proof:
6565
Formulating the precise soundness theorem and proving it was unexpectedly hard,
6666
because it uncovered some technical challenges that had not been
6767
studied in depth before. In DOT - as well as in many programming languages -
68-
you can have conflicting definitions. For instance you might have an abstract
68+
you can have conflicting definitions. For instance, you might have an abstract
6969
type declaration in a base class with two conflicting aliases in subclasses:
7070
```scala
7171
trait Base { type A }
@@ -142,4 +142,4 @@ project are important.
142142
This lets us put other constructs of the Scala language to the test,
143143
either to increase our confidence that they are indeed sound, or
144144
to show that they are unsound. In my next blog I will
145-
present some of the issues we have discovered through that exercise.
145+
present some issues we have discovered through that exercise.

docs/blog/_posts/2016-05-05-multiversal-equality.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For instance, one might want to introduce a proxy for some data structure so tha
1818

1919
## Where Are We Today?
2020

21-
The problems of universal equality in Scala are of course well known. Some libraries have tried to fix it by adding another equality operator with more restricted typing. Most often this safer equality is written `===`. While `===` is certainly useful, I am not a fan of adding another equality operator to the language and core libraries. It would be much better if we could fix `==` instead. This would be both simpler and would catch all potential equality problems including those related to pattern matching.
21+
The problems of universal equality in Scala are of course well-known. Some libraries have tried to fix it by adding another equality operator with more restricted typing. Most often this safer equality is written `===`. While `===` is certainly useful, I am not a fan of adding another equality operator to the language and core libraries. It would be much better if we could fix `==` instead. This would be both simpler and would catch all potential equality problems including those related to pattern matching.
2222

2323
How can `==` be fixed? It looks much harder to do this than adding an alternate equality operator. First, we have to keep backwards compatibility. The ability to compare everything to everything is by now baked into lots of code and libraries. Second, with just one equality operator we need to make this operator work in all cases where it makes sense. An alternative `===` operator can choose to refuse some comparisons that should be valid because there's always `==` to fall back to. With a unique `==` operator we do not have this luxury.
2424

docs/blog/_posts/2016-12-05-implicit-function-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ abstraction to Scala_". What do I mean by this?
1414
**Abstraction**: The ability to name a concept and use just the name afterwards.
1515

1616
**Contextual**: A piece of a program produces results or outputs in
17-
some context. Our programming languages are very good in describing
17+
some context. Our programming languages are very good at describing
1818
and abstracting what outputs are produced. But there's hardly anything
1919
yet available to abstract over the inputs that programs get from their
2020
context. Many interesting scenarios fall into that category,

docs/blog/_posts/2017-12-01-fifth-dotty-milestone-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ are currently two backends using the TASTY frontend:
109109
different backends...
110110

111111
### Generic java signatures [#3234](https://github.com/lampepfl/dotty/pull/3234)
112-
Dotty now emits generic signatures for classes and methods. Theses signatures are used by compilers,
112+
Dotty now emits generic signatures for classes and methods. Those signatures are used by compilers,
113113
debuggers and to support runtime reflection. For example:
114114

115115
```scala

docs/blog/_posts/2019-04-15-14th-dotty-milestone-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ For more information, please see the [documentation](https://dotty.epfl.ch/docs/
122122

123123
## Other changes
124124

125-
Some of the other changes include:
125+
Some other changes include:
126126

127127
- `infer` method renamed to `the`, the semantics of which is now the same as that of the `the` method of Shapeless. Namely, the implicits are resolved more precisely – see this [gist](https://gist.github.com/milessabin/8833a1dbf7e8245b30f8) for an example in Shapeless, and the Dotty [documentation](https://dotty.epfl.ch/docs/reference/contextual/given-clauses.html#querying-implied-instances) for more details.
128128
- The syntax of quoting and splicing was changed. Now the quoting is expressed via `'{ ... }` and `'[...]` and splicing – via `${...}` and `$id`. Please see the [documentation](https://dotty.epfl.ch/docs/reference/metaprogramming/macros.html) for more details on these features.

docs/blog/_posts/2019-05-23-15th-dotty-milestone-release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ val res3: Int = 3
8383

8484
To smoothen the migration, the deprecation warnings will only be emitted if you compile with the `-strict` flag under Scala 3. Alphanumeric methods that are defined without the `@infix` annotation used in an infix position will be deprecated by default starting with Scala 3.1.
8585

86-
For more information, see the the [documentation](https://dotty.epfl.ch/docs/reference/changed-features/operators.html#the-infix-annotation). Note that the `@alpha` annotation also described in the documentation is planned for the future and is not available in this release.
86+
For more information, see the [documentation](https://dotty.epfl.ch/docs/reference/changed-features/operators.html#the-infix-annotation). Note that the `@alpha` annotation also described in the documentation is planned for the future and is not available in this release.
8787

8888
## `given` clause comes last
8989
In the previous release, you could write something like this:
@@ -167,7 +167,7 @@ def eval[T](e: Expr[T]): T = e match {
167167
We've also plugged a few soundness problems (e.g. [#5667](https://github.com/lampepfl/dotty/issues/5667)) caused by inferring too much when matching on abstract, union and intersection types. For more information, see PR [#5736](https://github.com/lampepfl/dotty/pull/5736).
168168

169169
## Other changes
170-
Some of the other notable changes include the following:
170+
Some other notable changes include the following:
171171

172172
- Singletons are now allowed in union types. E.g. the following is allowed: `object foo; type X = Int | foo.type`.
173173
- A bunch of improvements was made for the type inference system – see, e.g., PRs [#6454](https://github.com/lampepfl/dotty/pull/6454) and [#6467](https://github.com/lampepfl/dotty/pull/6467).

docs/blog/_posts/2019-11-04-20th-dotty-milestone-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The main reasons for dropping `private[this]` are:
5959
- Its effect over `private` is purely local and can be easily inferred.
6060
- It leads to bike shedding: should I use `private` or `private[this]`? One is shorter but the other might be more efficient.
6161

62-
`protected[this]` by now influences compiler decisions in no way at all. Hence it is is reasonable to drop it.
62+
`protected[this]` by now influences compiler decisions in no way at all. Hence it is reasonable to drop it.
6363

6464
## `with` keyword's new role
6565
`with` keyword can now optionally precede the class body. So that you can write your classes as follows:

docs/blog/_posts/2019-12-20-21th-dotty-milestone-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ For more details also follow the [Migrating the Ecosystem](https://www.scala-lan
6363

6464
Firstly thank you for all the hard work in issue reporting! Being feature complete means that our
6565
issue tracker will now be more important than ever. We encourage you to stress
66-
the compiler and report self contained test-cases! Bug minimization is hard and
66+
the compiler and report self-contained test-cases! Bug minimization is hard and
6767
an art form! Help us unearth those nasty bugs! ✊
6868

6969
Last but not least we restate the mission of Scala 3. Scala has pioneered the

docs/blog/_posts/2020-04-29-24th-dotty-milestone-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authorImg: /images/anatolii.png
66
date: 2020-04-29
77
---
88

9-
Hello! We are excited to announce 0.24.0-RC1 of Dotty. In this version, we have updated the standard library to 2.13.2. Also, we have made some work to make error messages more user friendly and a bunch of other polishings to the language.
9+
Hello! We are excited to announce 0.24.0-RC1 of Dotty. In this version, we have updated the standard library to 2.13.2. Also, we have made some work to make error messages more user-friendly and a bunch of other polishings to the language.
1010

1111
You can try out this version right now, from the comfort of your SBT, by visiting the [home page](https://dotty.epfl.ch/) and scrolling down to the "Create a Dotty Project" section.
1212

docs/docs/contributing/procedures/release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Note that after the first stage of the release cycle (see "Publishing artifacts
4141
- `<stable-version>` *tag* of the stable version being released
4242
- `<rc-version>` *tag* of the RC version being released
4343

44-
However you may end up with as many as 6 tasks being run. The auxiliary tasks may include:
44+
However, you may end up with as many as 6 tasks being run. The auxiliary tasks may include:
4545

4646
- *commit* tests of the *tags* specified above. You may have two of these, corresponding to the two tags. You should see them appearing to have the same commit hash in the CI, but one of them will have the tag next to it and the other one will not. The *tag* one must remain, as the CI tasks on tags publish to maven. CI tasks on commits do not. So it is safe to cancel the task running on the commit, if the commit hash is the same as that of the tag's task commit.
4747
- Older commit from the `master` branch. Look for all the tasks run on the `master` branch in the CI and see if there are more than one of these. Then, find the one testing the most recent commit of the branch. The others can safely be canceled.
@@ -58,7 +58,7 @@ Above, `<stable_release>` is the stable version being released. For example, if
5858

5959
Copy and paste the output into the release issue.
6060

61-
The ecosystem update section for some projects also mentions a set of criteria upon which the project is to be marked in the checklist. When the Travis build status is specified next to the project's name, it is to be understood that this build must pass after all of the other criteria of that project are checked. Note that due to caching, the label image next to the link may not reflect the real status of the build. Therefore, to verify the status, click on the link and make sure that your recent commit passes.
61+
The ecosystem update section for some projects also mentions a set of criteria upon which the project is to be marked in the checklist. When the Travis build status is specified next to the project's name, it is to be understood that this build must pass after all the other criteria of that project are checked. Note that due to caching, the label image next to the link may not reflect the real status of the build. Therefore, to verify the status, click on the link and make sure that your recent commit passes.
6262

6363
When no criteria is specified, common sense is to be used.
6464

docs/docs/internals/debug-macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Debug Macros"
44
---
55

66
Complex macros may break invariants of the compiler, which leads to compiler crashes.
7-
Here we lists common compiler crashes and how to deal with them.
7+
Here we list common compiler crashes and how to deal with them.
88

99
## position not set
1010

docs/docs/internals/explicit-nulls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Within `Types.scala`, we defined some extractors to work with nullable unions:
8282
}
8383
```
8484

85-
These extractor will call utility methods in `NullOpsDecorator.scala`. All of these
85+
This extractor will call utility methods in `NullOpsDecorator.scala`. All of these
8686
are methods of the `Type` class, so call them with `this` as a receiver:
8787

8888
- `stripNull` syntactically strips all `Null` types in the union:

docs/docs/internals/overall-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ context".
8282

8383
With these two conventions in place, it has turned out that implicit contexts
8484
work amazingly well as a device for dependency injection and bulk
85-
parameterization. There is of course always the danger that an unexpected
85+
parameterization. There is of course always the danger that an unexpected
8686
implicit will be passed, but in practice this has not turned out to be much of
8787
a problem.
8888

docs/docs/internals/periods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Dotc's concept of time"
44
---
55

66
Conceptually, the `dotc` compiler's job is to maintain views of various
7-
artifacts associated with source code at all points in time. But what is
7+
artifacts associated with source code at all points in time. But what is
88
*time* for `dotc`? In fact, it is a combination of compiler runs and compiler
99
phases.
1010

docs/docs/reference/changed-features/compiler-plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dotc -Xplugin:pluginA.jar -Xplugin:pluginB.jar Test.scala
3333

3434
The compiler will examine the jar provided, and look for a property file named
3535
`plugin.properties` in the root directory of the jar. The property file specifies
36-
the fully qualified plugin class name. The format of a property file is as follow:
36+
the fully qualified plugin class name. The format of a property file is as follows:
3737

3838
```properties
3939
pluginClass=dividezero.DivideZero
@@ -99,7 +99,7 @@ the `PluginPhase` trait. In order to specify when the phase is executed, we also
9999
need to specify a `runsBefore` and `runsAfter` constraints that are list of phase
100100
names.
101101

102-
We can now transform trees by by overriding methods like `transformXXX`.
102+
We can now transform trees by overriding methods like `transformXXX`.
103103

104104
## Writing a Research Compiler Plugin
105105

docs/docs/reference/changed-features/interpolation-escapes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: doc-page
33
title: Escapes in interpolations
44
---
55

6-
In Scala 2 there was no straightforward way to represnt a single quote character `"` in a single quoted interpolation. A \ character can't be used for that because interpolators themselves decide how to handle escaping, so the parser doesn't know whether or not the " shold be escaped or used as a terminator.
6+
In Scala 2 there was no straightforward way to represent a single quote character `"` in a single quoted interpolation. A \ character can't be used for that because interpolators themselves decide how to handle escaping, so the parser doesn't know whether the " should be escaped or used as a terminator.
77

88
In Dotty, you can use the `$` meta character of interpolations to escape a `"` character.
99

docs/docs/reference/contextual/derivation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ This means that code for generic type classes has to ensure that type exploratio
391391
lockstep and it has to assert this conformance in some places using casts. If generic type classes are correctly
392392
written these casts will never fail.
393393

394-
As mentioned, however, the compiler-provided mechansim is intentionally very low level and it is anticipated that
394+
As mentioned, however, the compiler-provided mechanism is intentionally very low level and it is anticipated that
395395
higher level type class derivation and generic programming libraries will build on this and Dotty's other
396396
metaprogramming facilities to hide these low-level details from type class authors and general users. Type class
397397
derivation in the style of both shapeless and Magnolia are possible (a prototype of shapeless 3, which combines

docs/docs/reference/contextual/motivation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ This design thus avoids feature interactions and makes the language more consist
7373

7474
Could we achieve the same goals by tweaking existing implicits? After having tried for a long time, I believe now that this is impossible.
7575

76-
- First, some of the problems are clearly syntactic and require different syntax to solve them.
76+
- First, some problems are clearly syntactic and require different syntax to solve them.
7777
- Second, there is the problem how to migrate. We cannot change the rules in mid-flight. At some stage of language evolution we need to accommodate both the new and the old rules. With a syntax change, this is easy: Introduce the new syntax with new rules, support the old syntax for a while to facilitate cross compilation, deprecate and phase out the old syntax at some later time. Keeping the same syntax does not offer this path, and in fact does not seem to offer any viable path for evolution
7878
- Third, even if we would somehow succeed with migration, we still have the problem
7979
how to teach this. We cannot make existing tutorials go away. Almost all existing tutorials start with implicit conversions, which will go away; they use normal imports, which will go away, and they explain calls to methods with implicit parameters by expanding them to plain applications, which will also go away. This means that we'd have

docs/docs/reference/contextual/relationship-implicits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ implicit class CircleDecorator(c: Circle) extends AnyVal {
119119
def circumference: Double = c.radius * math.Pi * 2
120120
}
121121
```
122-
Abstract extension methods in traits that are implemented in given instances have no direct counterpart in Scala-2. The only way to simulate these is to make implicit classes available through imports. The Simulacrum macro library can automate this process in some cases.
122+
Abstract extension methods in traits that are implemented in given instances have no direct counterpart in Scala-2. The only way to simulate this is to make implicit classes available through imports. The Simulacrum macro library can automate this process in some cases.
123123

124124
### Typeclass Derivation
125125

docs/docs/reference/contextual/typeclasses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Applying the `List.map` ability with the following mapping function as parameter
154154

155155
Now, applying the `List.map` ability with the following mapping function as parameter: `mapping: A => List[B]` would result in a `List[List[B]]`.
156156

157-
To avoid avoid managing lists of lists, we may want to "flatten" the values in a single list.
157+
To avoid managing lists of lists, we may want to "flatten" the values in a single list.
158158

159159
That's where `Monad` enters the party. A `Monad` for type `F[?]` is a `Functor[F]` with 2 more abilities:
160160
* the flatten ability we just described: turning `F[A]` to `F[B]` when given a `mapping: A => F[B]` function

docs/docs/reference/dropped-features/this-qualifier.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Dropped: private[this] and protected[this]
55

66
The `private[this]` and `protected[this]` access modifiers are deprecated and will be phased out.
77

8-
Previously, these modifier were needed
8+
Previously, these modifiers were needed
99

1010
- for avoiding the generation of getters and setters
1111
- for excluding code under a `private[this]` from variance checks. (Scala 2 also excludes `protected[this]` but this was found to be unsound and was therefore removed).

docs/docs/reference/features-classification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ These constructs replace existing constructs with the aim of making the language
4646
provide a simple and general way to express aggregation, which can replace the
4747
previous facade pattern of package objects inheriting from classes.
4848
- [Vararg patterns](changed-features/vararg-patterns.md) now use the form `: _*` instead of `@ _*`, mirroring vararg expressions,
49-
- [Creator applications](other-new-features/creator-applications.md) allow to use simple function call syntax
49+
- [Creator applications](other-new-features/creator-applications.md) allow using simple function call syntax
5050
instead of `new` expressions. `new` expressions stay around as a fallback for
5151
the cases where creator applications cannot be used.
5252

docs/docs/reference/metaprogramming/erased-terms-spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ title: "Erased Terms Spec"
5959

6060
7. Overriding
6161
* Member definitions overriding each other must both be `erased` or not be `erased`
62-
* `def foo(x: T): U` cannot be overridden by `def foo(erased x: T): U` an vice-versa
62+
* `def foo(x: T): U` cannot be overridden by `def foo(erased x: T): U` and vice-versa
6363

docs/docs/reference/metaprogramming/simple-smp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ To prove (2):
142142
- `t1` is a simple term but `t2` is not. Then by the second IH. `t2 ==> t22`, hence `t ==> t1 t22`.
143143

144144
- The case `t = ’t2` is not typable.
145-
- If `t = ~t2` then by inversion we have `E2 ~ |- t2: ’T2`, for some some type `T2`.
145+
- If `t = ~t2` then by inversion we have `E2 ~ |- t2: ’T2`, for some type `T2`.
146146
By the first I.H., we have one of
147147

148148
- `t2 = v`. Since `t2: ’T2`, we must have `v = ’u`, for some simple term `u`, hence `t = ~’u`.

docs/docs/reference/metaprogramming/staging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The framework expresses at the same time compile-time meta-programming and
77
multi-stage programming. We can think of compile-time meta-programming as a
88
two stage compilation process: one that we write the code in top-level splices,
99
that will be used for code generation (macros) and one that will perform all
10-
necessecary evaluations at compile-time and an object program that we will run
10+
necessary evaluations at compile-time and an object program that we will run
1111
as usual. What if we could synthesize code at run-time and offer one extra stage
1212
to the programmer? Then we can have a value of type `Expr[T]` at run-time that we
1313
can essentially treat as a typed-syntax tree that we can either _show_ as a

0 commit comments

Comments
 (0)