I'm looking at the root mirror and inspecting the info.decls
field of it, something along the lines of:
def newPhase(prev: Phase): Phase =
new StdPhase(prev) {
def apply(unit: CompilationUnit): Unit = {
val decls = global.RootClass.info.decls
val scalaz = decls.find(_.toString contains "scalaz")
println(scalaz.get.info.decls.filter(x => !x.hasMeaninglessName))
And it dumps quite a bit of stuff, but.. I still get quite a fair bit of weird output like class anonfun$reduceUnordered$1 extends ;
Wondering if I'm going in the right direction at all, and if so what should I be looking more at to just get the type signatures of methods in the project?
Thanks!
--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Adelbert!The `API` phase of incremental compiler does exactly that.
Woah so many responses, this is awesome :-)I think I'll need an approach that allows me to do this programatically, if this is at all possible. I think ideally I'd like to point it at some source files, or maybe some class files, and hopefully even just a JAR, give it some namespace prefix (e.g. "scala.collection") and get access to the functions/methods that reside in there. Ideally I'd be able to canonicalize the output as well.. for instance something likedrop: List[A] => Int => List[A]fill: Int => ( => A) => List[A]Adriaan and Jason's code looks quite interesting, but it looks like it relies on the special `Symbol` import you get from dropping into power mode in the REPL - is it possible to do something similar programatically?Haoyi's Pressy example also looks very interesting.. will explore that front.