Skip to content

Commit f461bc8

Browse files
committed
change reference docs from implied to implicit
1 parent bf5107d commit f461bc8

30 files changed

+653
-653
lines changed

docs/docs/reference/contextual-implicit/import-implied.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/docs/reference/contextual-implicit/instance-defs.md

Lines changed: 0 additions & 85 deletions
This file was deleted.

docs/docs/reference/contextual-implicit/context-bounds.md renamed to docs/docs/reference/contextual-implied/context-bounds.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ title: "Context Bounds"
55

66
## Context Bounds
77

8-
A context bound is a shorthand for expressing a common pattern of an implicit parameter that depends on a type parameter. Using a context bound, the `maximum` function of the last section can be written like this:
8+
A context bound is a shorthand for expressing a common pattern of an inferable parameter that depends on a type parameter. Using a context bound, the `maximum` function of the last section can be written like this:
99
```scala
1010
def maximum[T: Ord](xs: List[T]): T = xs.reduceLeft(max)
1111
```
12-
A bound like `: Ord` on a type parameter `T` of a method or class is equivalent to a given clause `given Ord[T]`. The implicit parameter(s) generated from context bounds come last in the definition of the containing method or class. E.g.,
12+
A bound like `: Ord` on a type parameter `T` of a method or class indicates an inferable parameter `given Ord[T]`. The inferable parameter(s) generated from context bounds come last in the definition of the containing method or class. E.g.,
1313
```scala
1414
def f[T: C1 : C2, U: C3](x: T) given (y: U, z: V): R
1515
```

docs/docs/reference/contextual-implicit/conversions.md renamed to docs/docs/reference/contextual-implied/conversions.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ layout: doc-page
33
title: "Implicit Conversions"
44
---
55

6-
Implicit conversions are defined by implicit instances of the `scala.Conversion` class.
6+
Implicit conversions are defined by implied instances of the `scala.Conversion` class.
77
This class is defined in package `scala` as follows:
88
```scala
99
abstract class Conversion[-T, +U] extends (T => U)
1010
```
1111
For example, here is an implicit conversion from `String` to `Token`:
1212
```scala
13-
implicit for Conversion[String, Token] {
13+
implied for Conversion[String, Token] {
1414
def apply(str: String): Token = new KeyWord(str)
1515
}
1616
```
17-
Using an alias implicit this can be expressed more concisely as:
17+
Using an implied alias this can be expressed more concisely as:
1818
```scala
19-
implicit for Conversion[String, Token] = new KeyWord(_)
19+
implied for Conversion[String, Token] = new KeyWord(_)
2020
```
2121
An implicit conversion is applied automatically by the compiler in three situations:
2222

@@ -25,19 +25,19 @@ An implicit conversion is applied automatically by the compiler in three situati
2525
3. In an application `e.m(args)` with `e` of type `T`, if `T` does define
2626
some member(s) named `m`, but none of these members can be applied to the arguments `args`.
2727

28-
In the first case, the compiler looks for an implicit value of class
28+
In the first case, the compiler looks in the implied scope for a an instance of
2929
`scala.Conversion` that maps an argument of type `T` to type `S`. In the second and third
30-
case, it looks for an implicit value of class `scala.Conversion` that maps an argument of type `T`
30+
case, it looks for an instance of `scala.Conversion` that maps an argument of type `T`
3131
to a type that defines a member `m` which can be applied to `args` if present.
32-
If such a value `C` is found, the expression `e` is replaced by `C.apply(e)`.
32+
If such an instance `C` is found, the expression `e` is replaced by `C.apply(e)`.
3333

3434
## Examples
3535

3636
1. The `Predef` package contains "auto-boxing" conversions that map
3737
primitive number types to subclasses of `java.lang.Number`. For instance, the
3838
conversion from `Int` to `java.lang.Integer` can be defined as follows:
3939
```scala
40-
implicit int2Integer for Conversion[Int, java.lang.Integer] =
40+
implied int2Integer for Conversion[Int, java.lang.Integer] =
4141
java.lang.Integer.valueOf(_)
4242
```
4343

@@ -59,9 +59,9 @@ object Completions {
5959
//
6060
// CompletionArg.fromStatusCode(statusCode)
6161

62-
implicit fromString for Conversion[String, CompletionArg] = Error(_)
63-
implicit fromFuture for Conversion[Future[HttpResponse], CompletionArg] = Response(_)
64-
implicit fromStatusCode for Conversion[Future[StatusCode], CompletionArg] = Status(_)
62+
implied fromString for Conversion[String, CompletionArg] = Error(_)
63+
implied fromFuture for Conversion[Future[HttpResponse], CompletionArg] = Response(_)
64+
implied fromStatusCode for Conversion[Future[StatusCode], CompletionArg] = Status(_)
6565
}
6666
import CompletionArg._
6767

0 commit comments

Comments
 (0)