Last active
March 29, 2019 15:55
-
-
Save milessabin/f808aead2b67b56fd733b2d6e8b7a2ca to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Utils { | |
type Id[t] = t | |
type Const[c] = [t] => c | |
} | |
import Utils._ | |
class Instances[F[_[_]], T[_]] | |
trait Functor[F[_]] | |
object Functor { | |
implicit val functorId: Functor[Id] = ??? | |
implicit def functorGen[F[_]](implicit inst: Instances[Functor, F]): Functor[F] = ??? | |
implicit def functorConst[T]: Functor[Const[T]] = ??? | |
} | |
case class Sm[A](value: A) | |
object Sm { | |
implicit def smInstances[F[_[_]]]: Instances[F, Sm] = ??? | |
} | |
object Test { | |
implicitly[Functor[Sm]] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment