Just wanted to jot this idea down, someone feel free to turn it into a PR :) miraculously, this syntax seems to compile/auto-infer in Scastie. LOL, I lied, it was a "miracle". Well, maybe someone can workshop this 😅
abstract class IO[+A]
trait Raise[F[_], E]
trait MyError
type Raises[F[_], E] = [A] => Raise[F, E] ?=> F[A]
type Rtn = IO[String] Raises MyError
The idea is this allows to write:
def foo(bar: Bar): IO[Baz] Raises Qux
instead of
def foo(bar: Bar)(using Raise[IO, Qux]): IO[Baz]
Just wanted to jot this idea down, someone feel free to turn it into a PR :)
miraculously, this syntax seems to compile/auto-infer in Scastie.LOL, I lied, it was a "miracle". Well, maybe someone can workshop this 😅The idea is this allows to write:
instead of