Pauli
Pauli

Reputation: 1265

:import command inside Scala REPL

It's said in the book Scala in Action that using :import command inside Scala REPL we will see:

scala> :imports 
    1) import java.lang._       (153 types, 158 terms)
    2) import scala._           (798 types, 806 terms)
    3) import scala.Predef._    (16 types, 167 terms, 96 are implicit)

And according to this book those packages above are all automatically imported. But in my REPL (Scala 2.10.2) it returns only one line:

scala> :imports
     1) import scala.Predef._   (162 terms, 78 are implicit)

Is there something wrong?

Upvotes: 2

Views: 619

Answers (1)

alatar
alatar

Reputation: 46

"Scala in Action" was written for 2.9:

:~$ scala
Welcome to Scala version 2.9.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_25).
Type in expressions to have them evaluated.
Type :help for more information.

scala> :imports
 1) import java.lang._             (193 types, 199 terms)
 2) import scala._                 (798 types, 804 terms)
 3) import scala.Predef._          (16 types, 167 terms, 96 are implicit)

Upvotes: 3

Related Questions