I have a hard time understanding why Request and Response are parameterized in F.
Taking something similar is the cats effect datatype Resource.
From the documentation
https://typelevel.org/cats-effect/docs/std/resource
We find the following definition
object Resource {
def make[F[_], A](acquire: F[A])(release: A => F[Unit]): Resource[F, A]
def eval[F[_], A](fa: F[A]): Resource[F, A]
}
abstract class Resource[F, A] {
def use[B](f: A => F[B]): F[B]
}
in particular
def use[B](f: A => F[B]): F[B]
makes it clear why Resource is parameterized in F.
Given that there nothing in the documentation that explain Response[F] (please note that i understand very well why F[Response], it is the inner F that i don't graps), i looked a bit into the code https://github.com/http4s/http4s/blob/main/core/src/main/scala/org/http4s/Message.scala
unless i have not looked hard enough i could not find anything that justify the presence of the Effect Type.
Can someone explain the inner F parameter.
In a similar fashion as in https://www.haskellforall.com/2013/06/the-resource-applicative.html
A Resource is an IO action which acquires some resource of type a and also returns a finalizer of type IO () that releases the resource. You can think of the a as a Handle, but it can really be anything which can be acquired or released, like a Socket or AMQP Connection.
Can we have a conceptual definition of what is a response and what it does, that indeed require it to be parameterize on a specific effect Type ?