I'm new to Scala and I'm using the shapeless library to manipulate tuples. (Though this isn't specific to shapeless)
I've run in to a problem related to implicit parameters, which I don't quite understand. Here are there signatures:
def reverse(implicit reverse: Reverse[T]): reverse.Out = reverse(t) def drop[N <: Nat](implicit drop: Drop[T, N]): drop.Out = drop(t) And here is it in use:
val foo = ("foo","bar","other").reverse val bar = ("foo","bar","other").drop(1) However on Scala 2.10 I get this error:
Error:(25, 37) could not find implicit value for parameter reverse: shapeless.ops.tuple.Reverse[(String, String, String)] val zzy = ("foo","bar","other").reverse
Error:(29, 37) not enough arguments for method reverse: (implicit reverse: shapeless.ops.tuple.Reverse[(String, String, String)])reverse.Out. Unspecified value parameter reverse. val foo = ("foo","bar","other").reverse
^ I'm not sure what the implicit parameter is that it is trying to reference, or why I need it. Also, this seems to work on 2.11 (but IntelliJ flags it)