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
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 |