8000 Merge pull request #271 from xeno-by/master · eunmin/scala.github.com@df4e69e · GitHub
[go: up one dir, main page]

Skip to content

Commit df4e69e

Browse files
committed
Merge pull request scala#271 from xeno-by/master
type providers
2 parents d98756b + 83314c9 commit df4e69e

File tree

12 files changed

+162
-28
lines changed

12 files changed

+162
-28
lines changed

ja/overviews/macros/implicits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Scala implicit の標準機能である複数のパラメータや重複した
104104

105105
### 提案
106106

107-
[https://github.com/scala/scala/pull/2499](https://github.com/scala/scala/pull/2499) が示すとおり、上記の問題の解法は非常にシンプルでエレガントなものだ。<span class="label success">NEW</span> 現在これは [マクロパラダイス](/ja/overviews/macros/paradise.html) と Scala 2.11.0-M5 の両方で実装されている。
107+
[https://github.com/scala/scala/pull/2499](https://github.com/scala/scala/pull/2499) が示すとおり、上記の問題の解法は非常にシンプルでエレガントなものだ。
108108

109109
Scala 2.10 においてはマクロの適用は全ての型引数が推論されるまでは展開されない。しかし、そうする必要は特に無い。
110110
タイプチェッカはできる所まで推論して (この例の場合、`C``Foo` と推論され、`L` は未定となる) そこで一旦停止する。その後マクロを展開して、展開された型を補助にタイプチェッカは再び以前未定だった型引数の型検査を続行する。

overviews/macros/annotations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ title: Macro Annotations
55
disqus: true
66

77
partof: macros
8-
num: 8
9-
outof: 10
8+
num: 9
9+
outof: 11
1010
languages: [ja]
1111
---
1212
<span class="label important" style="float: right;">MACRO PARADISE</span>

overviews/macros/blackbox-whitebox.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ disqus: true
66

77
partof: macros
88
num: 3
9-
outof: 10
9+
outof: 11
1010
---
1111
<span class="label warning" style="float: right;">EXPERIMENTAL</span>
1212

overviews/macros/bundles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ disqus: true
66

77
partof: macros
88
num: 5
9-
outof: 10
9+
outof: 11
1010
languages: [ja]
1111
---
1212
<span class="label warning" style="float: right;">EXPERIMENTAL</span>

overviews/macros/implicits.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ disqus: true
66

77
partof: macros
88
num: 6
9-
outof: 10
9+
outof: 11
1010
languages: [ja]
1111
---
1212
<span class="label warning" style="float: right;">EXPERIMENTAL</span>
@@ -136,8 +136,7 @@ macro, which synthesizes `Iso[C, L]`, scalac will helpfully infer `L` as `Nothin
136136
### Proposed solution
137137

138138
As demonstrated by [https://github.com/scala/scala/pull/2499](https://github.com/scala/scala/pull/2499), the solution to the outlined
139-
problem is extremely simple and elegant. <span class="label success">NEW</span> It is currently being implemented
140-
both for [macro paradise](/overviews/macros/paradise.html) and Scala 2.11.0-M5.
139+
problem is extremely simple and elegant.
141140

142141
In 2.10 we don't allow macro applications to expand until all their type arguments are inferred. However we don't have to do that.
143142
The typechecker can infer as much as it possibly can (e.g. in the running example `C` will be inferred to `Foo` and

overviews/macros/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ disqus: true
66

77
partof: macros
88
num: 4
9-
outof: 10
9+
outof: 11
1010
languages: [ja]
1111
---
1212
<span class="label warning" style="float: right;">EXPERIMENTAL</span>

overviews/macros/paradise.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ title: Macro Paradise
55
disqus: true
66

77
partof: macros
8-
num: 9
9-
outof: 10
8+
num: 10
9+
outof: 11
1010
languages: [ja]
1111
---
1212
<span class="label success" style="float: right;">NEW</span>

overviews/macros/quasiquotes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ title: Quasiquotes
55
disqus: true
66

77
partof: macros
8-
num: 7
9-
outof: 10
8+
num: 8
9+
outof: 11
1010
languages: [ja]
1111
---
1212
<span class="label warning" style="float: right;">EXPERIMENTAL</span>

overviews/macros/roadmap.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,27 @@ title: Roadmap
55
disqus: true
66

77
partof: macros
8-
num: 10
9-
outof: 10
8+
num: 11
9+
outof: 11
1010
languages: [ja]
1111
---
1212

1313
<span class="label warning" style="float: right;">EXPERIMENTAL</span>
1414

1515
**Eugene Burmako**
1616

17-
| Feature | Scala 2.10 | [Paradise 2.10](/overviews/macros/paradise.html) | [Paradise 2.11](/overviews/macros/paradise.html) | Scala 2.11 |
18-
|-----------------------------------------------------------------------------------|--------------------|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|--------------|
19-
| [Blackbox/whitebox separation](/overviews/macros/blackbox-whitebox.html) | No | No <sup>1</sup> | Yes <sup>1</sup> | Yes |
20-
| [Def macros](/overviews/macros/overview.html) | Yes | Yes <sup>1</sup> | Yes <sup>1</sup> | Yes |
21-
| [Macro bundles](/overviews/macros/bundles.html) | No | No <sup>1</sup> | Yes <sup>1</sup> | Yes |
22-
| [Implicit macros](/overviews/macros/implicits.html) | Yes (since 2.10.2) | Yes <sup>1</sup> | Yes <sup>1</sup> | Yes |
23-
| [Fundep materialization](/overviews/macros/implicits.html#fundep_materialization) | No | Yes <sup>2</sup> | Yes <sup>1</sup> | Yes |
24-
| [Quasiquotes](/overviews/macros/quasiquotes.html) | No | Yes <sup>1</sup> | Yes <sup>1</sup> | Yes |
25-
| [Type macros](/overviews/macros/typemacros.html) | No | [Discontinued](http://scalamacros.org/news/2013/08/05/macro-paradise-2.0.0-snapshot.html)| [Discontinued](http://scalamacros.org/news/2013/08/05/macro-paradise-2.0.0-snapshot.html) | No |
26-
| [Untyped macros](/overviews/macros/untypedmacros.html) | No | [Discontinued](http://scalamacros.org/news/2013/08/05/macro-paradise-2.0.0-snapshot.html)| [Discontinued](http://scalamacros.org/news/2013/08/05/macro-paradise-2.0.0-snapshot.html) | No |
27-
| [Macro annotations](/overviews/macros/annotations.html) | No | Yes <sup>2</sup> | Yes <sup>2</sup> | No |
17+
| Feature | Scala 2.10 | [Paradise 2.10](/overviews/macros/paradise.html) | [Paradise 2.11](/overviews/macros/paradise.html) | Scala 2.11 |
18+
|-----------------------------------------------------------------------------------|--------------------|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------|
19+
| [Blackbox/whitebox separation](/overviews/macros/blackbox-whitebox.html) | No | No <sup>1</sup> | Yes <sup>1</sup> | Yes |
20+
| [Def macros](/overviews/macros/overview.html) | Yes | Yes <sup>1</sup> | Yes <sup>1</sup> | Yes |
21+
| [Macro bundles](/overviews/macros/bundles.html) | No | No <sup>1</sup> | Yes <sup>1</sup> | Yes |
22+
| [Implicit macros](/overviews/macros/implicits.html) | Yes (since 2.10.2) | Yes <sup>1</sup> | Yes <sup>1</sup> | Yes |
23+
| [Fundep materialization](/overviews/macros/implicits.html#fundep_materialization) | No | Yes <sup>2</sup> | Yes <sup>1</sup> | Yes |
24+
| [Type providers](/overviews/macros/typeproviders.html) | Partial support | Yes <sup>2</sup> | Yes <sup>2</sup> | Partial support |
25+
| [Quasiquotes](/overviews/macros/quasiquotes.html) | No | Yes <sup>1</sup> | Yes <sup>1</sup> | Yes |
26+
| [Type macros](/overviews/macros/typemacros.html) | No | [Discontinued](http://scalamacros.org/news/2013/08/05/macro-paradise-2.0.0-snapshot.html)| [Discontinued](http://scalamacros.org/news/2013/08/05/macro-paradise-2.0.0-snapshot.html) | No |
27+
| [Untyped macros](/overviews/macros/untypedmacros.html) | No | [Discontinued](http://scalamacros.org/news/2013/08/05/macro-paradise-2.0.0-snapshot.html)| [Discontinued](http://scalamacros.org/news/2013/08/05/macro-paradise-2.0.0-snapshot.html) | No |
28+
| [Macro annotations](/overviews/macros/annotations.html) | No | Yes <sup>2</sup> | Yes <sup>2</sup> | No |
2829

2930
<p><sup>1</sup> This feature doesn't bring a compile-time or a runtime dependency on macro paradise. This means that neither compiling against your bytecode that uses this feature, nor running this bytecode requires the macro paradise plugin to be present on classpath.</p>
3031
<p><sup>2</sup> This feature brings a compile-time, but not a runtime dependency on macro paradise. This means that compiling against your bytecode that uses this feature will need the plugin to be added to your users' builds, however running this bytecode or results of macro expansions produced by this bytecode doesn't need additional classpath entries.</p>

overviews/macros/toc.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ disqus: true
66

77
partof: macros
88
num: 1
9-
outof: 10
9+
outof: 11
1010
languages: [ja]
1111
---
1212

@@ -15,6 +15,7 @@ languages: [ja]
1515
1. [Def Macros](/overviews/macros/overview.html)
1616
1. [Macro Bundles](/overviews/macros/bundles.html)
1717
1. [Implicit Macros](/overviews/macros/implicits.html)
18+
1. [Type Providers](/overviews/macros/typeproviders.html)
1819
1. [Quasiquotes](/overviews/macros/quasiquotes.html)
1920
1. [Macro Annotations](/overviews/macros/annotations.html)
2021
1. [Macro Paradise](/overviews/macros/paradise.html)

0 commit comments

Comments
 (0)
0