-
Notifications
You must be signed in to change notification settings - Fork 559
Closed
Description
Resource
implements Async
, but does so in a purely "typeclassy" way. If you want to do something like rsrc.start
(where rsrc: Resource[F, A]
), you actually need to import cats.effect.syntax.all._
! This isn't a great experience.
Instead, we should flip all of this around and follow the same pattern IO
does: move the definitions of these methods to Resource
itself as members (taking the appropriate implicit evidence for F
individually), and then change the typeclass implementations to simply forward the call onto the appropriate member function. This is actually a pretty easy change, just a little tedious and time-consuming. It should help with the ergonomics quite considerably though.
matil019