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

Implicit Dns for IO only #475

Merged
merged 1 commit into from
Mar 22, 2023
Merged

Conversation

armanbilge
Copy link
Contributor

Discord thread: https://discord.com/channels/632277896739946517/839257183782436945/1087761519477014644

tl;dr: The motivation for removing the implicit implementation for generic F[_] is to force tagless final libs to declare all of their constraints (e.g. Dns) instead of deriving them on-the-spot from e.g. Async. Meanwhile, this change will be completely transparent to code written in concrete IO.

Will follow-up with similar changes in FS2 for Files, Network, etc.

ThisBuild / tlBaseVersion := "3.2"
ThisBuild / tlBaseVersion := "3.3"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source-breaking. FS2 will be affected, at least.

Comment on lines -81 to +80
"org.typelevel" %%% "cats-effect-kernel" % "3.4.8",
"org.typelevel" %%% "cats-effect" % "3.4.8",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now depend on Cats Effect core :)

Comment on lines -25 to +28
implicit def forSync[F[_]](implicit F: Sync[F]): Dns[F] = new UnsealedDns[F] {
def forAsync[F[_]: Async]: Dns[F] = forSync // alias for cross-compiling w/ JS

def forSync[F[_]](implicit F: Sync[F]): Dns[F] = new UnsealedDns[F] {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should just make these def impl or something.

@mpilquist mpilquist merged commit 0a8551a into Comcast:main Mar 22, 2023
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 this pull request may close these issues.

2 participants