Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
multi-layer implicit + type lambdas
scala> implicitly[MonadPlus[({ type m[A] = ListT[({ type l[B] = OptionT[Future, B] })#l, A] })#m]]
<console>:23: scalaz.this.ListT.listTMonadPlus is not a valid implicit value for scalaz.MonadPlus[[A]scalaz.ListT[[B]scalaz.OptionT[scala.concurrent.Future,B],A]] because:
hasMatchingSymbol reported error: polymorphic expression cannot be instantiated to expected type;
found : [F[_]]scalaz.MonadPlus[[α]scalaz.ListT[F,α]]
required: scalaz.MonadPlus[[A]scalaz.ListT[[B]scalaz.OptionT[scala.concurrent.Future,B],A]]
implicitly[MonadPlus[({ type m[A] = ListT[({ type l[B] = OptionT[Future, B] })#l, A] })#m]]
^
<console>:23: error: could not find implicit value for parameter e: scalaz.MonadPlus[[A]scalaz.ListT[[B]scalaz.OptionT[scala.concurrent.Future,B],A]]
implicitly[MonadPlus[({ type m[A] = ListT[({ type l[B] = OptionT[Future, B] })#l, A] })#m]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment