8000 macro paradise for 2.10.x · zeide/scala.github.com@77c41df · GitHub
[go: up one dir, main page]

Skip to content

Commit 77c41df

Browse files
committed
macro paradise for 2.10.x
1 parent 72d4aae commit 77c41df

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

overviews/macros/paradise.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ languages: [ja]
1313

1414
**Eugene Burmako**
1515

16+
## Macro paradise for 2.11.x
17+
1618
Macro paradise is an alias of the experimental `paradise/macros` branch in the official Scala repository, designed to facilitate rapid development of macros without compromising the stability of Scala. To learn more about this branch, check out [my talk](http://scalamacros.org/news/2012/12/18/macro-paradise.html).
1719

1820
We have set up a nightly build which publishes snapshot artifacts to Sonatype. Consult [https://github.com/scalamacros/sbt-example-paradise](https://github.com/scalamacros/sbt-example-paradise) for an end-to-end example of using our nightlies in SBT, but in a nutshell playing with macro paradise is as easy as adding these three lines to your build (granted you've already [set up SBT](/overviews/macros/overview.html#using_macros_with_maven_or_sbt) to use macros):
@@ -26,4 +28,9 @@ you compile a project that uses macro paradise, everything works fine. But in a
2628
builds for `scala-library.jar` and `scala-reflect.jar`, but not for `scala-compiler.jar`. The solution is to use `sbt reboot full`, which
2729
re-downloads SBT itself and the underlying scalac instance. We're investigating this unfortunate issue, but in the meanwhile you can join the discussion of this matter [at the mailing list](https://groups.google.com/forum/?fromgroups=#!topic/simple-build-tool/UalhhX4lKmw/discussion).
2830

29-
Scaladocs corresponding to paradise nightlies can be found at [our Jenkins server](https://scala-webapps.epfl.ch/jenkins/view/misc/job/macro-paradise-nightly-main/ws/dists/latest/doc/scala-devel-docs/api/index.html). For example, here's the new API for working with top-level definitions: [scala.reflect.macros.Synthetics](https://scala-webapps.epfl.ch/jenkins/view/misc/job/macro-paradise-nightly-main/ws/dists/latest/doc/scala-devel-docs/api/index.html#scala.reflect.macros.Synthetics).
31+
Scaladocs corresponding to paradise nightlies can be found at [our Jenkins server](https://scala-webapps.epfl.ch/jenkins/view/misc/job/macro-paradise-nightly-main/ws/dists/latest/doc/scala-devel-docs/api/index.html). For example, here's the new API for working with top-level definitions: [scala.reflect.macros.Synthetics](https://scala-webapps.epfl.ch/jenkins/view/misc/job/macro-paradise-nightly-main/ws/dists/latest/doc/scala-devel-docs/api/index.html#scala.reflect.macros.Synthetics).
32+
33+
## Macro paradise for 2.10.x
34+
35+
There is also a special build of macro paradise that targets Scala 2.10.x <span class="label success">NEW</span>. With macro paradise 2.10, you can already make use of quasiquotes in 2.10.x: compile your macros using the `2.10.2-SNAPSHOT` build of macro paradise, and then these macros will be perfectly usable with a vanilla 2.10.x compiler. It works in such a neat way, because quasiquotes themselves are macros, so after being expanded they leave no traces of dependencies on macro paradise (well, almost). Check out [https://github.com/scalamacros/sbt-example-paradise210](https://github.com/scalamacros/sbt-example-paradise210) for an end-to-end example and a detailed explanation of this cool trick.
36+

0 commit comments

Comments
 (0)
0