Skip to content

Instantly share code, notes, and snippets.

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]) =
/*
- 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
*/
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) ::