scalaz / ioeffect

An effect monad for Scalaz 7.2
Other
55 stars 9 forks source link

IO.fromFuture #44

Closed fommil closed 6 years ago

fommil commented 6 years ago

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.

emilypi commented 6 years ago

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 😂