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
import org.json4s._ | |
import org.json4s.native.JsonMethods._ | |
import shapeless._ | |
import poly._ | |
import ops.hlist._ | |
import syntax.singleton._ | |
import record._ | |
object Record { | |
def keyAsString[F, V](f: FieldType[F, V])(implicit wk: shapeless.Witness.Aux[F]) = |
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
/* | |
- type mismatch; found : com.tagged.vor.toJSON.type required: ?{def apply(x$1: ? >: | |
A): ?} Note that implicit conversions are not applicable because they are ambiguous: | |
both method inst1 in trait PolyInst of type [A](fn: shapeless.Poly)(implicit cse: | |
fn.ProductCase[shapeless.::[A,shapeless.HNil]])A => cse.Result and macro method apply | |
in object Poly of type (f: Any)shapeless.Poly are possible conversion functions from | |
com.tagged.vor.toJSON.type to ?{def apply(x$1: ? >: A): ?} | |
- Unable to convert expression Expr[Nothing](toJSON) to a polymorphic function | |
value | |
*/ |
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
object ShapelessTest extends App { | |
import shapeless._ | |
import record._ | |
import ops.hlist.ToList | |
import ops.record.{ Keys, Values } | |
import syntax.singleton._ | |
val ps = List( | |
("name" ->> "Mel") :: | |
("age" ->> 90L) :: |
NewerOlder