1
我試圖在REPL上運行ScalaCheck。如何在控制檯/ Scala REPL中使導入org.scalacheck.Gen成爲可能?
所以我做了以下build.sbt
的SBT項目:
name := "Trying out ScalaCheck"
version := "1.0"
scalaVersion := "2.11.2"
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.11.5" % "test"
resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
然後,我輸入reload
和updated
獲得庫。
最後,運行console
後,我試圖通過導入Gen
:
scala> import org.scalacheck.Gen
<console>:7: error: object scalacheck is not a member of package org
import org.scalacheck.Gen
^
望着docs,我不知道爲什麼我不能執行此導入。