我正在尝试在 REPL 上运行ScalaCheck。
所以我做了一个 sbt 项目,内容如下build.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
^
查看文档,我不确定为什么我不能执行此导入。