簡體   English   中英

包貓包含具有相同名稱的對象和包:隱式

[英]package cats contains object and package with same name: implicits

在這里聽到有關新的Cats-Effect庫的消息

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

將以下行直接添加到我的炸葯殼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")

現在,當我加載我的炸葯殼時。 我得到錯誤

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

搜尋並在這里找到解決方案

程序包包含對象和具有相同名稱的程序包

但是我不知道如何將-Yresolve-term-conflict:strategy應用於-Yresolve-term-conflict:strategy殼?

我自己解決了。 這是正確的進口

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
@

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM