Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosen type restrictions on liftIO #213

Closed
paulpdaniels opened this issue Sep 16, 2019 · 0 comments · Fixed by #215
Closed

Loosen type restrictions on liftIO #213

paulpdaniels opened this issue Sep 16, 2019 · 0 comments · Fixed by #215

Comments

@paulpdaniels
Copy link
Contributor

It seems like the Fetch.liftIO helper is requiring a ConcurrentEffect when liftF only requires a Concurrent. I think the constraint could be loosened to [Concurrent: LiftIO]. Then the call could even become:

def liftIO[F[_]: Concurrent: LiftIO](io: IO[A]): Fetch[F, A] = 
  liftF[F](LiftIO[F].liftIO(io))

The down side of course is that now everywhere needs two type parameters, but it should be non-breaking because everyone already would have needed a ConcurrentEffect in scope anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant