Skip to content

Commit 13bd588

Browse files
committed
mentions macros that must necessarily be whitebox
1 parent 3535079 commit 13bd588

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

overviews/macros/extractors.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,5 @@ Follow our test cases at [run/t5903a](https://github.com/scala/scala/tree/00624a
8686
[run/t5903c](https://github.com/scala/scala/tree/00624a39ed84c3fd245dd9df7454d4cec4399e13/test/files/run/t5903c),
8787
[run/t5903d](https://github.com/scala/scala/tree/00624a39ed84c3fd245dd9df7454d4cec4399e13/test/files/run/t5903d) to see implementations
8888
of this and other use cases for extractor macros.
89+
90+
Please note that extractor macros must be [whitebox](/overviews/macros/blackbox-whitebox.html), otherwise they will not work.

overviews/macros/implicits.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,11 @@ problem is extremely simple and elegant.
140140
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.
141141
The typechecker can infer as much as it possibly can (e.g. in the running example `C` will be inferred to `Foo` and
142142
`L` will remain uninferred) and then stop. After that we expand the macro and then proceed with type inference using the type of the
143-
expansion to help the typechecker with previously undetermined type arguments.
143+
expansion to help the typechecker with previously undetermined type arguments. This is how it's implemented in Scala 2.11.0.
144144

145-
An illustration of this technique in action can be found in our [files/run/t5923c](https://github.com/scalamacros/kepler/tree/7b890f71ecd0d28c1a1b81b7abfe8e0c11bfeb71/test/files/run/t5923c) tests.
145+
An illustration of this technique in action can be found in our [files/run/t5923c](https://github.com/scala/scala/tree/7b890f71ecd0d28c1a1b81b7abfe8e0c11bfeb71/test/files/run/t5923c) tests.
146146
Note how simple everything is. The `materializeIso` implicit macro just takes its first type argument and uses it to produce an expansion.
147147
We don't need to make sense of the second type argument (which isn't inferred yet), we don't need to interact with type inference -
148148
everything happens automatically.
149149

150-
Please note that there is [a funny caveat](https://github.com/scalamacros/kepler/blob/7b890f71ecd0d28c1a1b81b7abfe8e0c11bfeb71/test/files/run/t5923a/Macros_1.scala)
151-
with Nothings that we plan to address later.
150+
Please note that there is [a funny caveat](https://github.com/scala/scala/blob/7b890f71ecd0d28c1a1b81b7abfe8e0c11bfeb71/test/files/run/t5923a/Macros_1.scala) with Nothings that we plan to address later. Also note that fundep materializers must be [whitebox](/overviews/macros/blackbox-whitebox.html), otherwise they will not work.

overviews/macros/typeproviders.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ it has performance problems caused by the fact that Scala emits reflective calls
8484
of structural types. There are several strategies of dealing with that, but this margin is too narrow to contain them
8585
so I refer you to an amazing blog series by Travis Brown for details: [post 1](http://meta.plasm.us/posts/2013/06/19/macro-supported-dsls-for-schema-bindings/), [post 2](http://meta.plasm.us/posts/2013/07/11/fake-type-providers-part-2/), [post 3](http://meta.plasm.us/posts/2013/07/12/vampire-methods-for-structural-types/).
8686

87+
Please note that fake type providers must be [whitebox](/overviews/macros/blackbox-whitebox.html), otherwise they will not work.
88+
8789
### Real type providers
8890

8991
With the help of [macro paradise](/overviews/macros/paradise.html) and its [macro annotations](/overviews/macros/annotations.html), it becomes

0 commit comments

Comments
 (0)