【问题标题】:In Scala's repl, programmatically find implicitly added functions在 Scala 的 repl 中,以编程方式查找隐式添加的函数
【发布时间】:2014-04-24 04:48:45
【问题描述】:
【问题讨论】:
标签:
scala
read-eval-print-loop
【解决方案1】:
FWIW,我正在对选项卡完成进行一些修复,建议的一个功能是在几个选项卡之后显示增强功能。
scala> $intp
res0: scala.tools.nsc.interpreter.IMain = scala.tools.nsc.interpreter.ILoop$ILoopInterpreter@27fa135a
scala> :power
** Power User mode enabled - BEEP WHIR GYVE **
** :phase has been set to 'typer'. **
** scala.tools.nsc._ has been imported **
** global._, definitions._ also imported **
** Try :help, :vals, power.<tab> **
scala> intp
res1: scala.tools.nsc.interpreter.IMain = scala.tools.nsc.interpreter.ILoop$ILoopInterpreter@27fa135a
scala> analyzer.allViewsFrom(IntTpe, typer.context, Nil)
res2: List[($r.intp.global.analyzer.SearchResult, List[$r.intp.global.analyzer.global.TypeConstraint])] = List((SearchResult(scala.this.Int.int2double, ),List()), (SearchResult(scala.this.Int.int2float, ),List()), (SearchResult(scala.this.Int.int2long, ),List()))