Skip to content

Commit bd253a5

Browse files
Refactor transform method to extension method (#1735)
* Refactor transform method to extension method in companion object and update implicit class name to avoid conflicts * Refactor transform method to extension method in companion object and update implicit class name to avoid conflicts * added final and private * removed extends AnyVal * tried some changes to pass scala 2.12 test * removed implicit * added inline * removing inline * added transformFunctor and transformBifunctor * seperate implicits with added test cases * updated test * back to initial changes * update names and refs * restore state from 0.19 * test for only functor and bifunctor * test for only functor and bifunctor * restore state from 0.19 * removed implicit, modified test cases * fixed tests * Add implicit transformation classes for Functor and Bifunctor in generated services * Refactor implicit transformation classes in Renderer.scala * Add CHANGELOG entry --------- Co-authored-by: Jakub Kozłowski <[email protected]>
1 parent 0d807bc commit bd253a5

36 files changed

+487
-37
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Thank you!
77

88
# 0.19.0
99

10+
## Move `transform` from algebra traits into extension methods
11+
12+
The `transform` method that used to be generated as a `final def` in the service algebras, is now available as an extension method. For Scala 2.12 compatibility, we generate an additional variant for `F[_]`-shaped instances and `F[_, _]`-shaped instances, in addition to the default one with `F[_, _, _, _, _]`. [#1735](https://github.com/disneystreaming/smithy4s/pull/1735/)
13+
1014
## Add OptionalTag
1115

1216
Add `OptionalTag` trait and add the tag to `Schema.OptionSchema` to allow Option-like types to be efficiently created.

modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DynamoDB.scala

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import smithy4s.Schema
55
import smithy4s.Service
66
import smithy4s.ShapeId
77
import smithy4s.Transformation
8+
import smithy4s.kinds.BiFunctorAlgebra
9+
import smithy4s.kinds.FunctorAlgebra
810
import smithy4s.kinds.PolyFunction5
911
import smithy4s.kinds.toPolyFunction5.const5
1012
import smithy4s.schema.ErrorSchema
@@ -50,7 +52,6 @@ trait DynamoDBGen[F[_, _, _, _, _]] {
5052
/** <p>Returns the regional endpoint information.</p> */
5153
def describeEndpoints(): F[DescribeEndpointsRequest, Nothing, DescribeEndpointsResponse, Nothing, Nothing]
5254

53-
final def transform: Transformation.PartiallyApplied[DynamoDBGen[F]] = Transformation.of[DynamoDBGen[F]](this)
5455
}
5556

5657
object DynamoDBGen extends Service.Mixin[DynamoDBGen, DynamoDBOperation] {
@@ -92,6 +93,18 @@ object DynamoDBGen extends Service.Mixin[DynamoDBGen, DynamoDBOperation] {
9293

9394
type ListTablesError = DynamoDBOperation.ListTablesError
9495
val ListTablesError = DynamoDBOperation.ListTablesError
96+
97+
implicit final class TransformFunctorOps[F[_]](private val alg: FunctorAlgebra[DynamoDBGen, F]) extends AnyVal {
98+
def transform: Transformation.PartiallyApplied[FunctorAlgebra[DynamoDBGen, F]] = Transformation.of(alg)
99+
}
100+
101+
implicit final class TransformBifunctorOps[F[_, _]](private val alg: BiFunctorAlgebra[DynamoDBGen, F]) extends AnyVal {
102+
def transform: Transformation.PartiallyApplied[BiFunctorAlgebra[DynamoDBGen, F]] = Transformation.of(alg)
103+
}
104+
105+
implicit final class TransformOps[F[_, _, _, _, _]](private val alg: DynamoDBGen[F]) extends AnyVal {
106+
def transform: Transformation.PartiallyApplied[DynamoDBGen[F]] = Transformation.of(alg)
107+
}
95108
}
96109

97110
sealed trait DynamoDBOperation[Input, Err, Output, StreamedInput, StreamedOutput] {

modules/bootstrapped/src/generated/smithy4s/benchmark/BenchmarkService.scala

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import smithy4s.Schema
66
import smithy4s.Service
77
import smithy4s.ShapeId
88
import smithy4s.Transformation
9+
import smithy4s.kinds.BiFunctorAlgebra
10+
import smithy4s.kinds.FunctorAlgebra
911
import smithy4s.kinds.PolyFunction5
1012
import smithy4s.kinds.toPolyFunction5.const5
1113
import smithy4s.schema.OperationSchema
@@ -19,7 +21,6 @@ trait BenchmarkServiceGen[F[_, _, _, _, _]] {
1921
/** HTTP POST /complex/{bucketName}/{key} */
2022
def createObject(key: String, bucketName: String, payload: S3Object): F[CreateObjectInput, Nothing, Unit, Nothing, Nothing]
2123

22-
final def transform: Transformation.PartiallyApplied[BenchmarkServiceGen[F]] = Transformation.of[BenchmarkServiceGen[F]](this)
2324
}
2425

2526
object BenchmarkServiceGen extends Service.Mixin[BenchmarkServiceGen, BenchmarkServiceOperation] {
@@ -53,6 +54,18 @@ object BenchmarkServiceGen extends Service.Mixin[BenchmarkServiceGen, BenchmarkS
5354
def fromPolyFunction[P[_, _, _, _, _]](f: PolyFunction5[BenchmarkServiceOperation, P]): BenchmarkServiceGen[P] = new BenchmarkServiceOperation.Transformed(reified, f)
5455
def toPolyFunction[P[_, _, _, _, _]](impl: BenchmarkServiceGen[P]): PolyFunction5[BenchmarkServiceOperation, P] = BenchmarkServiceOperation.toPolyFunction(impl)
5556

57+
58+
implicit final class TransformFunctorOps[F[_]](private val alg: FunctorAlgebra[BenchmarkServiceGen, F]) extends AnyVal {
59+
def transform: Transformation.PartiallyApplied[FunctorAlgebra[BenchmarkServiceGen, F]] = Transformation.of(alg)
60+
}
61+
62+
implicit final class TransformBifunctorOps[F[_, _]](private val alg: BiFunctorAlgebra[BenchmarkServiceGen, F]) extends AnyVal {
63+
def transform: Transformation.PartiallyApplied[BiFunctorAlgebra[BenchmarkServiceGen, F]] = Transformation.of(alg)
64+
}
65+
66+
implicit final class TransformOps[F[_, _, _, _, _]](private val alg: BenchmarkServiceGen[F]) extends AnyVal {
67+
def transform: Transformation.PartiallyApplied[BenchmarkServiceGen[F]] = Transformation.of(alg)
68+
}
5669
}
5770

5871
sealed trait BenchmarkServiceOperation[Input, Err, Output, StreamedInput, StreamedOutput] {

modules/bootstrapped/src/generated/smithy4s/example/BrandService.scala

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import smithy4s.Schema
66
import smithy4s.Service
77
import smithy4s.ShapeId
88
import smithy4s.Transformation
9+
import smithy4s.kinds.BiFunctorAlgebra
10+
import smithy4s.kinds.FunctorAlgebra
911
import smithy4s.kinds.PolyFunction5
1012
import smithy4s.kinds.toPolyFunction5.const5
1113
import smithy4s.schema.OperationSchema
@@ -17,7 +19,6 @@ trait BrandServiceGen[F[_, _, _, _, _]] {
1719
/** HTTP POST /brands */
1820
def addBrands(brands: Option[List[String]] = None): F[AddBrandsInput, Nothing, Unit, Nothing, Nothing]
1921

20-
final def transform: Transformation.PartiallyApplied[BrandServiceGen[F]] = Transformation.of[BrandServiceGen[F]](this)
2122
}
2223

2324
object BrandServiceGen extends Service.Mixin[BrandServiceGen, BrandServiceOperation] {
@@ -48,6 +49,18 @@ object BrandServiceGen extends Service.Mixin[BrandServiceGen, BrandServiceOperat
4849
def fromPolyFunction[P[_, _, _, _, _]](f: PolyFunction5[BrandServiceOperation, P]): BrandServiceGen[P] = new BrandServiceOperation.Transformed(reified, f)
4950
def toPolyFunction[P[_, _, _, _, _]](impl: BrandServiceGen[P]): PolyFunction5[BrandServiceOperation, P] = BrandServiceOperation.toPolyFunction(impl)
5051

52+
53+
implicit final class TransformFunctorOps[F[_]](private val alg: FunctorAlgebra[BrandServiceGen, F]) extends AnyVal {
54+
def transform: Transformation.PartiallyApplied[FunctorAlgebra[BrandServiceGen, F]] = Transformation.of(alg)
55+
}
56+
57+
implicit final class TransformBifunctorOps[F[_, _]](private val alg: BiFunctorAlgebra[BrandServiceGen, F]) extends AnyVal {
58+
def transform: Transformation.PartiallyApplied[BiFunctorAlgebra[BrandServiceGen, F]] = Transformation.of(alg)
59+
}
60+
61+
implicit final class TransformOps[F[_, _, _, _, _]](private val alg: BrandServiceGen[F]) extends AnyVal {
62+
def transform: Transformation.PartiallyApplied[BrandServiceGen[F]] = Transformation.of(alg)
63+
}
5164
}
5265

5366
sealed trait BrandServiceOperation[Input, Err, Output, StreamedInput, StreamedOutput] {

modules/bootstrapped/src/generated/smithy4s/example/DeprecatedService.scala

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import smithy4s.Schema
66
import smithy4s.Service
77
import smithy4s.ShapeId
88
import smithy4s.Transformation
9+
import smithy4s.kinds.BiFunctorAlgebra
10+
import smithy4s.kinds.FunctorAlgebra
911
import smithy4s.kinds.PolyFunction5
1012
import smithy4s.kinds.toPolyFunction5.const5
1113
import smithy4s.schema.OperationSchema
@@ -18,7 +20,6 @@ trait DeprecatedServiceGen[F[_, _, _, _, _]] {
1820
@deprecated(message = "N/A", since = "N/A")
1921
def deprecatedOperation(): F[Unit, Nothing, Unit, Nothing, Nothing]
2022

21-
final def transform: Transformation.PartiallyApplied[DeprecatedServiceGen[F]] = Transformation.of[DeprecatedServiceGen[F]](this)
2223
}
2324

2425
object DeprecatedServiceGen extends Service.Mixin[DeprecatedServiceGen, DeprecatedServiceOperation] {
@@ -51,6 +52,18 @@ object DeprecatedServiceGen extends Service.Mixin[DeprecatedServiceGen, Deprecat
5152
def fromPolyFunction[P[_, _, _, _, _]](f: PolyFunction5[DeprecatedServiceOperation, P]): DeprecatedServiceGen[P] = new DeprecatedServiceOperation.Transformed(reified, f)
5253
def toPolyFunction[P[_, _, _, _, _]](impl: DeprecatedServiceGen[P]): PolyFunction5[DeprecatedServiceOperation, P] = DeprecatedServiceOperation.toPolyFunction(impl)
5354

55+
56+
implicit final class TransformFunctorOps[F[_]](private val alg: FunctorAlgebra[DeprecatedServiceGen, F]) extends AnyVal {
57+
def transform: Transformation.PartiallyApplied[FunctorAlgebra[DeprecatedServiceGen, F]] = Transformation.of(alg)
58+
}
59+
60+
implicit final class TransformBifunctorOps[F[_, _]](private val alg: BiFunctorAlgebra[DeprecatedServiceGen, F]) extends AnyVal {
61+
def transform: Transformation.PartiallyApplied[BiFunctorAlgebra[DeprecatedServiceGen, F]] = Transformation.of(alg)
62+
}
63+
64+
implicit final class TransformOps[F[_, _, _, _, _]](private val alg: DeprecatedServiceGen[F]) extends AnyVal {
65+
def transform: Transformation.PartiallyApplied[DeprecatedServiceGen[F]] = Transformation.of(alg)
66+
}
5467
}
5568

5669
sealed trait DeprecatedServiceOperation[Input, Err, Output, StreamedInput, StreamedOutput] {

modules/bootstrapped/src/generated/smithy4s/example/DiscriminatedService.scala

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import smithy4s.Schema
66
import smithy4s.Service
77
import smithy4s.ShapeId
88
import smithy4s.Transformation
9+
import smithy4s.kinds.BiFunctorAlgebra
10+
import smithy4s.kinds.FunctorAlgebra
911
import smithy4s.kinds.PolyFunction5
1012
import smithy4s.kinds.toPolyFunction5.const5
1113
import smithy4s.schema.OperationSchema
@@ -16,7 +18,6 @@ trait DiscriminatedServiceGen[F[_, _, _, _, _]] {
1618
/** HTTP GET /test/{key} */
1719
def testDiscriminated(key: String): F[TestDiscriminatedInput, Nothing, TestDiscriminatedOutput, Nothing, Nothing]
1820

19-
final def transform: Transformation.PartiallyApplied[DiscriminatedServiceGen[F]] = Transformation.of[DiscriminatedServiceGen[F]](this)
2021
}
2122

2223
object DiscriminatedServiceGen extends Service.Mixin[DiscriminatedServiceGen, DiscriminatedServiceOperation] {
@@ -49,6 +50,18 @@ object DiscriminatedServiceGen extends Service.Mixin[DiscriminatedServiceGen, Di
4950
def fromPolyFunction[P[_, _, _, _, _]](f: PolyFunction5[DiscriminatedServiceOperation, P]): DiscriminatedServiceGen[P] = new DiscriminatedServiceOperation.Transformed(reified, f)
5051
def toPolyFunction[P[_, _, _, _, _]](impl: DiscriminatedServiceGen[P]): PolyFunction5[DiscriminatedServiceOperation, P] = DiscriminatedServiceOperation.toPolyFunction(impl)
5152

53+
54+
implicit final class TransformFunctorOps[F[_]](private val alg: FunctorAlgebra[DiscriminatedServiceGen, F]) extends AnyVal {
55+
def transform: Transformation.PartiallyApplied[FunctorAlgebra[DiscriminatedServiceGen, F]] = Transformation.of(alg)
56+
}
57+
58+
implicit final class TransformBifunctorOps[F[_, _]](private val alg: BiFunctorAlgebra[DiscriminatedServiceGen, F]) extends AnyVal {
59+
def transform: Transformation.PartiallyApplied[BiFunctorAlgebra[DiscriminatedServiceGen, F]] = Transformation.of(alg)
60+
}
61+
62+
implicit final class TransformOps[F[_, _, _, _, _]](private val alg: DiscriminatedServiceGen[F]) extends AnyVal {
63+
def transform: Transformation.PartiallyApplied[DiscriminatedServiceGen[F]] = Transformation.of(alg)
64+
}
5265
}
5366

5467
sealed trait DiscriminatedServiceOperation[Input, Err, Output, StreamedInput, StreamedOutput] {

modules/bootstrapped/src/generated/smithy4s/example/DummyService.scala

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import smithy4s.Schema
66
import smithy4s.Service
77
import smithy4s.ShapeId
88
import smithy4s.Transformation
9+
import smithy4s.kinds.BiFunctorAlgebra
10+
import smithy4s.kinds.FunctorAlgebra
911
import smithy4s.kinds.PolyFunction5
1012
import smithy4s.kinds.toPolyFunction5.const5
1113
import smithy4s.schema.OperationSchema
@@ -25,7 +27,6 @@ trait DummyServiceGen[F[_, _, _, _, _]] {
2527
/** HTTP POST /dummy */
2628
def dummyHostPrefix(label1: String, label2: String, label3: HostLabelEnum): F[HostLabelInput, Nothing, Unit, Nothing, Nothing]
2729

28-
final def transform: Transformation.PartiallyApplied[DummyServiceGen[F]] = Transformation.of[DummyServiceGen[F]](this)
2930
}
3031

3132
object DummyServiceGen extends Service.Mixin[DummyServiceGen, DummyServiceOperation] {
@@ -60,6 +61,18 @@ object DummyServiceGen extends Service.Mixin[DummyServiceGen, DummyServiceOperat
6061
def fromPolyFunction[P[_, _, _, _, _]](f: PolyFunction5[DummyServiceOperation, P]): DummyServiceGen[P] = new DummyServiceOperation.Transformed(reified, f)
6162
def toPolyFunction[P[_, _, _, _, _]](impl: DummyServiceGen[P]): PolyFunction5[DummyServiceOperation, P] = DummyServiceOperation.toPolyFunction(impl)
6263

64+
65+
implicit final class TransformFunctorOps[F[_]](private val alg: FunctorAlgebra[DummyServiceGen, F]) extends AnyVal {
66+
def transform: Transformation.PartiallyApplied[FunctorAlgebra[DummyServiceGen, F]] = Transformation.of(alg)
67+
}
68+
69+
implicit final class TransformBifunctorOps[F[_, _]](private val alg: BiFunctorAlgebra[DummyServiceGen, F]) extends AnyVal {
70+
def transform: Transformation.PartiallyApplied[BiFunctorAlgebra[DummyServiceGen, F]] = Transformation.of(alg)
71+
}
72+
73+
implicit final class TransformOps[F[_, _, _, _, _]](private val alg: DummyServiceGen[F]) extends AnyVal {
74+
def transform: Transformation.PartiallyApplied[DummyServiceGen[F]] = Transformation.of(alg)
75+
}
6376
}
6477

6578
sealed trait DummyServiceOperation[Input, Err, Output, StreamedInput, StreamedOutput] {

modules/bootstrapped/src/generated/smithy4s/example/EmptyService.scala

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ import smithy4s.Hints
55
import smithy4s.Service
66
import smithy4s.ShapeId
77
import smithy4s.Transformation
8+
import smithy4s.kinds.BiFunctorAlgebra
9+
import smithy4s.kinds.FunctorAlgebra
810
import smithy4s.kinds.PolyFunction5
911
import smithy4s.kinds.toPolyFunction5.const5
1012

1113
trait EmptyServiceGen[F[_, _, _, _, _]] {
1214
self =>
1315

1416

15-
final def transform: Transformation.PartiallyApplied[EmptyServiceGen[F]] = Transformation.of[EmptyServiceGen[F]](this)
1617
}
1718

1819
object EmptyServiceGen extends Service.Mixin[EmptyServiceGen, EmptyServiceOperation] {
@@ -41,6 +42,18 @@ object EmptyServiceGen extends Service.Mixin[EmptyServiceGen, EmptyServiceOperat
4142
def fromPolyFunction[P[_, _, _, _, _]](f: PolyFunction5[EmptyServiceOperation, P]): EmptyServiceGen[P] = new EmptyServiceOperation.Transformed(reified, f)
4243
def toPolyFunction[P[_, _, _, _, _]](impl: EmptyServiceGen[P]): PolyFunction5[EmptyServiceOperation, P] = EmptyServiceOperation.toPolyFunction(impl)
4344

45+
46+
implicit final class TransformFunctorOps[F[_]](private val alg: FunctorAlgebra[EmptyServiceGen, F]) extends AnyVal {
47+
def transform: Transformation.PartiallyApplied[FunctorAlgebra[EmptyServiceGen, F]] = Transformation.of(alg)
48+
}
49+
50+
implicit final class TransformBifunctorOps[F[_, _]](private val alg: BiFunctorAlgebra[EmptyServiceGen, F]) extends AnyVal {
51+
def transform: Transformation.PartiallyApplied[BiFunctorAlgebra[EmptyServiceGen, F]] = Transformation.of(alg)
52+
}
53+
54+
implicit final class TransformOps[F[_, _, _, _, _]](private val alg: EmptyServiceGen[F]) extends AnyVal {
55+
def transform: Transformation.PartiallyApplied[EmptyServiceGen[F]] = Transformation.of(alg)
56+
}
4457
}
4558

4659
sealed trait EmptyServiceOperation[Input, Err, Output, StreamedInput, StreamedOutput] {

modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingService.scala

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import smithy4s.Schema
66
import smithy4s.Service
77
import smithy4s.ShapeId
88
import smithy4s.Transformation
9+
import smithy4s.kinds.BiFunctorAlgebra
10+
import smithy4s.kinds.FunctorAlgebra
911
import smithy4s.kinds.PolyFunction5
1012
import smithy4s.kinds.toPolyFunction5.const5
1113
import smithy4s.schema.ErrorSchema
@@ -18,7 +20,6 @@ trait ErrorHandlingServiceGen[F[_, _, _, _, _]] {
1820

1921
def errorHandlingOperation(in: Option[String] = None): F[ErrorHandlingOperationInput, ErrorHandlingServiceOperation.ErrorHandlingOperationError, ErrorHandlingOperationOutput, Nothing, Nothing]
2022

21-
final def transform: Transformation.PartiallyApplied[ErrorHandlingServiceGen[F]] = Transformation.of[ErrorHandlingServiceGen[F]](this)
2223
}
2324

2425
object ErrorHandlingServiceGen extends Service.Mixin[ErrorHandlingServiceGen, ErrorHandlingServiceOperation] {
@@ -51,6 +52,18 @@ object ErrorHandlingServiceGen extends Service.Mixin[ErrorHandlingServiceGen, Er
5152

5253
type ErrorHandlingOperationError = ErrorHandlingServiceOperation.ErrorHandlingOperationError
5354
val ErrorHandlingOperationError = ErrorHandlingServiceOperation.ErrorHandlingOperationError
55+
56+
implicit final class TransformFunctorOps[F[_]](private val alg: FunctorAlgebra[ErrorHandlingServiceGen, F]) extends AnyVal {
57+
def transform: Transformation.PartiallyApplied[FunctorAlgebra[ErrorHandlingServiceGen, F]] = Transformation.of(alg)
58+
}
59+
60+
implicit final class TransformBifunctorOps[F[_, _]](private val alg: BiFunctorAlgebra[ErrorHandlingServiceGen, F]) extends AnyVal {
61+
def transform: Transformation.PartiallyApplied[BiFunctorAlgebra[ErrorHandlingServiceGen, F]] = Transformation.of(alg)
62+
}
63+
64+
implicit final class TransformOps[F[_, _, _, _, _]](private val alg: ErrorHandlingServiceGen[F]) extends AnyVal {
65+
def transform: Transformation.PartiallyApplied[ErrorHandlingServiceGen[F]] = Transformation.of(alg)
66+
}
5467
}
5568

5669
sealed trait ErrorHandlingServiceOperation[Input, Err, Output, StreamedInput, StreamedOutput] {

modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingServiceExtraErrors.scala

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import smithy4s.Schema
66
import smithy4s.Service
77
import smithy4s.ShapeId
88
import smithy4s.Transformation
9+
import smithy4s.kinds.BiFunctorAlgebra
10+
import smithy4s.kinds.FunctorAlgebra
911
import smithy4s.kinds.PolyFunction5
1012
import smithy4s.kinds.toPolyFunction5.const5
1113
import smithy4s.schema.ErrorSchema
@@ -19,7 +21,6 @@ trait ErrorHandlingServiceExtraErrorsGen[F[_, _, _, _, _]] {
1921

2022
def extraErrorOperation(in: Option[String] = None): F[ExtraErrorOperationInput, ErrorHandlingServiceExtraErrorsOperation.ExtraErrorOperationError, Unit, Nothing, Nothing]
2123

22-
final def transform: Transformation.PartiallyApplied[ErrorHandlingServiceExtraErrorsGen[F]] = Transformation.of[ErrorHandlingServiceExtraErrorsGen[F]](this)
2324
}
2425

2526
object ErrorHandlingServiceExtraErrorsGen extends Service.Mixin[ErrorHandlingServiceExtraErrorsGen, ErrorHandlingServiceExtraErrorsOperation] {
@@ -52,6 +53,18 @@ object ErrorHandlingServiceExtraErrorsGen extends Service.Mixin[ErrorHandlingSer
5253

5354
type ExtraErrorOperationError = ErrorHandlingServiceExtraErrorsOperation.ExtraErrorOperationError
5455
val ExtraErrorOperationError = ErrorHandlingServiceExtraErrorsOperation.ExtraErrorOperationError
56+
57+
implicit final class TransformFunctorOps[F[_]](private val alg: FunctorAlgebra[ErrorHandlingServiceExtraErrorsGen, F]) extends AnyVal {
58+
def transform: Transformation.PartiallyApplied[FunctorAlgebra[ErrorHandlingServiceExtraErrorsGen, F]] = Transformation.of(alg)
59+
}
60+
61+
implicit final class TransformBifunctorOps[F[_, _]](private val alg: BiFunctorAlgebra[ErrorHandlingServiceExtraErrorsGen, F]) extends AnyVal {
62+
def transform: Transformation.PartiallyApplied[BiFunctorAlgebra[ErrorHandlingServiceExtraErrorsGen, F]] = Transformation.of(alg)
63+
}
64+
65+
implicit final class TransformOps[F[_, _, _, _, _]](private val alg: ErrorHandlingServiceExtraErrorsGen[F]) extends AnyVal {
66+
def transform: Transformation.PartiallyApplied[ErrorHandlingServiceExtraErrorsGen[F]] = Transformation.of(alg)
67+
}
5568
}
5669

5770
sealed trait ErrorHandlingServiceExtraErrorsOperation[Input, Err, Output, StreamedInput, StreamedOutput] {

0 commit comments

Comments
 (0)