Skip to content

Instantly share code, notes, and snippets.

@ChristopherDavenport
Last active September 30, 2021 08:00
Show Gist options
  • Select an option

  • Save ChristopherDavenport/acd69efbed3b7b0dc3bf479a7bebc702 to your computer and use it in GitHub Desktop.

Select an option

Save ChristopherDavenport/acd69efbed3b7b0dc3bf479a7bebc702 to your computer and use it in GitHub Desktop.
Ammonite Shell Baseline
interp.configureCompiler(_.settings.Ydelambdafy.tryToSetColon(List("inline")))
import $plugin.$ivy.`org.typelevel::kind-projector:0.10.3`
import $plugin.$ivy.`com.olegpy::better-monadic-for:0.3.1`
import $ivy.`io.circe::circe-generic:0.13.0-RC1`
import $ivy.`org.http4s::http4s-circe:0.21.0-RC2`
import $ivy.`org.http4s::http4s-dsl:0.21.0-RC2`
import $ivy.`org.http4s::http4s-ember-client:0.21.0-RC2`
import cats._, cats.data._, cats.effect._, cats.implicits._, cats.effect.concurrent._, cats.effect.implicits._, fs2._, org.http4s._, org.http4s.implicits._, scala.concurrent.duration._
implicit val CS = IO.contextShift(scala.concurrent.ExecutionContext.global)
implicit val T = IO.timer(scala.concurrent.ExecutionContext.global)
val (ammClient, clientShutdown) = _root_.org.http4s.ember.client.EmberClientBuilder.default[IO].build.allocated.unsafeRunSync
interp.beforeExitHooks += {_ => clientShutdown.unsafeRunSync}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment