包猫包含具有相同名称的对象和包:implicits

package cats contains object and package with same name: implicits

在这里听说了新的 Cats-Effect 库

http://typelevel.org/blog/2017/05/02/io-monad-for-cats.html

立即将以下行添加到我的菊石中 shell predef.sc

interp.load.ivy("org.typelevel" % "cats-core_2.12" % "0.9.0")
interp.load.ivy( "org.typelevel" % "cats-effect_2.12" % "0.1-0848c9b")

现在,当我装载菊石时 shell。我收到错误

cmd0.sc:1: package cats contains object and package with same name: implicits
one of them needs to be removed from classpath
import cats.effect.IO
       ^
Compilation Failed

谷歌搜索并在此处找到解决方案

Package contains object and package with same name

但我想知道如何将 -Yresolve-term-conflict:strategy 应用于菊石 shell?

我自己解决了。这是正确的进口

interp.load.ivy("org.typelevel" %% "cats" % "0.9.0")
interp.load.ivy( "org.typelevel" % "cats-effect_2.12" % "0.1-0848c9b")

现在一切正常

@ import cats._
import cats._
@ import cats.effect.IO
import cats.effect.IO
@