eed3si9n / sjson-new

a typeclass based JSON codec that's backend independent
Apache License 2.0
36 stars 19 forks source link

LList's purpose #43

Closed dwijnand closed 7 years ago

dwijnand commented 7 years ago

LList proports itself as a "Heterogeneous list with labels", but if you look at the definition of LCons:

final case class LCons[A1: JsonFormat: ClassManifest, A2 <: LList: JsonFormat](
    name: String, head: A1, tail: A2
) extends LList {
  // ..
}

.. it's defined in terms of types for which there exist JsonFormat instances (and it captures them).

LList should either change its description, and possibly even its name, or it shouldn't capture JsonFormat instances.

dwijnand commented 7 years ago

For a little more context, I discovered this while spending a few seconds too many perplexed, trying to decipher an "implicit not found" error, until I realised it was associated to the :*: on LNil/LCons.

eed3si9n commented 7 years ago

It is heterogeneous list (of serializable stuff) with labels.