Created
January 17, 2017 15:29
-
-
Save b-studios/5ddd3a840b52fb52d0aeb9823d5fa62c to your computer and use it in GitHub Desktop.
Typeconstructor equivalence
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
object tc { | |
sealed trait =::=[F[_], G[_]] { | |
def apply[A](f: F[A]): G[A] | |
} | |
object =::= { | |
implicit def idFunctors[F[_]]: F =::= F = new =::=[F, F] { | |
def apply[A](f: F[A]): F[A] = f | |
} | |
} | |
type Id[A] = A | |
type SomeotherId[A] = A | |
implicitly[Id =::= SomeotherId] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment