Created
November 4, 2016 15:49
-
-
Save gruggiero/1269b189d47d3f9e21b56cbf6e37107c to your computer and use it in GitHub Desktop.
Typeable Implicit not found
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Project A has several dependencies, including shapeless_2.10-2.2.5.jar | |
Welcome to Scala version 2.10.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_66). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import shapeless.syntax.typeable._ | |
import shapeless.syntax.typeable._ | |
import shapeless.syntax.typeable._ | |
scala> | |
scala> (Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
<console>:11: shapeless.this.Typeable.genMapTypeable is not a valid implicit value for shapeless.Typeable[Set[String]] because: | |
hasMatchingSymbol reported error: polymorphic expression cannot be instantiated to expected type; | |
found : [M[X, Y], K, V]shapeless.Typeable[M[K,V]] | |
required: shapeless.Typeable[Set[String]] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
<console>:11: materializing requested scala.reflect.type.ClassTag[Set[_]] using `package`.this.materializeClassTag[Set[_]]() | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
<console>:11: shapeless.this.Typeable.genMapTypeable is not a valid implicit value for shapeless.Typeable[String] because: | |
hasMatchingSymbol reported error: polymorphic expression cannot be instantiated to expected type; | |
found : [M[X, Y], K, V]shapeless.Typeable[M[K,V]] | |
required: shapeless.Typeable[String] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
<console>:11: shapeless.this.Typeable.genTraversableTypeable is not a valid implicit value for shapeless.Typeable[String] because: | |
hasMatchingSymbol reported error: polymorphic expression cannot be instantiated to expected type; | |
found : [CC[X] <: scala.collection.GenTraversable[X], T]shapeless.Typeable[CC[T]] | |
required: shapeless.Typeable[String] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
res0: Option[Set[String]] = Some(Set(foo, bar, baz)) | |
scala> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Project B depends on Project A and others projects | |
Welcome to Scala version 2.10.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_66). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import shapeless.syntax.typeable._ | |
import shapeless.syntax.typeable._ | |
import shapeless.syntax.typeable._ | |
scala> | |
scala> (Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
<console>:11: shapeless.this.Typeable.genMapTypeable is not a valid implicit value for shapeless.Typeable[Set[String]] because: | |
hasMatchingSymbol reported error: polymorphic expression cannot be instantiated to expected type; | |
found : [M[X, Y], K, V]shapeless.Typeable[M[K,V]] | |
required: shapeless.Typeable[Set[String]] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
<console>:11: materializing requested scala.reflect.type.ClassTag[Set[_]] using `package`.this.materializeClassTag[Set[_]]() | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
<console>:11: shapeless.this.Typeable.genMapTypeable is not a valid implicit value for shapeless.Typeable[String] because: | |
hasMatchingSymbol reported error: polymorphic expression cannot be instantiated to expected type; | |
found : [M[X, Y], K, V]shapeless.Typeable[M[K,V]] | |
required: shapeless.Typeable[String] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
<console>:11: shapeless.this.Typeable.genTraversableTypeable is not a valid implicit value for shapeless.Typeable[String] because: | |
hasMatchingSymbol reported error: polymorphic expression cannot be instantiated to expected type; | |
found : [CC[X] <: scala.collection.GenTraversable[X], T]shapeless.Typeable[CC[T]] | |
required: shapeless.Typeable[String] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
<console>:11: shapeless.this.Lazy.apply is not a valid implicit value for (=> shapeless.Lazy[shapeless.Typeable[String]]) => shapeless.Lazy[Nothing] because: | |
type mismatch; | |
found : shapeless.Lazy[shapeless.Typeable[String]] | |
required: Nothing | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
<console>:11: shapeless.this.Lazy.mkLazy is not a valid implicit value for shapeless.Lazy[shapeless.Typeable[String]] because: | |
hasMatchingSymbol reported error: type mismatch; | |
found : shapeless.Lazy[shapeless.Typeable[String]] | |
required: shapeless.Lazy[Nothing] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
<console>:11: shapeless.this.Typeable.genTraversableTypeable is not a valid implicit value for shapeless.Typeable[Set[String]] because: | |
hasMatchingSymbol reported error: could not find implicit value for parameter castT: shapeless.Lazy[shapeless.Typeable[String]] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
<console>:11: shapeless.this.Typeable.dfltTypeable is not a valid implicit value for shapeless.Typeable[Set[String]] because: | |
No default Typeable for parametrized type Set[String] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
<console>:11: error: could not find implicit value for parameter castU: shapeless.Typeable[Set[String]] | |
(Set("foo", "bar", "baz"): Any).cast[Set[String]] | |
^ | |
scala> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment