Skip to content

Instantly share code, notes, and snippets.

@Blaisorblade
Last active January 3, 2020 16:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Blaisorblade/c05f9f6f994732892caa24cae2eb6c3c to your computer and use it in GitHub Desktop.
Save Blaisorblade/c05f9f6f994732892caa24cae2eb6c3c to your computer and use it in GitHub Desktop.
Running showExtractors in Dotty 0.20.0-RC1 REPL
scala> import scala.quoted._
scala> import scala.quoted.staging._
scala> run[Int]{(given qctx) => { import qctx.tasty.{_, given}; println(('{1}).unseal.showExtractors); '{1}}}
1 |run[Int]{(given qctx) => { import qctx.tasty.{_, given}; println(('{1}).unseal.showExtractors); '{1}}}
| ^
|Could not find implicit scala.quoted.staging.Toolbox.
|
|Default toolbox can be instantiated with:
| `given scala.quoted.staging.Toolbox = scala.quoted.staging.Toolbox.make(getClass.getClassLoader)`
|
scala> given scala.quoted.staging.Toolbox = scala.quoted.staging.Toolbox.make(getClass.getClassLoader)
def given_Toolbox: quoted.staging.Toolbox
scala> withQuoteContext{ (given qctx) => import qctx.tasty.{_, given}; ('{1}).unseal.showExtractors }
val res0: String = Literal(Constant(1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment