Skip to content

0.19: turn .transform (on services) into an extension method #1729

@kubukoz

Description

@kubukoz

The rationale is: sometimes you have multiple algebras that you want to combine into one:

val f: Alg1[IO] = ???
val f2: Alg2[IO] = ???

val fCombined: Alg[IO] & Alg2[IO] = new {
  export f.*
  export f2.*
}

For example, when using BSP, you might want to have a single client for BuildServer and ScalaBuildServer. This doesn't work, because both algs have a different signature of def transform: Scala refuses to export it, and it might not even be possible to implement yourself.

If we make it an extension method, or have users call Transformation.of(...) themselves, we can support this usecase - the only problem is that you can't transform such a combined client, but I doubt users of combined algebras will care.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions