Hi,
I am running into some issues with tagged types. My guess right now is that the taggedTypeWireFormat in WireFormatImplicits is for shapeless tagged types, while I am trying to use scalaz tagged types.
For this code, I get "diverging implicit expansion":
import com.nicta.scoobi.Scoobi._
import scalaz.{DList => _, _}
import Scalaz._
object Test extends ScoobiApp{
def run(){
val dl = DList(Tags.Multiplication(1), Tags.Multiplication(2), Tags.Multiplication(3))
}
}
If I exclude the implicit wireformat and create my own, it works fine:
import com.nicta.scoobi.Scoobi.{taggedTypeWireFormat => _, _}
import scalaz.{DList => _, _}
import Scalaz._
object Test2 extends ScoobiApp{
def run(){
implicit def scalazTaggedTypeWireFormat[T : WireFormat, U]: WireFormat[T @@ U] =
implicitly[WireFormat[T]].asInstanceOf[WireFormat[T @@ U]]
val dl = DList(Tags.Multiplication(1), Tags.Multiplication(2), Tags.Multiplication(3))
}
}
What is the best way to deal with this?
Thanks.