scalaz / ioeffect

An effect monad for Scalaz 7.2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IO.fromFuture

fommil opened this issue · comments

commented

when integrating with existing code, having the ability to create a Task from some Future thing is essential.

But we don't seem to have anything like this... can we please add this?

I'm trying to migrate my work codebase to scalaz.ioeffect from cats-effect right now, so if there are any snippets that I can use as a workaround please do let me know.

note that cats has fromFuture[A](iofa: IO[Future[A]]): IO[A] = ...

which allows deciding if the future begins now or delayed.

I'm breaking my CoC to take care of this because @fommil called me out directly about already having the code. I want you to know I feel dirty because of this, and I'm taking a long shower when I'm done 😂