Skip to content

Instantly share code, notes, and snippets.

@ilya-murzinov
Created April 28, 2018 20:19
Show Gist options
  • Save ilya-murzinov/8c2fc8d513365331b468b0776cc82949 to your computer and use it in GitHub Desktop.
Save ilya-murzinov/8c2fc8d513365331b468b0776cc82949 to your computer and use it in GitHub Desktop.
import cats.data.Reader
import cats.syntax.applicative._
type MyReader[A] = Reader[String, A]
false.pure[MyReader]
// reader.scala:5: ambiguous implicit values:
// both method catsDataCommutativeMonadForKleisli in class KleisliInstances of type [F[_], A](implicit F0: cats.CommutativeMonad[F])cats.CommutativeMonad[[γ$7$]cats.data.Kleisli[F,A,γ$7$]]
// and method catsApplicativeForArrow in object Applicative of type [F[_, _], A](implicit F: cats.arrow.Arrow[F])cats.Applicative[[β$0$]F[A,β$0$]]
// match expected type cats.Applicative[ammonite.$file.experiments.reader.MyReader]
// val res_4 = false.pure[MyReader]
// ^
// Compilation Failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment