Category "zio"

Type inference in ZIO giving Any in for comprehension

So I have written a method to count the number of lines in a file in ZIO. def lines(file: String): Task[Long] = { def countLines(reader: BufferedReader): Ta

How do you connect your business services with zio-http (ZIO 2.x) routes?

I can't manage to connect zio-http with my backend services, defined as ZLayers. The examples I found just show how to expose HTTP endpoints such as: import zio

How to elegantly perform multiple effects in parallel with ZIO

I know that I can use import zio.Task def zip3Par[A, B, C](a: Task[A], b: Task[B], c: Task[C]): Task[(A, B, C)] = a.zipPar(b).zipWithPar(c) { case ((a, b),

getStrLn in ZIO working with flatMap but not inside for comprehension

val askNameFlatMap: ZIO[Console, IOException, Unit] = putStrLn("What is your Name? ") *> getStrLn.flatMap(name => putStrLn(s"Hello $name")) val askNa