Guest User

Untitled

a guest
Mar 17th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. package effproblem
  2.  
  3. import org.atnos.eff.addon.scalaz.concurrent.TimedTask
  4. import org.atnos.eff.syntax.addon.scalaz.eff._
  5. import org.atnos.eff.syntax.addon.scalaz.either._
  6. import org.atnos.eff.syntax.addon.scalaz.task._
  7. import org.atnos.eff.{Fx, ExecutorServices}
  8.  
  9. object Test {
  10. sealed trait T1
  11. sealed trait T2
  12. sealed trait T3
  13. sealed trait T4
  14.  
  15. //This one reproduces the error: No instance found for Member[[β$0$]scala.util.Either[E,β$0$],
  16. //effproblem.Test.S1]
  17. type S1 = Fx.append[
  18. Fx.fx4[
  19. Either[T1, ?],
  20. Either[T2, ?],
  21. Either[T3, ?],
  22. Either[T4, ?],
  23. ],
  24. Fx.fx1[TimedTask]
  25. ]
  26.  
  27. type S2 = Fx.fx5[
  28. Either[T1, ?],
  29. Either[T2, ?],
  30. Either[T3, ?],
  31. Either[T4, ?],
  32. TimedTask
  33. ]
  34.  
  35. implicit lazy val ec = ExecutorServices.fromGlobalExecutionContext
  36.  
  37. ()
  38. .pureEff[S1]
  39. .runDisjunction
  40. .runDisjunction
  41. .runDisjunction
  42. .runDisjunction
  43. .runAsync
  44. }
Add Comment
Please, Sign In to add comment