Skip to content

Instantly share code, notes, and snippets.

@puffnfresh
Last active January 4, 2016 00:19
Show Gist options
  • Save puffnfresh/8540756 to your computer and use it in GitHub Desktop.
Save puffnfresh/8540756 to your computer and use it in GitHub Desktop.
Minimised scalac crash.
import scalaz._
import Scalaz._
import scalaz.effect._
object Test {
implicit def eitherTMonadIO[M[_], E](implicit M: MonadIO[M]): MonadIO[({type l[A]=EitherT[M, E, A]})#l] = ???
def x = for {
_ <- true whenM IO.putStrLn("World").liftIO[({type e[A]=EitherT[IO, String, A]})#e]
} yield ()
}
/*
scala> :l Test.scala
Loading Test.scala...
import scalaz._
import Scalaz._
import scalaz.effect._
error: type mismatch;
found : scalaz.EitherT[scalaz.effect.IO,String,Unit]
required: ?M
Note that implicit conversions are not applicable because they are ambiguous:
both method ToBitraverseVFromKleisliLike in trait ToBitraverseOps of type [G[_], F[G[_], _, _], A, B](v: F[G,A,B])(implicit F0: scalaz.Bitraverse[[α, β]F[G,α,β]])scalaz.syntax.BitraverseOps[[α, β]F[G,α,β],A,B]
and method ToArrowVFromKleisliLike in trait ToArrowOps of type [G[_], F[G[_], _, _], A, B](v: F[G,A,B])(implicit F0: scalaz.Arrow[[α, β]F[G,α,β]])scalaz.syntax.ArrowOps[[α, β]F[G,α,β],A,B]
are possible conversion functions from scalaz.EitherT[scalaz.effect.IO,String,Unit] to ?M
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment