Skip to content

Make links relative and to .md (instead of .html) #6811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/reference/changed-features/eta-expansion.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ conflict with eta expansion. Automatic `()` insertion is
[limited](../dropped-features/auto-apply.md) in Dotty, but the fundamental ambiguity
remains.

[More details](eta-expansion-spec.html)
[More details](eta-expansion-spec.md)

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ implicit val myConverter: Conversion[Int, String] = _.toString
```

Note that implicit conversions are also affected by the [changes to
implicit resolution](implicit-resolution.html) between Scala 2 and
implicit resolution](implicit-resolution.md) between Scala 2 and
Scala 3.

## Motivation for the changes
Expand Down Expand Up @@ -111,12 +111,12 @@ to `Conversion`.

For the migration of implicit conversions that are affected by the
changes to implicit resolution, refer to the [Changes in Implicit
Resolution](implicit-resolution.html) for more information.
Resolution](implicit-resolution.md) for more information.

## Reference

For more information about implicit resolution, see [Changes in
Implicit Resolution](implicit-resolution.html).
Implicit Resolution](implicit-resolution.md).
Other details are available in
[PR #2065](https://github.com/lampepfl/dotty/pull/2065)

Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ implicitly[Ordering[A]] // Ok, will use the implicit conversion from
// `A` to `Int` and the `Ordering` for `Int`.
```

[More details](implicit-conversions-spec.html)
[More details](implicit-conversions-spec.md)
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ resolution yields several competing alternatives when `n >= 1` parameter lists a
into account, then resolution re-tried using `n + 1` argument lists.

This change is motivated by the new language feature [extension
methods](../contextual/extension-methods.html), where emerges the need to do
methods](../contextual/extension-methods.md), where emerges the need to do
overload resolution based on additional argument blocks.

## Parameter Types of Function Values
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/changed-features/structural-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ differences.
`ClassTag` indicating the method's formal parameter types. `Dynamic`
comes with `updateDynamic`.

[More details](structural-types-spec.html)
[More details](structural-types-spec.md)
6 changes: 3 additions & 3 deletions docs/docs/reference/contextual/delegates.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Given Instances"
---

Given instances (or, simply, "givens") define "canonical" values of certain types
that serve for synthesizing arguments to [given clauses](./given-clauses.html). Example:
that serve for synthesizing arguments to [given clauses](./given-clauses.md). Example:

```scala
trait Ord[T] {
Expand Down Expand Up @@ -34,7 +34,7 @@ This code defines a trait `Ord` with two given instances. `IntOrd` defines
a given for the type `Ord[Int]` whereas `ListOrd[T]` defines givens
for `Ord[List[T]]` for all types `T` that come with a given instance for `Ord[T]` themselves.
The `given (ord: Ord[T])` clause in `ListOrd` defines an implicit parameter.
Given clauses are further explained in the [next section](./given-clauses.html).
Given clauses are further explained in the [next section](./given-clauses.md).

## Anonymous Given Instances

Expand Down Expand Up @@ -74,7 +74,7 @@ If a `given` definition has type parameters or a given clause, a fresh instance

## Syntax

Here is the new syntax of given instances, seen as a delta from the [standard context free syntax of Scala 3](http://dotty.epfl.ch/docs/internals/syntax.html).
Here is the new syntax of given instances, seen as a delta from the [standard context free syntax of Scala 3](../../internals/syntax.md).
```
TmplDef ::= ...
| ‘given’ GivenDef
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/extension-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ As usual, type parameters of the extension method follow the defined method name
### Syntax

