Skip to content

Instantly share code, notes, and snippets.

@mandubian
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mandubian/55f8b1fb9f9bec2c0a99 to your computer and use it in GitHub Desktop.
Save mandubian/55f8b1fb9f9bec2c0a99 to your computer and use it in GitHub Desktop.
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