github-actions[bot] on gh-pages
deploy: 2969f82e29d1b5fcddbedff… (compare)
armanbilge on custom-update-flake-branch
rossabaker on 0.23
[ci skip] Custom branch for upd… Merge pull request #6498 from h… (compare)
github-actions[bot] on gh-pages
deploy: a64f93143565a52fdb7667c… (compare)
armanbilge on git-blame-ignore-revs
rossabaker on 0.23
[ci skip] Create `.git-blame-ig… [ci skip] add another fmt commit [ci skip] fix wrong comment and 1 more (compare)
armanbilge on git-blame-ignore-revs
[ci skip] fix wrong comment (compare)
armanbilge on git-blame-ignore-revs
[ci skip] add another fmt commit (compare)
234sekjfasdf
or it didn’t happen.
implicitNotFound
does not work (if it fails the implicit search you simply do not trigger the conversion)
def yolo = logMe[IO]("hello")
// scala> yolo.unsafeRunSync
// hello
def well = logMe("hello")
Users/fabio/projects/playground/src/main/scala/Playground.scala:57: Specify `IO` there: `logMe[IO]("hello")`
[error] def well = logMe("hello")
def logMe[F[_]]: Magnet[F] = new Magnet[F]
class Magnet[F[_]]
trait LowPrio {
@annotation.implicitNotFound("""Specify `IO` there: `logMe[IO]("hello")`""")
trait Error
class Catch[F[_]] {
def apply(s: String, logAction: String => F[Unit] = ???)(implicit ev: Error) =
???
}
implicit def conv2[F[_]](m: Magnet[F]): Catch[F] =
new Catch[F]
}
object Magnet extends LowPrio {
implicit def conv[F[_]: Sync](m: Magnet[F]): LogMePartiallyApplied[F] =
new LogMePartiallyApplied[F]
class LogMePartiallyApplied[F[_]: Sync] {
def apply(s: String, logAction: String => F[Unit] = { s =>
Sync[F].delay(println(s))
}) =
logAction(s)
}
}
enjoy
HttpRoutes.of
return org.http4s.package$#HttpRoutes
which is type HttpRoutes[F[_]] = Http[OptionT[F, ?], F]
with Http
being type Http[F[_], G[_]] = Kleisli[F, Request[G], Response[G]]
Request[G]
and Response[G]
with the same effect - but my request is supposed to work with IO and the response should be a stream.
Try(SSLContext.getDefault()).toOption
. The question is whether to log a warning that the default failed.
aws4s
but I'm not convinced that I want to base my api client on their model, and I don't know to what extent the signing can be abstracted out
trait Client takes type parameters
def foo(client: Client[IO]) : IO[String] = ...