Skip to content

Instantly share code, notes, and snippets.

trait Instance[TC[_]] {
type Type
def value: Type
def typeclass: TC[Type]
}
object Instance {
implicit def apply[A, TC[_]](a: A)(implicit A: TC[A]): Instance[TC] = new Instance[TC] {
type Type = A
val value = a
val typeclass = A