Skip to content

Commit

Permalink
SIP-64 - Improve Syntax for Context Bounds and Givens
Browse files Browse the repository at this point in the history
  • Loading branch information
mio-19 committed Jan 17, 2025
1 parent 939f291 commit e29dd50
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions utils/shared/src/main/scala/chester/utils/io/IO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ trait IO[F[_]] {
case class CommandOutput(exitCode: Option[Int])

object Runner {
inline def pure[F[_], A](inline x: A)(using inline runner: Runner[F]): F[A] =
inline def pure[F[_]: Runner as runner, A](inline x: A): F[A] =
runner.pure(x)

inline def doTry[F[_], T](inline IO: F[T])(using
inline runner: Runner[F]
): F[Try[T]] = runner.doTry(IO)
inline def doTry[F[_]: Runner as runner, T](inline IO: F[T]): F[Try[T]] =
runner.doTry(IO)

}

Expand Down

0 comments on commit e29dd50

Please sign in to comment.