one of the side-effects of the "witness" system is...
# arrow
j
one of the side-effects of the "witness" system is that defining an instance of a nested typeclass seems quite tricky. am I missing something that simplifies it? i.e. if I have a classic cons list
Copy code
@higherkind
sealed class L<A> : LOf<A> {
    class Empty<A> : L<A>()
    data class Cons<A>(val head: A, val tail: L<A>) : L<A>()
    companion object
}
and want to define a show instance for it that will use the show instance for A to print it