diff options
author | Martin Odersky <odersky@gmail.com> | 2010-08-30 16:02:34 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-08-30 16:02:34 +0000 |
commit | 8964f6f1bcc8500f1bc6a2808ef70d8852d208ec (patch) | |
tree | cc558460d2f7be3238af3bf80bc95f5422313641 /src/compiler/scala/tools/nsc/interactive/REPL.scala | |
parent | 41e2c237dfdcaffaa53edc6ef30b044353bce5e4 (diff) | |
download | scala-8964f6f1bcc8500f1bc6a2808ef70d8852d208ec.tar.gz scala-8964f6f1bcc8500f1bc6a2808ef70d8852d208ec.tar.bz2 scala-8964f6f1bcc8500f1bc6a2808ef70d8852d208ec.zip |
New wider interface of presentation compiler.
Diffstat (limited to 'src/compiler/scala/tools/nsc/interactive/REPL.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/interactive/REPL.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/REPL.scala b/src/compiler/scala/tools/nsc/interactive/REPL.scala index 5589ddb9b1..775b979851 100644 --- a/src/compiler/scala/tools/nsc/interactive/REPL.scala +++ b/src/compiler/scala/tools/nsc/interactive/REPL.scala @@ -80,9 +80,9 @@ object REPL { * complete file off1 off2? */ def run(comp: Global) { - val reloadResult = new comp.Response[Unit] - val typeatResult = new comp.Response[comp.Tree] - val completeResult = new comp.Response[List[comp.Member]] + val reloadResult = new Response[Unit] + val typeatResult = new Response[comp.Tree] + val completeResult = new Response[List[comp.Member]] def makePos(file: String, off1: String, off2: String) = { val source = toSourceFile(file) comp.rangePos(source, off1.toInt, off1.toInt, off2.toInt) @@ -118,11 +118,11 @@ object REPL { def toSourceFile(name: String) = new BatchSourceFile(new PlainFile(new java.io.File(name))) - def show[T](svar: SyncVar[Either[T, Throwable]]) { + def show[T](svar: Response[T]) { svar.get match { case Left(result) => println("==> "+result) - case Right(exc/*: Throwable ??*/) => exc.printStackTrace; println("ERROR: "+exc) + case Right(exc) => exc.printStackTrace; println("ERROR: "+exc) } - svar.unset() + svar.clear() } } |