From 2a4a19e1fd183f87db3839a98f3f0165af09685e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 1 Feb 2019 08:31:00 +0100 Subject: [PATCH] Implied Conversion -> Implicit Conversion Implied felt forced in this context --- docs/docs/reference/contextual/conversions.md | 8 ++++---- docs/docs/reference/contextual/query-types.md | 4 ++-- docs/sidebar.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/docs/reference/contextual/conversions.md b/docs/docs/reference/contextual/conversions.md index 4f169670982a..072eab53c2b9 100644 --- a/docs/docs/reference/contextual/conversions.md +++ b/docs/docs/reference/contextual/conversions.md @@ -1,20 +1,20 @@ --- layout: doc-page -title: "Inferable Conversions" +title: "Implicit Conversions" --- -Inferable conversions are defined by implied instances of the `scala.Conversion` class. +Implicit conversions are defined by implied instances of the `scala.Conversion` class. This class is defined in package `scala` as follows: ```scala abstract class Conversion[-T, +U] extends (T => U) ``` -For example, here is an inferable conversion from `String` to `Token`: +For example, here is an implicit conversion from `String` to `Token`: ```scala implied for Conversion[String, Token] { def apply(str: String): Token = new KeyWord(str) } ``` -An inferable conversion is applied automatically by the compiler in three situations: +An implicit conversion is applied automatically by the compiler in three situations: 1. If an expression `e` has type `T`, and `T` does not conform to the expression's expected type `S`. 2. In a selection `e.m` with `e` of type `T`, but `T` defines no member `m`. diff --git a/docs/docs/reference/contextual/query-types.md b/docs/docs/reference/contextual/query-types.md index 0df2b20b9cba..43929f17c601 100644 --- a/docs/docs/reference/contextual/query-types.md +++ b/docs/docs/reference/contextual/query-types.md @@ -3,7 +3,7 @@ layout: doc-page title: "Context Queries" --- -_Context queries_ are functions with inferable parameters. +_Context queries_ are functions with (only) inferable parameters. _Context query types_ are the types of first-class context queries. Here is an example for a context query type: ```scala @@ -26,7 +26,7 @@ context query literal, `E` is converted to a context query literal by rewriting given (x_1: T1, ..., x_n: Tn) => E ``` where the names `x_1`, ..., `x_n` are arbitrary. This expansion is performed -before the expression `E` is typechecked, which means that x_1`, ..., `x_n` +before the expression `E` is typechecked, which means that `x_1`, ..., `x_n` are available as implied instances in `E`. Like query types, query literals are written with a `given` prefix. They differ from normal function literals in two ways: diff --git a/docs/sidebar.yml b/docs/sidebar.yml index bea0d5303028..c0d67dab2276 100644 --- a/docs/sidebar.yml +++ b/docs/sidebar.yml @@ -54,7 +54,7 @@ sidebar: url: docs/reference/derivation.html - title: Context Queries url: docs/reference/contextual/query-types.html - - title: Implied Conversions + - title: Implicit Conversions url: docs/reference/contextual/conversions.html - title: Inferable By-Name Parameters url: docs/reference/contextual/inferable-by-name-parameters.html