The required syntax extension just adds one clause for extension methods relative
to the [current syntax](https://github.com/lampepfl/dotty/blob/master/docs/docs/internals/syntax.md).
to the [current syntax](../../internals/syntax.md).
```
DefSig ::= ...
| ‘(’ DefParam ‘)’ [nl] id [DefTypeParamClause] DefParamClauses
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/given-clauses.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def the[T] given (x: T): x.type = x

## Syntax

Here is the new syntax of parameters and arguments seen as a delta from the [standard context free syntax of Scala 3](http://dotty.epfl.ch/docs/internals/syntax.html).
Here is the new syntax of parameters and arguments seen as a delta from the [standard context free syntax of Scala 3](../../internals/syntax.md).
```
ClsParamClauses ::= ...
| {ClsParamClause} {GivenClsParamClause}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ itself a implicit function literal. This is analogous to the automatic
insertion of `scala.Function0` around expressions in by-name argument position.

Implicit function types generalize to `N > 22` in the same way that function types do, see [the corresponding
documentation](https://dotty.epfl.ch/docs/reference/dropped-features/limit22.html).
documentation](../dropped-features/limit22.md).

## Examples

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/implicit-function-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ as the best possible code one could write by hand:
For more info, see the [blog article](https://www.scala-lang.org/blog/2016/12/07/implicit-function-types.html),
(which uses a different syntax that has been superseded).

[More details](./implicit-function-types-spec.html)
[More details](./implicit-function-types-spec.md)
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/implicit-match.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The contents of this page have [moved](./delegate-match.html).
The contents of this page have [moved](./delegate-match.md).
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/import-implied.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The contents of this page have [moved](./import-delegate.html).
The contents of this page have [moved](./import-delegate.md).
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The contents of this page have [moved](./implicit-by-name-parameters.html).
The contents of this page have [moved](./implicit-by-name-parameters.md).
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/inferable-params.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The contents of this page have [moved](./given-clauses.html).
The contents of this page have [moved](./given-clauses.md).
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/instance-defs.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The contents of this page have [moved](./delegates.html).
The contents of this page have [moved](./delegates.md).
24 changes: 12 additions & 12 deletions docs/docs/reference/contextual/motivation.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,25 @@ Existing Scala programmers by and large have gotten used to the status quo and s

The following pages introduce a redesign of contextual abstractions in Scala. They introduce four fundamental changes:

1. [Given Instances](./delegates.html) are a new way to define basic terms that can be synthesized. They replace implicit definitions. The core principle of the proposal is that, rather than mixing the `implicit` modifier with a large number of features, we have a single way to define terms that can be synthesized for types.
1. [Given Instances](./delegates.md) are a new way to define basic terms that can be synthesized. They replace implicit definitions. The core principle of the proposal is that, rather than mixing the `implicit` modifier with a large number of features, we have a single way to define terms that can be synthesized for types.

2. [Given Clauses](./given-clauses.html) are a new syntax for implicit _parameters_ and their _arguments_. Both are introduced with the same keyword, `given`. This unambiguously aligns parameters and arguments, solving a number of language warts. It also allows us to have several implicit parameter sections, and to have implicit parameters followed by normal ones.
2. [Given Clauses](./given-clauses.md) are a new syntax for implicit _parameters_ and their _arguments_. Both are introduced with the same keyword, `given`. This unambiguously aligns parameters and arguments, solving a number of language warts. It also allows us to have several implicit parameter sections, and to have implicit parameters followed by normal ones.

3. [Given Imports](./import-delegate.html) are a new class of imports that specifically import given instances and nothing else. Given instances _must be_ imported with `import given`, a plain import will no longer bring them into scope.
3. [Given Imports](./import-delegate.md) are a new class of imports that specifically import given instances and nothing else. Given instances _must be_ imported with `import given`, a plain import will no longer bring them into scope.

4. [Implicit Conversions](./conversions.html) are now expressed as given instances of a standard `Conversion` class. All other forms of implicit conversions will be phased out.
4. [Implicit Conversions](./conversions.md) are now expressed as given instances of a standard `Conversion` class. All other forms of implicit conversions will be phased out.

This section also contains pages describing other language features that are related to context abstraction. These are:

- [Context Bounds](./context-bounds.html), which carry over unchanged.
- [Extension Methods](./extension-methods.html) replace implicit classes in a way that integrates better with typeclasses.
- [Implementing Typeclasses](./typeclasses.html) demonstrates how some common typeclasses can be implemented using the new constructs.
- [Typeclass Derivation](./derivation.html) introduces constructs to automatically derive typeclass instances for ADTs.
- [Multiversal Equality](./multiversal-equality.html) introduces a special typeclass
- [Context Bounds](./context-bounds.md), which carry over unchanged.
- [Extension Methods](./extension-methods.md) replace implicit classes in a way that integrates better with typeclasses.
- [Implementing Typeclasses](./typeclasses.md) demonstrates how some common typeclasses can be implemented using the new constructs.
- [Typeclass Derivation](./derivation.md) introduces constructs to automatically derive typeclass instances for ADTs.
- [Multiversal Equality](./multiversal-equality.md) introduces a special typeclass
to support type safe equality.
- [Implicit Function Types](./implicit-function-types.html) provide a way to abstract over given clauses.
- [Implicit By-Name Parameters](./implicit-by-name-parameters.html) are an essential tool to define recursive synthesized values without looping.
- [Relationship with Scala 2 Implicits](./relationship-implicits.html) discusses the relationship between old-style implicits and new-style givens and how to migrate from one to the other.
- [Implicit Function Types](./implicit-function-types.md) provide a way to abstract over given clauses.
- [Implicit By-Name Parameters](./implicit-by-name-parameters.md) are an essential tool to define recursive synthesized values without looping.
- [Relationship with Scala 2 Implicits](./relationship-implicits.md) discusses the relationship between old-style implicits and new-style givens and how to migrate from one to the other.

Overall, the new design achieves a better separation of term inference from the rest of the language: There is a single way to define given instances instead of a multitude of forms all taking an `implicit` modifier. There is a single way to introduce implicit parameters and arguments instead of conflating implicit with normal arguments. There is a separate way to import given instances that does not allow them to hide in a sea of normal imports. And there is a single way to define an implicit conversion which is clearly marked as such and does not require special syntax.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/multiversal-equality.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Instead of defining `Eql` instances directly, it is often more convenient to der
```scala
class Box[T](x: T) derives Eql
```
By the usual rules if [typeclass derivation](./derivation.html),
By the usual rules if [typeclass derivation](./derivation.md),
this generates the following `Eql` instance in the companion object of `Box`:
```scala
given [T, U] as Eql[Box[T], Box[U]] given Eql[T, U] = Eql.derived
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/query-types-spec.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The contents of this page have [moved](./implicit-function-types-spec.html).
The contents of this page have [moved](./implicit-function-types-spec.md).
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/query-types.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The contents of this page have [moved](./implicit-function-types.html).
The contents of this page have [moved](./implicit-function-types.md).
2 changes: 1 addition & 1 deletion docs/docs/reference/dropped-features/class-shadowing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ other, but classes in Scala cannot be overridden. To keep things clean
(and its internal operations consistent) the Dotty compiler forces you
to rename the inner classes so that their names are different.

[More details](./class-shadowing-spec.html)
[More details](./class-shadowing-spec.md)
2 changes: 1 addition & 1 deletion docs/docs/reference/dropped-features/weak-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ Therefore, Dotty drops the general notion of weak conformance, and
instead keeps one rule: `Int` literals are adapted to other numeric
types if necessary.

[More details](weak-conformance-spec.html)
[More details](weak-conformance-spec.md)
2 changes: 1 addition & 1 deletion docs/docs/reference/enums/adts.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ enum Color(val rgb: Int) {
### Syntax of Enums

Changes to the syntax fall in two categories: enum definitions and cases inside enums.
The changes are specified below as deltas with respect to the Scala syntax given [here](http://dotty.epfl.ch/docs/internals/syntax.html)
The changes are specified below as deltas with respect to the Scala syntax given [here](../../internals/syntax.md)

1. Enum definitions are defined as follows:

Expand Down
Loading