scala - Mapping over HList raises AbstractMethodError -


i trying shapeless example in repl , getting runtime error:

scala> import shapeless._ import shapeless._  scala> import shapeless.poly._ import shapeless.poly._  scala> object choose extends (set ~> option) {      |   def apply[t](set: set[t]) = set.headoption      | } defined object choose  scala> val sets = set(1) :: set(0) :: hnil sets: shapeless.::[scala.collection.immutable.set[int],shapeless.::[scala.collection.immutable.set[int],shapeless.hnil]] = set(1) :: set(0) :: hnil  scala> sets map choose java.lang.abstractmethoderror: choose$.caseuniv()lshapeless/polydefns$case;   ... 42 elided 

do know why doesn't work , how fix ?


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -