diff --git a/arrow-libs/core/arrow-core/api/arrow-core.api b/arrow-libs/core/arrow-core/api/arrow-core.api index e8c75137883..7bd1af56b99 100644 --- a/arrow-libs/core/arrow-core/api/arrow-core.api +++ b/arrow-libs/core/arrow-core/api/arrow-core.api @@ -309,12 +309,14 @@ public final class arrow/core/MapKt { public static final fun align (Ljava/util/Map;Ljava/util/Map;Lkotlin/jvm/functions/Function1;)Ljava/util/Map; public static final fun combine (Ljava/util/Map;Ljava/util/Map;Lkotlin/jvm/functions/Function2;)Ljava/util/Map; public static final fun filterOption (Ljava/util/Map;)Ljava/util/Map; - public static final fun flatMap (Ljava/util/Map;Lkotlin/jvm/functions/Function1;)Ljava/util/Map; + public static final fun flatMapValues (Ljava/util/Map;Lkotlin/jvm/functions/Function1;)Ljava/util/Map; public static final fun fold (Ljava/util/Map;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object; public static final fun getOrNone (Ljava/util/Map;Ljava/lang/Object;)Larrow/core/Option; - public static final fun mapNotNull (Ljava/util/Map;Lkotlin/jvm/functions/Function1;)Ljava/util/Map; public static final fun mapOrAccumulate (Ljava/util/Map;Lkotlin/jvm/functions/Function2;)Larrow/core/Either; public static final fun mapOrAccumulate (Ljava/util/Map;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Larrow/core/Either; + public static final fun mapValuesNotNull (Ljava/util/Map;Lkotlin/jvm/functions/Function1;)Ljava/util/Map; + public static final fun mapValuesOrAccumulate (Ljava/util/Map;Lkotlin/jvm/functions/Function2;)Larrow/core/Either; + public static final fun mapValuesOrAccumulate (Ljava/util/Map;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Larrow/core/Either; public static final fun padZip (Ljava/util/Map;Ljava/util/Map;)Ljava/util/Map; public static final fun padZip (Ljava/util/Map;Ljava/util/Map;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;)Ljava/util/Map; public static final fun padZip (Ljava/util/Map;Ljava/util/Map;Lkotlin/jvm/functions/Function3;)Ljava/util/Map; @@ -972,8 +974,10 @@ public class arrow/core/raise/RaiseAccumulate : arrow/core/raise/Raise { public fun invoke (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public fun invoke (Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun mapOrAccumulate (Ljava/lang/Iterable;Lkotlin/jvm/functions/Function2;)Ljava/util/List; + public final fun mapOrAccumulate (Ljava/util/Map;Lkotlin/jvm/functions/Function2;)Ljava/util/List; public final fun mapOrAccumulate-FrVv2gs (Ljava/util/List;Lkotlin/jvm/functions/Function2;)Ljava/util/List; public final fun mapOrAccumulate-nfMsDo0 (Ljava/util/Set;Lkotlin/jvm/functions/Function2;)Ljava/util/Set; + public final fun mapValuesOrAccumulate (Ljava/util/Map;Lkotlin/jvm/functions/Function2;)Ljava/util/Map; public fun raise (Ljava/lang/Object;)Ljava/lang/Void; public final fun raiseErrors ()Ljava/lang/Void; public final fun withNel (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; @@ -1049,6 +1053,8 @@ public final class arrow/core/raise/RaiseKt { public static final fun mapOrAccumulate (Larrow/core/raise/Raise;Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Ljava/util/List; public static final fun mapOrAccumulate--YW8gn4 (Larrow/core/raise/Raise;Ljava/util/Set;Lkotlin/jvm/functions/Function2;)Ljava/util/Set; public static final fun mapOrAccumulate-l8IBlHg (Larrow/core/raise/Raise;Ljava/util/List;Lkotlin/jvm/functions/Function2;)Ljava/util/List; + public static final fun mapValuesOrAccumulate (Larrow/core/raise/Raise;Ljava/util/Map;Lkotlin/jvm/functions/Function2;)Ljava/util/Map; + public static final fun mapValuesOrAccumulate (Larrow/core/raise/Raise;Ljava/util/Map;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Ljava/util/Map; public static final fun merge (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun merge (Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun nullable (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; diff --git a/arrow-libs/core/arrow-core/api/arrow-core.klib.api b/arrow-libs/core/arrow-core/api/arrow-core.klib.api index 4fdc4eff68f..ddf1dd333e5 100644 --- a/arrow-libs/core/arrow-core/api/arrow-core.klib.api +++ b/arrow-libs/core/arrow-core/api/arrow-core.klib.api @@ -471,6 +471,8 @@ open class <#A: kotlin/Any?> arrow.core.raise/RaiseAccumulate : arrow.core.raise final fun ensureOrAccumulate(kotlin/Boolean, kotlin/Function0<#A>) // arrow.core.raise/RaiseAccumulate.ensureOrAccumulate|ensureOrAccumulate(kotlin.Boolean;kotlin.Function0<1:0>){}[0] final fun hasErrors(): kotlin/Boolean // arrow.core.raise/RaiseAccumulate.hasErrors|hasErrors(){}[0] final fun raiseErrors(): kotlin/Nothing // arrow.core.raise/RaiseAccumulate.raiseErrors|raiseErrors(){}[0] + final inline fun <#A1: kotlin/Any?, #B1: kotlin/Any?, #C1: kotlin/Any?> (kotlin.collections/Map<#A1, #B1>).mapOrAccumulate(kotlin/Function2, kotlin.collections/Map.Entry<#A1, #B1>, #C1>): kotlin.collections/List<#C1> // arrow.core.raise/RaiseAccumulate.mapOrAccumulate|mapOrAccumulate@kotlin.collections.Map<0:0,0:1>(kotlin.Function2,kotlin.collections.Map.Entry<0:0,0:1>,0:2>){0§;1§;2§}[0] + final inline fun <#A1: kotlin/Any?, #B1: kotlin/Any?, #C1: kotlin/Any?> (kotlin.collections/Map<#A1, #B1>).mapValuesOrAccumulate(kotlin/Function2, kotlin.collections/Map.Entry<#A1, #B1>, #C1>): kotlin.collections/Map<#A1, #C1> // arrow.core.raise/RaiseAccumulate.mapValuesOrAccumulate|mapValuesOrAccumulate@kotlin.collections.Map<0:0,0:1>(kotlin.Function2,kotlin.collections.Map.Entry<0:0,0:1>,0:2>){0§;1§;2§}[0] final inline fun <#A1: kotlin/Any?, #B1: kotlin/Any?> (arrow.core/NonEmptyList<#A1>).mapOrAccumulate(kotlin/Function2, #A1, #B1>): arrow.core/NonEmptyList<#B1> // arrow.core.raise/RaiseAccumulate.mapOrAccumulate|mapOrAccumulate@arrow.core.NonEmptyList<0:0>(kotlin.Function2,0:0,0:1>){0§;1§}[0] final inline fun <#A1: kotlin/Any?, #B1: kotlin/Any?> (arrow.core/NonEmptySet<#A1>).mapOrAccumulate(kotlin/Function2, #A1, #B1>): arrow.core/NonEmptySet<#B1> // arrow.core.raise/RaiseAccumulate.mapOrAccumulate|mapOrAccumulate@arrow.core.NonEmptySet<0:0>(kotlin.Function2,0:0,0:1>){0§;1§}[0] final inline fun <#A1: kotlin/Any?, #B1: kotlin/Any?> (kotlin.collections/Iterable<#A1>).mapOrAccumulate(kotlin/Function2, #A1, #B1>): kotlin.collections/List<#B1> // arrow.core.raise/RaiseAccumulate.mapOrAccumulate|mapOrAccumulate@kotlin.collections.Iterable<0:0>(kotlin.Function2,0:0,0:1>){0§;1§}[0] @@ -729,8 +731,7 @@ final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core/Either final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core/NonEmptyList<#C>).arrow.core/unzip(kotlin/Function1<#C, kotlin/Pair<#A, #B>>): kotlin/Pair, arrow.core/NonEmptyList<#B>> // arrow.core/unzip|unzip@arrow.core.NonEmptyList<0:2>(kotlin.Function1<0:2,kotlin.Pair<0:0,0:1>>){0§;1§;2§}[0] final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Iterable<#A>).arrow.core/crosswalkMap(kotlin/Function1<#A, kotlin.collections/Map<#B, #C>>): kotlin.collections/Map<#B, kotlin.collections/List<#C>> // arrow.core/crosswalkMap|crosswalkMap@kotlin.collections.Iterable<0:0>(kotlin.Function1<0:0,kotlin.collections.Map<0:1,0:2>>){0§;1§;2§}[0] final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/align(kotlin.collections/Map<#A, #C>): kotlin.collections/Map<#A, arrow.core/Ior<#B, #C>> // arrow.core/align|align@kotlin.collections.Map<0:0,0:1>(kotlin.collections.Map<0:0,0:2>){0§;1§;2§}[0] -final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/flatMap(kotlin/Function1, kotlin.collections/Map<#A, #C>>): kotlin.collections/Map<#A, #C> // arrow.core/flatMap|flatMap@kotlin.collections.Map<0:0,0:1>(kotlin.Function1,kotlin.collections.Map<0:0,0:2>>){0§;1§;2§}[0] -final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/mapNotNull(kotlin/Function1, #C?>): kotlin.collections/Map<#A, #C> // arrow.core/mapNotNull|mapNotNull@kotlin.collections.Map<0:0,0:1>(kotlin.Function1,0:2?>){0§;1§;2§}[0] +final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/flatMapValues(kotlin/Function1, kotlin.collections/Map<#A, #C>>): kotlin.collections/Map<#A, #C> // arrow.core/flatMapValues|flatMapValues@kotlin.collections.Map<0:0,0:1>(kotlin.Function1,kotlin.collections.Map<0:0,0:2>>){0§;1§;2§}[0] final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/padZip(kotlin.collections/Map<#A, #C>): kotlin.collections/Map<#A, kotlin/Pair<#B?, #C?>> // arrow.core/padZip|padZip@kotlin.collections.Map<0:0,0:1>(kotlin.collections.Map<0:0,0:2>){0§;1§;2§}[0] final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/zip(kotlin.collections/Map<#A, #C>): kotlin.collections/Map<#A, kotlin/Pair<#B, #C>> // arrow.core/zip|zip@kotlin.collections.Map<0:0,0:1>(kotlin.collections.Map<0:0,0:2>){0§;1§;2§}[0] final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Map<#A, arrow.core/Ior<#B, #C>>).arrow.core/unalign(): kotlin/Pair, kotlin.collections/Map<#A, #C>> // arrow.core/unalign|unalign@kotlin.collections.Map<0:0,arrow.core.Ior<0:1,0:2>>(){0§;1§;2§}[0] @@ -900,13 +901,17 @@ final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/ final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?, #E: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/zip(kotlin.collections/Map<#A, #C>, kotlin.collections/Map<#A, #D>, kotlin/Function4<#A, #B, #C, #D, #E>): kotlin.collections/Map<#A, #E> // arrow.core/zip|zip@kotlin.collections.Map<0:0,0:1>(kotlin.collections.Map<0:0,0:2>;kotlin.collections.Map<0:0,0:3>;kotlin.Function4<0:0,0:1,0:2,0:3,0:4>){0§;1§;2§;3§;4§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (arrow.core.raise/Raise<#A>).arrow.core.raise/zipOrAccumulate(kotlin/Function2<#A, #A, #A>, kotlin/Function1, #B>, kotlin/Function1, #C>, kotlin/Function2<#B, #C, #D>): #D // arrow.core.raise/zipOrAccumulate|zipOrAccumulate@arrow.core.raise.Raise<0:0>(kotlin.Function2<0:0,0:0,0:0>;kotlin.Function1,0:1>;kotlin.Function1,0:2>;kotlin.Function2<0:1,0:2,0:3>){0§;1§;2§;3§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (arrow.core.raise/Raise<#B>).arrow.core.raise/mapOrAccumulate(kotlin.collections/Map<#A, #C>, kotlin/Function2<#B, #B, #B>, kotlin/Function2, kotlin.collections/Map.Entry<#A, #C>, #D>): kotlin.collections/Map<#A, #D> // arrow.core.raise/mapOrAccumulate|mapOrAccumulate@arrow.core.raise.Raise<0:1>(kotlin.collections.Map<0:0,0:2>;kotlin.Function2<0:1,0:1,0:1>;kotlin.Function2,kotlin.collections.Map.Entry<0:0,0:2>,0:3>){0§;1§;2§;3§}[0] +final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (arrow.core.raise/Raise<#B>).arrow.core.raise/mapValuesOrAccumulate(kotlin.collections/Map<#A, #C>, kotlin/Function2<#B, #B, #B>, kotlin/Function2, kotlin.collections/Map.Entry<#A, #C>, #D>): kotlin.collections/Map<#A, #D> // arrow.core.raise/mapValuesOrAccumulate|mapValuesOrAccumulate@arrow.core.raise.Raise<0:1>(kotlin.collections.Map<0:0,0:2>;kotlin.Function2<0:1,0:1,0:1>;kotlin.Function2,kotlin.collections.Map.Entry<0:0,0:2>,0:3>){0§;1§;2§;3§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (arrow.core.raise/Raise>).arrow.core.raise/zipOrAccumulate(kotlin/Function1, #B>, kotlin/Function1, #C>, kotlin/Function2<#B, #C, #D>): #D // arrow.core.raise/zipOrAccumulate|zipOrAccumulate@arrow.core.raise.Raise>(kotlin.Function1,0:1>;kotlin.Function1,0:2>;kotlin.Function2<0:1,0:2,0:3>){0§;1§;2§;3§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (arrow.core.raise/Raise>).arrow.core.raise/mapOrAccumulate(kotlin.collections/Map<#A, #C>, kotlin/Function2, kotlin.collections/Map.Entry<#A, #C>, #D>): kotlin.collections/Map<#A, #D> // arrow.core.raise/mapOrAccumulate|mapOrAccumulate@arrow.core.raise.Raise>(kotlin.collections.Map<0:0,0:2>;kotlin.Function2,kotlin.collections.Map.Entry<0:0,0:2>,0:3>){0§;1§;2§;3§}[0] +final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (arrow.core.raise/Raise>).arrow.core.raise/mapValuesOrAccumulate(kotlin.collections/Map<#A, #C>, kotlin/Function2, kotlin.collections/Map.Entry<#A, #C>, #D>): kotlin.collections/Map<#A, #D> // arrow.core.raise/mapValuesOrAccumulate|mapValuesOrAccumulate@arrow.core.raise.Raise>(kotlin.collections.Map<0:0,0:2>;kotlin.Function2,kotlin.collections.Map.Entry<0:0,0:2>,0:3>){0§;1§;2§;3§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin.collections/Iterable<#A>).arrow.core/zip(kotlin.collections/Iterable<#B>, kotlin.collections/Iterable<#C>, kotlin/Function3<#A, #B, #C, #D>): kotlin.collections/List<#D> // arrow.core/zip|zip@kotlin.collections.Iterable<0:0>(kotlin.collections.Iterable<0:1>;kotlin.collections.Iterable<0:2>;kotlin.Function3<0:0,0:1,0:2,0:3>){0§;1§;2§;3§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/padZip(kotlin.collections/Map<#A, #C>, kotlin/Function2<#A, #B, #D>, kotlin/Function2<#A, #C, #D>, kotlin/Function3<#A, #B, #C, #D>): kotlin.collections/Map<#A, #D> // arrow.core/padZip|padZip@kotlin.collections.Map<0:0,0:1>(kotlin.collections.Map<0:0,0:2>;kotlin.Function2<0:0,0:1,0:3>;kotlin.Function2<0:0,0:2,0:3>;kotlin.Function3<0:0,0:1,0:2,0:3>){0§;1§;2§;3§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/zip(kotlin.collections/Map<#A, #C>, kotlin/Function3<#A, #B, #C, #D>): kotlin.collections/Map<#A, #D> // arrow.core/zip|zip@kotlin.collections.Map<0:0,0:1>(kotlin.collections.Map<0:0,0:2>;kotlin.Function3<0:0,0:1,0:2,0:3>){0§;1§;2§;3§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin.collections/Map<#A, #C>).arrow.core/mapOrAccumulate(kotlin/Function2<#B, #B, #B>, kotlin/Function2, kotlin.collections/Map.Entry<#A, #C>, #D>): arrow.core/Either<#B, kotlin.collections/Map<#A, #D>> // arrow.core/mapOrAccumulate|mapOrAccumulate@kotlin.collections.Map<0:0,0:2>(kotlin.Function2<0:1,0:1,0:1>;kotlin.Function2,kotlin.collections.Map.Entry<0:0,0:2>,0:3>){0§;1§;2§;3§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin.collections/Map<#A, #C>).arrow.core/mapOrAccumulate(kotlin/Function2, kotlin.collections/Map.Entry<#A, #C>, #D>): arrow.core/Either, kotlin.collections/Map<#A, #D>> // arrow.core/mapOrAccumulate|mapOrAccumulate@kotlin.collections.Map<0:0,0:2>(kotlin.Function2,kotlin.collections.Map.Entry<0:0,0:2>,0:3>){0§;1§;2§;3§}[0] +final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin.collections/Map<#A, #C>).arrow.core/mapValuesOrAccumulate(kotlin/Function2<#B, #B, #B>, kotlin/Function2, kotlin.collections/Map.Entry<#A, #C>, #D>): arrow.core/Either<#B, kotlin.collections/Map<#A, #D>> // arrow.core/mapValuesOrAccumulate|mapValuesOrAccumulate@kotlin.collections.Map<0:0,0:2>(kotlin.Function2<0:1,0:1,0:1>;kotlin.Function2,kotlin.collections.Map.Entry<0:0,0:2>,0:3>){0§;1§;2§;3§}[0] +final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin.collections/Map<#A, #C>).arrow.core/mapValuesOrAccumulate(kotlin/Function2, kotlin.collections/Map.Entry<#A, #C>, #D>): arrow.core/Either, kotlin.collections/Map<#A, #D>> // arrow.core/mapValuesOrAccumulate|mapValuesOrAccumulate@kotlin.collections.Map<0:0,0:2>(kotlin.Function2,kotlin.collections.Map.Entry<0:0,0:2>,0:3>){0§;1§;2§;3§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin.collections/Map<#A, #D>).arrow.core/unalign(kotlin/Function1, arrow.core/Ior<#B, #C>>): kotlin/Pair, kotlin.collections/Map<#A, #C>> // arrow.core/unalign|unalign@kotlin.collections.Map<0:0,0:3>(kotlin.Function1,arrow.core.Ior<0:1,0:2>>){0§;1§;2§;3§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin.collections/Map<#A, #D>).arrow.core/unzip(kotlin/Function1, kotlin/Pair<#B, #C>>): kotlin/Pair, kotlin.collections/Map<#A, #C>> // arrow.core/unzip|unzip@kotlin.collections.Map<0:0,0:3>(kotlin.Function1,kotlin.Pair<0:1,0:2>>){0§;1§;2§;3§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core.raise/Raise<#A>).arrow.core.raise/mapOrAccumulate(kotlin.collections/Iterable<#B>, kotlin/Function2<#A, #A, #A>, kotlin/Function2, #B, #C>): kotlin.collections/List<#C> // arrow.core.raise/mapOrAccumulate|mapOrAccumulate@arrow.core.raise.Raise<0:0>(kotlin.collections.Iterable<0:1>;kotlin.Function2<0:0,0:0,0:0>;kotlin.Function2,0:1,0:2>){0§;1§;2§}[0] @@ -934,6 +939,7 @@ final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.col final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Iterable<#B>).arrow.core/mapOrAccumulate(kotlin/Function2, #B, #C>): arrow.core/Either, kotlin.collections/List<#C>> // arrow.core/mapOrAccumulate|mapOrAccumulate@kotlin.collections.Iterable<0:1>(kotlin.Function2,0:1,0:2>){0§;1§;2§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Iterable<#C>).arrow.core/unalign(kotlin/Function1<#C, arrow.core/Ior<#A, #B>>): kotlin/Pair, kotlin.collections/List<#B?>> // arrow.core/unalign|unalign@kotlin.collections.Iterable<0:2>(kotlin.Function1<0:2,arrow.core.Ior<0:0,0:1>>){0§;1§;2§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/fold(#C, kotlin/Function2<#C, kotlin.collections/Map.Entry<#A, #B>, #C>): #C // arrow.core/fold|fold@kotlin.collections.Map<0:0,0:1>(0:2;kotlin.Function2<0:2,kotlin.collections.Map.Entry<0:0,0:1>,0:2>){0§;1§;2§}[0] +final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/mapValuesNotNull(kotlin/Function1, #C?>): kotlin.collections/Map<#A, #C> // arrow.core/mapValuesNotNull|mapValuesNotNull@kotlin.collections.Map<0:0,0:1>(kotlin.Function1,0:2?>){0§;1§;2§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin/Function1, #B>).arrow.core.raise/fold(kotlin/Function1<#A, #C>, kotlin/Function1<#B, #C>): #C // arrow.core.raise/fold|fold@kotlin.Function1,0:1>(kotlin.Function1<0:0,0:2>;kotlin.Function1<0:1,0:2>){0§;1§;2§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin/Function1, #B>).arrow.core.raise/fold(kotlin/Function1, kotlin/Function1<#A, #C>, kotlin/Function1<#B, #C>): #C // arrow.core.raise/fold|fold@kotlin.Function1,0:1>(kotlin.Function1;kotlin.Function1<0:0,0:2>;kotlin.Function1<0:1,0:2>){0§;1§;2§}[0] final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> arrow.core.raise/accumulate(kotlin/Function1>, #B>, #C>, crossinline kotlin/Function1, #B>): #C // arrow.core.raise/accumulate|accumulate(kotlin.Function1>,0:1>,0:2>;kotlin.Function1,0:1>){0§;1§;2§}[0] diff --git a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/map.kt b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/map.kt index 2ce773040f0..a69da507e8c 100644 --- a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/map.kt +++ b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/map.kt @@ -5,6 +5,7 @@ package arrow.core import arrow.core.raise.either import arrow.core.raise.mapOrAccumulate import arrow.core.raise.RaiseAccumulate +import arrow.core.raise.mapValuesOrAccumulate import kotlin.experimental.ExperimentalTypeInference /** @@ -244,9 +245,9 @@ public inline fun Map.zip( * only keeping the [Map.Entry] of the transformed map that match the input [Map.Entry]. */ @Suppress("UNCHECKED_CAST") -public fun Map.flatMap(f: (Map.Entry) -> Map): Map = +public fun Map.flatMapValues(f: (Map.Entry) -> Map): Map = buildMap { - this@flatMap.forEach { entry -> + this@flatMapValues.forEach { entry -> val nestedMap = f(entry) if (nestedMap.containsKey(entry.key)) { put(entry.key, nestedMap[entry.key] as B) @@ -254,22 +255,39 @@ public fun Map.flatMap(f: (Map.Entry) -> Map): Map Map.mapOrAccumulate( combine: (E, E) -> E, @BuilderInference transform: RaiseAccumulate.(Map.Entry) -> B +): Either> = mapValuesOrAccumulate(combine, transform) + +@Deprecated( + message = "Deprecated to allow for future alignment with stdlib Map#map returning List", + replaceWith = ReplaceWith("mapValuesOrAccumulate(transform)"), +) +public inline fun Map.mapOrAccumulate( + @BuilderInference transform: RaiseAccumulate.(Map.Entry) -> B +): Either, Map> = mapValuesOrAccumulate(transform) + +public inline fun Map.mapValuesOrAccumulate( + combine: (E, E) -> E, + @BuilderInference transform: RaiseAccumulate.(Map.Entry) -> B ): Either> = either { - mapOrAccumulate(this@mapOrAccumulate, combine, transform) + mapValuesOrAccumulate(this@mapValuesOrAccumulate, combine, transform) } -public inline fun Map.mapOrAccumulate( +public inline fun Map.mapValuesOrAccumulate( @BuilderInference transform: RaiseAccumulate.(Map.Entry) -> B ): Either, Map> = either { - mapOrAccumulate(this@mapOrAccumulate, transform) + mapValuesOrAccumulate(this@mapValuesOrAccumulate, transform) } -public fun Map.mapNotNull(transform: (Map.Entry) -> B?): Map = +public inline fun Map.mapValuesNotNull(transform: (Map.Entry) -> B?): Map = buildMap { - this@mapNotNull.forEach { entry -> + this@mapValuesNotNull.forEach { entry -> transform(entry)?.let { put(entry.key, it) } } } diff --git a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/RaiseAccumulate.kt b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/RaiseAccumulate.kt index b798f7e36f3..95c14cf00cc 100644 --- a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/RaiseAccumulate.kt +++ b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/RaiseAccumulate.kt @@ -651,10 +651,31 @@ public inline fun Raise>.mapOrAccumulate( }.toNonEmptySetOrNull()!! @RaiseDSL +@Deprecated( + message = "Deprecated to allow for future alignment with stdlib Map#map returning List", + replaceWith = ReplaceWith("mapValuesOrAccumulate(map, combine, transform)"), +) public inline fun Raise.mapOrAccumulate( map: Map, combine: (Error, Error) -> Error, @BuilderInference transform: RaiseAccumulate.(Map.Entry) -> B +): Map = mapValuesOrAccumulate(map, combine, transform) + +@RaiseDSL +@Deprecated( + message = "Deprecated to allow for future alignment with stdlib Map#map returning List", + replaceWith = ReplaceWith("mapValuesOrAccumulate(map, transform)") +) +public inline fun Raise>.mapOrAccumulate( + map: Map, + @BuilderInference transform: RaiseAccumulate.(Map.Entry) -> B +): Map = mapValuesOrAccumulate(map, transform) + +@RaiseDSL +public inline fun Raise.mapValuesOrAccumulate( + map: Map, + combine: (Error, Error) -> Error, + @BuilderInference transform: RaiseAccumulate.(Map.Entry) -> B ): Map = buildMap(map.size) { forEachAccumulatingImpl(map.entries.iterator(), combine) { item, hasErrors -> transform(item).also { if (!hasErrors) put(item.key, it) } @@ -662,7 +683,7 @@ public inline fun Raise.mapOrAccumulate( } @RaiseDSL -public inline fun Raise>.mapOrAccumulate( +public inline fun Raise>.mapValuesOrAccumulate( map: Map, @BuilderInference transform: RaiseAccumulate.(Map.Entry) -> B ): Map = buildMap(map.size) { @@ -712,7 +733,7 @@ public open class RaiseAccumulate( raise.raise((errors + r).toNonEmptyListOrNull()!!) public override fun Map>.bindAll(): Map = - raise.mapOrAccumulate(this) { it.value.bind() } + raise.mapValuesOrAccumulate(this) { it.value.bind() } @RaiseDSL public inline fun Iterable.mapOrAccumulate( @@ -729,6 +750,16 @@ public open class RaiseAccumulate( transform: RaiseAccumulate.(A) -> B ): NonEmptySet = raise.mapOrAccumulate(this, transform) + @RaiseDSL + public inline fun Map.mapOrAccumulate( + transform: RaiseAccumulate.(Map.Entry) -> B + ): List = raise.mapOrAccumulate(entries, transform) + + @RaiseDSL + public inline fun Map.mapValuesOrAccumulate( + transform: RaiseAccumulate.(Map.Entry) -> B + ): Map = raise.mapValuesOrAccumulate(this, transform) + @RaiseDSL @JvmName("_mapOrAccumulate") public inline fun mapOrAccumulate( diff --git a/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/ListKTest.kt b/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/ListKTest.kt index 08ed5566c53..b6cc2a41754 100644 --- a/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/ListKTest.kt +++ b/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/ListKTest.kt @@ -13,7 +13,7 @@ import kotlin.test.Test class ListKTest { @Test fun monoidLaws() = - testLaws(MonoidLaws("List", emptyList(), List::plus, Arb.list(Arb.int()))) + testLaws(MonoidLaws("List", emptyList(), { x: List, y: List -> x + y }, Arb.list(Arb.int()))) @Test fun mapNotNullOk() = runTest { checkAll(Arb.list(Arb.int())) { listk -> diff --git a/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/MapKTest.kt b/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/MapKTest.kt index e6ba1a9d7e1..3f2f2dd2c44 100644 --- a/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/MapKTest.kt +++ b/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/MapKTest.kt @@ -409,11 +409,11 @@ class MapKTest { } } - @Test fun mapNotNullOk() = runTest { + @Test fun mapValuesNotNullOk() = runTest { checkAll( Arb.map(Arb.int(), Arb.boolean(), maxSize = 30) ) { xs -> - val rs = xs.mapNotNull { (_, pred) -> if(pred) true else null } + val rs = xs.mapValuesNotNull { (_, pred) -> if(pred) true else null } xs.forAll { if (it.value) @@ -678,11 +678,11 @@ class MapKTest { } } - @Test fun flatMapOk() = runTest { + @Test fun flatMapValuesOk() = runTest { checkAll( Arb.map2(Arb.int(), Arb.int(), Arb.int()) ) { (a, b) -> - val result = a.flatMap { b } + val result = a.flatMapValues { b } val expected = a.filter { (k, _) -> b.containsKey(k) } .map { (k, _) -> Pair(k, b[k]!!) } .toMap() @@ -690,8 +690,8 @@ class MapKTest { } } - @Test fun mapOrAccumulateEmpty() = runTest { - val result: Either, Map> = emptyMap().mapOrAccumulate { + @Test fun mapValuesOrAccumulateEmpty() = runTest { + val result: Either, Map> = emptyMap().mapValuesOrAccumulate { it.value.toString() } @@ -699,12 +699,12 @@ class MapKTest { .value.shouldBeEmpty() } - @Test fun mapOrAccumulateMaps() = runTest { + @Test fun mapValuesOrAccumulateMaps() = runTest { checkAll( Arb.map(Arb.int(), Arb.int(), maxSize = 30) ) { xs -> - val result: Either, Map> = xs.mapOrAccumulate { + val result: Either, Map> = xs.mapValuesOrAccumulate { it.value.toString() } @@ -714,22 +714,22 @@ class MapKTest { } } - @Test fun mapOrAccumulateAccumulates() = runTest { + @Test fun mapValuesOrAccumulateAccumulates() = runTest { checkAll( Arb.map(Arb.int(), Arb.int(), minSize = 1, maxSize = 30) ) { xs -> - xs.mapOrAccumulate { - raise(it.value) - }.shouldBeInstanceOf>>() + xs.mapValuesOrAccumulate { + raise(it.value) + }.shouldBeInstanceOf>>() .value.all.shouldContainAll(xs.values) } } - @Test fun flatMapNull() = runTest { + @Test fun flatMapValuesNull() = runTest { checkAll( Arb.map2(Arb.int(), Arb.int(), Arb.int().orNull()) ) { (mapA, mapB) -> - val result = mapA.flatMap { mapB } + val result = mapA.flatMapValues { mapB } val expected = mapA.filter { (k, _) -> mapB.containsKey(k) } .map { (k, _) -> Pair(k, mapB[k]) } .toMap() diff --git a/arrow-libs/optics/arrow-optics-compose/build.gradle.kts b/arrow-libs/optics/arrow-optics-compose/build.gradle.kts index 7fb8dbd8e9c..826a86f661c 100644 --- a/arrow-libs/optics/arrow-optics-compose/build.gradle.kts +++ b/arrow-libs/optics/arrow-optics-compose/build.gradle.kts @@ -2,8 +2,6 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.dsl.KotlinVersion -import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl - repositories { google() @@ -37,7 +35,7 @@ kotlin { browser() nodejs() } - @OptIn(ExperimentalWasmDsl::class) wasmJs() + @OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class) wasmJs() androidTarget() // Native: https://kotlinlang.org/docs/native-target-support.html // -- Tier 1 -- diff --git a/arrow-libs/optics/arrow-optics-compose/src/commonMain/kotlin/arrow/optics/Flow.kt b/arrow-libs/optics/arrow-optics-compose/src/commonMain/kotlin/arrow/optics/Flow.kt index fe8dce19596..62a0014a412 100644 --- a/arrow-libs/optics/arrow-optics-compose/src/commonMain/kotlin/arrow/optics/Flow.kt +++ b/arrow-libs/optics/arrow-optics-compose/src/commonMain/kotlin/arrow/optics/Flow.kt @@ -1,8 +1,10 @@ @file:JvmName("ComposeFlowKt") +@file:OptIn(ExperimentalCoroutinesApi::class, ExperimentalForInheritanceCoroutinesApi::class) package arrow.optics import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.ExperimentalForInheritanceCoroutinesApi import kotlinx.coroutines.flow.FlowCollector import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharedFlow @@ -66,7 +68,6 @@ public fun MutableStateFlow.optic(lens: Lens): MutableStateFlow< override val replayCache: List get() = this@optic.replayCache.map { lens.get(it) } - @ExperimentalCoroutinesApi override fun resetReplayCache() { this@optic.resetReplayCache() } diff --git a/arrow-libs/optics/arrow-optics-ksp-plugin/build.gradle.kts b/arrow-libs/optics/arrow-optics-ksp-plugin/build.gradle.kts index 8eb8eb6cb6c..3c68f03ec4f 100644 --- a/arrow-libs/optics/arrow-optics-ksp-plugin/build.gradle.kts +++ b/arrow-libs/optics/arrow-optics-ksp-plugin/build.gradle.kts @@ -27,6 +27,12 @@ kotlin { } } +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(11)) + } +} + apply(from = property("ANIMALSNIFFER_MPP")) dependencies { diff --git a/arrow-libs/resilience/arrow-resilience/api/arrow-resilience.api b/arrow-libs/resilience/arrow-resilience/api/arrow-resilience.api index 52e034ccf6a..40ca2f06278 100644 --- a/arrow-libs/resilience/arrow-resilience/api/arrow-resilience.api +++ b/arrow-libs/resilience/arrow-resilience/api/arrow-resilience.api @@ -96,7 +96,7 @@ public final class arrow/resilience/CircuitBreaker$State$Open : arrow/resilience } public final class arrow/resilience/FlowKt { - public static final fun retry-z663S_Q (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; + public static final fun retry (Lkotlinx/coroutines/flow/Flow;Larrow/resilience/Schedule;)Lkotlinx/coroutines/flow/Flow; } public final class arrow/resilience/SagaActionStep { @@ -133,56 +133,46 @@ public final class arrow/resilience/SagaScope$DefaultImpls { public static fun invoke (Larrow/resilience/SagaScope;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; } -public final class arrow/resilience/Schedule { +public abstract interface class arrow/resilience/Schedule { public static final field Companion Larrow/resilience/Schedule$Companion; - public static final fun and-6Pcb-r4 (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; - public static final fun and-GI_V1oY (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2; - public static final fun and-JfEqqxs (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; - public static final fun andThen-GI_V1oY (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2; - public static final fun andThen-JfEqqxs (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2; - public static final synthetic fun box-impl (Lkotlin/jvm/functions/Function2;)Larrow/resilience/Schedule; - public static final fun collect-k5utPk0 (Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2; - public static fun constructor-impl (Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2; - public static final fun contramap-ZhmCDx4 (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2; - public static final fun delayed-ZhmCDx4 (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; - public static final fun doUntil-ZhmCDx4 (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; - public static final fun doWhile-ZhmCDx4 (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; - public fun equals (Ljava/lang/Object;)Z - public static fun equals-impl (Lkotlin/jvm/functions/Function2;Ljava/lang/Object;)Z - public static final fun equals-impl0 (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Z - public static final fun fold-juJHlvs (Lkotlin/jvm/functions/Function2;Ljava/lang/Object;Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; - public final fun getStep ()Lkotlin/jvm/functions/Function2; - public fun hashCode ()I - public static fun hashCode-impl (Lkotlin/jvm/functions/Function2;)I - public static final fun jittered-Q7pyTlY (Lkotlin/jvm/functions/Function2;DDLkotlin/random/Random;)Lkotlin/jvm/functions/Function2; - public static synthetic fun jittered-Q7pyTlY$default (Lkotlin/jvm/functions/Function2;DDLkotlin/random/Random;ILjava/lang/Object;)Lkotlin/jvm/functions/Function2; - public static final fun log-ZhmCDx4 (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; - public static final fun map-ZhmCDx4 (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2; - public static final fun mapDecision-ZhmCDx4 (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2; - public static final fun or-JfEqqxs (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; - public static final fun repeat-impl (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun repeatOrElse-impl (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun repeatOrElseEither-impl (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun toString ()Ljava/lang/String; - public static fun toString-impl (Lkotlin/jvm/functions/Function2;)Ljava/lang/String; - public final synthetic fun unbox-impl ()Lkotlin/jvm/functions/Function2; - public static final fun zipLeft-GI_V1oY (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2; - public static final fun zipRight-GI_V1oY (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2; + public abstract fun and (Larrow/resilience/Schedule;)Larrow/resilience/Schedule; + public abstract fun and (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public abstract fun and (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public abstract fun andThen (Larrow/resilience/Schedule;)Larrow/resilience/Schedule; + public abstract fun andThen (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Larrow/resilience/Schedule; + public abstract fun collect ()Larrow/resilience/Schedule; + public abstract fun contramap (Lkotlin/jvm/functions/Function2;)Larrow/resilience/Schedule; + public abstract fun delayed (Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public abstract fun doUntil (Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public abstract fun doWhile (Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public abstract fun fold (Ljava/lang/Object;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public abstract fun getStep ()Lkotlin/jvm/functions/Function2; + public abstract fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public abstract fun jittered (DDLkotlin/random/Random;)Larrow/resilience/Schedule; + public abstract fun log (Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public abstract fun map (Lkotlin/jvm/functions/Function2;)Larrow/resilience/Schedule; + public abstract fun mapDecision (Lkotlin/jvm/functions/Function2;)Larrow/resilience/Schedule; + public abstract fun or (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public abstract fun repeat (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public abstract fun repeatOrElse (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public abstract fun repeatOrElseEither (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public abstract fun zipLeft (Larrow/resilience/Schedule;)Larrow/resilience/Schedule; + public abstract fun zipRight (Larrow/resilience/Schedule;)Larrow/resilience/Schedule; } public final class arrow/resilience/Schedule$Companion { - public final fun collect-k5utPk0 ()Lkotlin/jvm/functions/Function2; - public final fun doUntil-ZhmCDx4 (Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; - public final fun doWhile-ZhmCDx4 (Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; - public final fun exponential-la_RjoE (JD)Lkotlin/jvm/functions/Function2; - public static synthetic fun exponential-la_RjoE$default (Larrow/resilience/Schedule$Companion;JDILjava/lang/Object;)Lkotlin/jvm/functions/Function2; - public final fun fibonacci-0qC2UY4 (J)Lkotlin/jvm/functions/Function2; - public final fun forever-k5utPk0 ()Lkotlin/jvm/functions/Function2; - public final fun identity-k5utPk0 ()Lkotlin/jvm/functions/Function2; - public final fun linear-0qC2UY4 (J)Lkotlin/jvm/functions/Function2; - public final fun recurs-ZhmCDx4 (J)Lkotlin/jvm/functions/Function2; - public final fun spaced-0qC2UY4 (J)Lkotlin/jvm/functions/Function2; - public final fun unfold-juJHlvs (Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2; + public final fun collect ()Larrow/resilience/Schedule; + public final fun doUntil (Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public final fun doWhile (Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public final fun exponential-VtjQ1oo (JD)Larrow/resilience/Schedule; + public static synthetic fun exponential-VtjQ1oo$default (Larrow/resilience/Schedule$Companion;JDILjava/lang/Object;)Larrow/resilience/Schedule; + public final fun fibonacci-LRDsOJo (J)Larrow/resilience/Schedule; + public final fun forever ()Larrow/resilience/Schedule; + public final fun identity ()Larrow/resilience/Schedule; + public final fun linear-LRDsOJo (J)Larrow/resilience/Schedule; + public final fun recurs (J)Larrow/resilience/Schedule; + public final fun spaced-LRDsOJo (J)Larrow/resilience/Schedule; + public final fun unfold (Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Larrow/resilience/Schedule; } public abstract interface class arrow/resilience/Schedule$Decision { @@ -250,13 +240,39 @@ public final class arrow/resilience/Schedule$Decision$Done : arrow/resilience/Sc public fun toString ()Ljava/lang/String; } +public final class arrow/resilience/Schedule$DefaultImpls { + public static fun and (Larrow/resilience/Schedule;Larrow/resilience/Schedule;)Larrow/resilience/Schedule; + public static fun and (Larrow/resilience/Schedule;Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public static fun and (Larrow/resilience/Schedule;Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public static fun andThen (Larrow/resilience/Schedule;Larrow/resilience/Schedule;)Larrow/resilience/Schedule; + public static fun andThen (Larrow/resilience/Schedule;Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Larrow/resilience/Schedule; + public static fun collect (Larrow/resilience/Schedule;)Larrow/resilience/Schedule; + public static fun contramap (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function2;)Larrow/resilience/Schedule; + public static fun delayed (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public static fun doUntil (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public static fun doWhile (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public static fun fold (Larrow/resilience/Schedule;Ljava/lang/Object;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public static fun getStep (Larrow/resilience/Schedule;)Lkotlin/jvm/functions/Function2; + public static fun jittered (Larrow/resilience/Schedule;DDLkotlin/random/Random;)Larrow/resilience/Schedule; + public static synthetic fun jittered$default (Larrow/resilience/Schedule;DDLkotlin/random/Random;ILjava/lang/Object;)Larrow/resilience/Schedule; + public static fun log (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public static fun map (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function2;)Larrow/resilience/Schedule; + public static fun mapDecision (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function2;)Larrow/resilience/Schedule; + public static fun or (Larrow/resilience/Schedule;Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Larrow/resilience/Schedule; + public static fun repeat (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static fun repeatOrElse (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static fun repeatOrElseEither (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static fun zipLeft (Larrow/resilience/Schedule;Larrow/resilience/Schedule;)Larrow/resilience/Schedule; + public static fun zipRight (Larrow/resilience/Schedule;Larrow/resilience/Schedule;)Larrow/resilience/Schedule; +} + public final class arrow/resilience/ScheduleKt { - public static final fun retry-YL6hcnA (Larrow/core/raise/Raise;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun retry-aZo8_V4 (Lkotlin/jvm/functions/Function2;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun retryEither-4AuOtiA (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function0;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun retryOrElse-quv6EbI (Lkotlin/jvm/functions/Function2;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun retryOrElseEither-quv6EbI (Lkotlin/jvm/functions/Function2;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun retryRaise-4AuOtiA (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun retry (Larrow/core/raise/Raise;Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun retry (Larrow/resilience/Schedule;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun retryEither (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function0;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun retryOrElse (Larrow/resilience/Schedule;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun retryOrElseEither (Larrow/resilience/Schedule;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun retryRaise (Larrow/resilience/Schedule;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; } public final class arrow/resilience/common/Platform : java/lang/Enum { diff --git a/arrow-libs/resilience/arrow-resilience/api/arrow-resilience.klib.api b/arrow-libs/resilience/arrow-resilience/api/arrow-resilience.klib.api index 17cf9ae567e..f5694199624 100644 --- a/arrow-libs/resilience/arrow-resilience/api/arrow-resilience.klib.api +++ b/arrow-libs/resilience/arrow-resilience/api/arrow-resilience.klib.api @@ -23,6 +23,94 @@ final enum class arrow.resilience.common/Platform : kotlin/Enum // arrow.resilience.common/Platform.values|values#static(){}[0] } +abstract fun interface <#A: in kotlin/Any?, #B: out kotlin/Any?> arrow.resilience/Schedule { // arrow.resilience/Schedule|null[0] + open val step // arrow.resilience/Schedule.step|{}step[0] + open fun (): kotlin.coroutines/SuspendFunction1<#A, arrow.resilience/Schedule.Decision<#A, #B>> // arrow.resilience/Schedule.step.|(){}[0] + + abstract suspend fun invoke(#A): arrow.resilience/Schedule.Decision<#A, #B> // arrow.resilience/Schedule.invoke|invoke(1:0){}[0] + open fun <#A1: kotlin/Any?, #B1: kotlin/Any?> and(arrow.resilience/Schedule<#A, #A1>, kotlin.coroutines/SuspendFunction2<#B, #A1, #B1>): arrow.resilience/Schedule<#A, #B1> // arrow.resilience/Schedule.and|and(arrow.resilience.Schedule<1:0,0:0>;kotlin.coroutines.SuspendFunction2<1:1,0:0,0:1>){0§;1§}[0] + open fun <#A1: kotlin/Any?, #B1: kotlin/Any?> and(arrow.resilience/Schedule<#A, #A1>, kotlin.coroutines/SuspendFunction2<#B, #A1, #B1>, kotlin.coroutines/SuspendFunction2): arrow.resilience/Schedule<#A, #B1> // arrow.resilience/Schedule.and|and(arrow.resilience.Schedule<1:0,0:0>;kotlin.coroutines.SuspendFunction2<1:1,0:0,0:1>;kotlin.coroutines.SuspendFunction2){0§;1§}[0] + open fun <#A1: kotlin/Any?, #B1: kotlin/Any?> andThen(arrow.resilience/Schedule<#A, #A1>, kotlin.coroutines/SuspendFunction1<#B, #B1>, kotlin.coroutines/SuspendFunction1<#A1, #B1>): arrow.resilience/Schedule<#A, #B1> // arrow.resilience/Schedule.andThen|andThen(arrow.resilience.Schedule<1:0,0:0>;kotlin.coroutines.SuspendFunction1<1:1,0:1>;kotlin.coroutines.SuspendFunction1<0:0,0:1>){0§;1§}[0] + open fun <#A1: kotlin/Any?, #B1: kotlin/Any?> or(arrow.resilience/Schedule<#A, #A1>, kotlin.coroutines/SuspendFunction2<#B?, #A1?, #B1>, kotlin.coroutines/SuspendFunction2): arrow.resilience/Schedule<#A, #B1> // arrow.resilience/Schedule.or|or(arrow.resilience.Schedule<1:0,0:0>;kotlin.coroutines.SuspendFunction2<1:1?,0:0?,0:1>;kotlin.coroutines.SuspendFunction2){0§;1§}[0] + open fun <#A1: kotlin/Any?> and(arrow.resilience/Schedule<#A, #A1>): arrow.resilience/Schedule<#A, kotlin/Pair<#B, #A1>> // arrow.resilience/Schedule.and|and(arrow.resilience.Schedule<1:0,0:0>){0§}[0] + open fun <#A1: kotlin/Any?> andThen(arrow.resilience/Schedule<#A, #A1>): arrow.resilience/Schedule<#A, arrow.core/Either<#B, #A1>> // arrow.resilience/Schedule.andThen|andThen(arrow.resilience.Schedule<1:0,0:0>){0§}[0] + open fun <#A1: kotlin/Any?> contramap(kotlin.coroutines/SuspendFunction1<#A1, #A>): arrow.resilience/Schedule<#A1, #B> // arrow.resilience/Schedule.contramap|contramap(kotlin.coroutines.SuspendFunction1<0:0,1:0>){0§}[0] + open fun <#A1: kotlin/Any?> fold(#A1, kotlin.coroutines/SuspendFunction2<#A1, #B, #A1>): arrow.resilience/Schedule<#A, #A1> // arrow.resilience/Schedule.fold|fold(0:0;kotlin.coroutines.SuspendFunction2<0:0,1:1,0:0>){0§}[0] + open fun <#A1: kotlin/Any?> map(kotlin.coroutines/SuspendFunction1<#B, #A1>): arrow.resilience/Schedule<#A, #A1> // arrow.resilience/Schedule.map|map(kotlin.coroutines.SuspendFunction1<1:1,0:0>){0§}[0] + open fun <#A1: kotlin/Any?> zipLeft(arrow.resilience/Schedule<#A, #A1>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.zipLeft|zipLeft(arrow.resilience.Schedule<1:0,0:0>){0§}[0] + open fun <#A1: kotlin/Any?> zipRight(arrow.resilience/Schedule<#A, #A1>): arrow.resilience/Schedule<#A, #A1> // arrow.resilience/Schedule.zipRight|zipRight(arrow.resilience.Schedule<1:0,0:0>){0§}[0] + open fun collect(): arrow.resilience/Schedule<#A, kotlin.collections/List<#B>> // arrow.resilience/Schedule.collect|collect(){}[0] + open fun delayed(kotlin.coroutines/SuspendFunction2<#B, kotlin.time/Duration, kotlin.time/Duration>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.delayed|delayed(kotlin.coroutines.SuspendFunction2<1:1,kotlin.time.Duration,kotlin.time.Duration>){}[0] + open fun doUntil(kotlin.coroutines/SuspendFunction2<#A, #B, kotlin/Boolean>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.doUntil|doUntil(kotlin.coroutines.SuspendFunction2<1:0,1:1,kotlin.Boolean>){}[0] + open fun doWhile(kotlin.coroutines/SuspendFunction2<#A, #B, kotlin/Boolean>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.doWhile|doWhile(kotlin.coroutines.SuspendFunction2<1:0,1:1,kotlin.Boolean>){}[0] + open fun jittered(kotlin/Double = ..., kotlin/Double = ..., kotlin.random/Random = ...): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.jittered|jittered(kotlin.Double;kotlin.Double;kotlin.random.Random){}[0] + open fun log(kotlin.coroutines/SuspendFunction2<#A, #B, kotlin/Unit>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.log|log(kotlin.coroutines.SuspendFunction2<1:0,1:1,kotlin.Unit>){}[0] + open fun mapDecision(kotlin.coroutines/SuspendFunction1, arrow.resilience/Schedule.Decision<#A, #B>>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.mapDecision|mapDecision(kotlin.coroutines.SuspendFunction1,arrow.resilience.Schedule.Decision<1:0,1:1>>){}[0] + open suspend fun <#A1: kotlin/Any?> repeatOrElseEither(kotlin.coroutines/SuspendFunction0<#A>, kotlin.coroutines/SuspendFunction2): arrow.core/Either<#A1, #B> // arrow.resilience/Schedule.repeatOrElseEither|repeatOrElseEither(kotlin.coroutines.SuspendFunction0<1:0>;kotlin.coroutines.SuspendFunction2){0§}[0] + open suspend fun repeat(kotlin.coroutines/SuspendFunction0<#A>): #B // arrow.resilience/Schedule.repeat|repeat(kotlin.coroutines.SuspendFunction0<1:0>){}[0] + open suspend fun repeatOrElse(kotlin.coroutines/SuspendFunction0<#A>, kotlin.coroutines/SuspendFunction2): #B // arrow.resilience/Schedule.repeatOrElse|repeatOrElse(kotlin.coroutines.SuspendFunction0<1:0>;kotlin.coroutines.SuspendFunction2){}[0] + + sealed interface <#A1: in kotlin/Any?, #B1: out kotlin/Any?> Decision { // arrow.resilience/Schedule.Decision|null[0] + abstract val output // arrow.resilience/Schedule.Decision.output|{}output[0] + abstract fun (): #B1 // arrow.resilience/Schedule.Decision.output.|(){}[0] + + open suspend fun <#A2: kotlin/Any?, #B2: kotlin/Any?> and(arrow.resilience/Schedule.Decision<#A1, #A2>, kotlin.coroutines/SuspendFunction2<#B1, #A2, #B2>, kotlin.coroutines/SuspendFunction2): arrow.resilience/Schedule.Decision<#A1, #B2> // arrow.resilience/Schedule.Decision.and|and(arrow.resilience.Schedule.Decision<1:0,0:0>;kotlin.coroutines.SuspendFunction2<1:1,0:0,0:1>;kotlin.coroutines.SuspendFunction2){0§;1§}[0] + open suspend fun <#A2: kotlin/Any?, #B2: kotlin/Any?> andThen(kotlin.coroutines/SuspendFunction1<#A1, arrow.resilience/Schedule.Decision<#A1, #A2>>, kotlin.coroutines/SuspendFunction1<#B1, #B2>, kotlin.coroutines/SuspendFunction1<#A2, #B2>): arrow.resilience/Schedule.Decision<#A1, #B2> // arrow.resilience/Schedule.Decision.andThen|andThen(kotlin.coroutines.SuspendFunction1<1:0,arrow.resilience.Schedule.Decision<1:0,0:0>>;kotlin.coroutines.SuspendFunction1<1:1,0:1>;kotlin.coroutines.SuspendFunction1<0:0,0:1>){0§;1§}[0] + open suspend fun <#A2: kotlin/Any?, #B2: kotlin/Any?> or(arrow.resilience/Schedule.Decision<#A1, #A2>, kotlin.coroutines/SuspendFunction2<#B1?, #A2?, #B2>, kotlin.coroutines/SuspendFunction2): arrow.resilience/Schedule.Decision<#A1, #B2> // arrow.resilience/Schedule.Decision.or|or(arrow.resilience.Schedule.Decision<1:0,0:0>;kotlin.coroutines.SuspendFunction2<1:1?,0:0?,0:1>;kotlin.coroutines.SuspendFunction2){0§;1§}[0] + open suspend fun <#A2: kotlin/Any?> contramap(kotlin.coroutines/SuspendFunction1<#A2, #A1>): arrow.resilience/Schedule.Decision<#A2, #B1> // arrow.resilience/Schedule.Decision.contramap|contramap(kotlin.coroutines.SuspendFunction1<0:0,1:0>){0§}[0] + open suspend fun <#A2: kotlin/Any?> map(kotlin.coroutines/SuspendFunction1<#B1, #A2>): arrow.resilience/Schedule.Decision<#A1, #A2> // arrow.resilience/Schedule.Decision.map|map(kotlin.coroutines.SuspendFunction1<1:1,0:0>){0§}[0] + open suspend fun andThen(kotlin.coroutines/SuspendFunction1<#A1, arrow.resilience/Schedule.Decision<#A1, #B1>>): arrow.resilience/Schedule.Decision<#A1, #B1> // arrow.resilience/Schedule.Decision.andThen|andThen(kotlin.coroutines.SuspendFunction1<1:0,arrow.resilience.Schedule.Decision<1:0,1:1>>){}[0] + open suspend fun delayed(kotlin.coroutines/SuspendFunction2<#B1, kotlin.time/Duration, kotlin.time/Duration>): arrow.resilience/Schedule.Decision<#A1, #B1> // arrow.resilience/Schedule.Decision.delayed|delayed(kotlin.coroutines.SuspendFunction2<1:1,kotlin.time.Duration,kotlin.time.Duration>){}[0] + open suspend fun recursiveMap(kotlin.coroutines/SuspendFunction1, arrow.resilience/Schedule.Decision<#A1, #B1>>): arrow.resilience/Schedule.Decision<#A1, #B1> // arrow.resilience/Schedule.Decision.recursiveMap|recursiveMap(kotlin.coroutines.SuspendFunction1,arrow.resilience.Schedule.Decision<1:0,1:1>>){}[0] + + final class <#A2: in kotlin/Any?, #B2: out kotlin/Any?> Continue : arrow.resilience/Schedule.Decision<#A2, #B2> { // arrow.resilience/Schedule.Decision.Continue|null[0] + constructor (#B2, kotlin.time/Duration, kotlin.coroutines/SuspendFunction1<#A2, arrow.resilience/Schedule.Decision<#A2, #B2>>) // arrow.resilience/Schedule.Decision.Continue.|(1:1;kotlin.time.Duration;kotlin.coroutines.SuspendFunction1<1:0,arrow.resilience.Schedule.Decision<1:0,1:1>>){}[0] + + final val delay // arrow.resilience/Schedule.Decision.Continue.delay|{}delay[0] + final fun (): kotlin.time/Duration // arrow.resilience/Schedule.Decision.Continue.delay.|(){}[0] + final val output // arrow.resilience/Schedule.Decision.Continue.output|{}output[0] + final fun (): #B2 // arrow.resilience/Schedule.Decision.Continue.output.|(){}[0] + final val step // arrow.resilience/Schedule.Decision.Continue.step|{}step[0] + final fun (): kotlin.coroutines/SuspendFunction1<#A2, arrow.resilience/Schedule.Decision<#A2, #B2>> // arrow.resilience/Schedule.Decision.Continue.step.|(){}[0] + + final fun component1(): #B2 // arrow.resilience/Schedule.Decision.Continue.component1|component1(){}[0] + final fun component2(): kotlin.time/Duration // arrow.resilience/Schedule.Decision.Continue.component2|component2(){}[0] + final fun component3(): kotlin.coroutines/SuspendFunction1<#A2, arrow.resilience/Schedule.Decision<#A2, #B2>> // arrow.resilience/Schedule.Decision.Continue.component3|component3(){}[0] + final fun copy(#B2 = ..., kotlin.time/Duration = ..., kotlin.coroutines/SuspendFunction1<#A2, arrow.resilience/Schedule.Decision<#A2, #B2>> = ...): arrow.resilience/Schedule.Decision.Continue<#A2, #B2> // arrow.resilience/Schedule.Decision.Continue.copy|copy(1:1;kotlin.time.Duration;kotlin.coroutines.SuspendFunction1<1:0,arrow.resilience.Schedule.Decision<1:0,1:1>>){}[0] + final fun equals(kotlin/Any?): kotlin/Boolean // arrow.resilience/Schedule.Decision.Continue.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // arrow.resilience/Schedule.Decision.Continue.hashCode|hashCode(){}[0] + final fun toString(): kotlin/String // arrow.resilience/Schedule.Decision.Continue.toString|toString(){}[0] + } + + final class <#A2: out kotlin/Any?> Done : arrow.resilience/Schedule.Decision { // arrow.resilience/Schedule.Decision.Done|null[0] + constructor (#A2) // arrow.resilience/Schedule.Decision.Done.|(1:0){}[0] + + final val output // arrow.resilience/Schedule.Decision.Done.output|{}output[0] + final fun (): #A2 // arrow.resilience/Schedule.Decision.Done.output.|(){}[0] + + final fun component1(): #A2 // arrow.resilience/Schedule.Decision.Done.component1|component1(){}[0] + final fun copy(#A2 = ...): arrow.resilience/Schedule.Decision.Done<#A2> // arrow.resilience/Schedule.Decision.Done.copy|copy(1:0){}[0] + final fun equals(kotlin/Any?): kotlin/Boolean // arrow.resilience/Schedule.Decision.Done.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // arrow.resilience/Schedule.Decision.Done.hashCode|hashCode(){}[0] + final fun toString(): kotlin/String // arrow.resilience/Schedule.Decision.Done.toString|toString(){}[0] + } + } + + final object Companion { // arrow.resilience/Schedule.Companion|null[0] + final fun <#A2: kotlin/Any?, #B2: kotlin/Any?> unfold(#B2, kotlin.coroutines/SuspendFunction1<#B2, #B2>): arrow.resilience/Schedule<#A2, #B2> // arrow.resilience/Schedule.Companion.unfold|unfold(0:1;kotlin.coroutines.SuspendFunction1<0:1,0:1>){0§;1§}[0] + final fun <#A2: kotlin/Any?> collect(): arrow.resilience/Schedule<#A2, kotlin.collections/List<#A2>> // arrow.resilience/Schedule.Companion.collect|collect(){0§}[0] + final fun <#A2: kotlin/Any?> doUntil(kotlin.coroutines/SuspendFunction2<#A2, #A2, kotlin/Boolean>): arrow.resilience/Schedule<#A2, #A2> // arrow.resilience/Schedule.Companion.doUntil|doUntil(kotlin.coroutines.SuspendFunction2<0:0,0:0,kotlin.Boolean>){0§}[0] + final fun <#A2: kotlin/Any?> doWhile(kotlin.coroutines/SuspendFunction2<#A2, #A2, kotlin/Boolean>): arrow.resilience/Schedule<#A2, #A2> // arrow.resilience/Schedule.Companion.doWhile|doWhile(kotlin.coroutines.SuspendFunction2<0:0,0:0,kotlin.Boolean>){0§}[0] + final fun <#A2: kotlin/Any?> exponential(kotlin.time/Duration, kotlin/Double = ...): arrow.resilience/Schedule<#A2, kotlin.time/Duration> // arrow.resilience/Schedule.Companion.exponential|exponential(kotlin.time.Duration;kotlin.Double){0§}[0] + final fun <#A2: kotlin/Any?> fibonacci(kotlin.time/Duration): arrow.resilience/Schedule<#A2, kotlin.time/Duration> // arrow.resilience/Schedule.Companion.fibonacci|fibonacci(kotlin.time.Duration){0§}[0] + final fun <#A2: kotlin/Any?> forever(): arrow.resilience/Schedule<#A2, kotlin/Long> // arrow.resilience/Schedule.Companion.forever|forever(){0§}[0] + final fun <#A2: kotlin/Any?> identity(): arrow.resilience/Schedule<#A2, #A2> // arrow.resilience/Schedule.Companion.identity|identity(){0§}[0] + final fun <#A2: kotlin/Any?> linear(kotlin.time/Duration): arrow.resilience/Schedule<#A2, kotlin.time/Duration> // arrow.resilience/Schedule.Companion.linear|linear(kotlin.time.Duration){0§}[0] + final fun <#A2: kotlin/Any?> recurs(kotlin/Long): arrow.resilience/Schedule<#A2, kotlin/Long> // arrow.resilience/Schedule.Companion.recurs|recurs(kotlin.Long){0§}[0] + final fun <#A2: kotlin/Any?> spaced(kotlin.time/Duration): arrow.resilience/Schedule<#A2, kotlin/Long> // arrow.resilience/Schedule.Companion.spaced|spaced(kotlin.time.Duration){0§}[0] + } +} + abstract interface arrow.resilience/SagaScope { // arrow.resilience/SagaScope|null[0] abstract suspend fun <#A1: kotlin/Any?> saga(kotlin.coroutines/SuspendFunction1, kotlin.coroutines/SuspendFunction1<#A1, kotlin/Unit>): #A1 // arrow.resilience/SagaScope.saga|saga(kotlin.coroutines.SuspendFunction1;kotlin.coroutines.SuspendFunction1<0:0,kotlin.Unit>){0§}[0] open suspend fun <#A1: kotlin/Any?> (kotlin.coroutines/SuspendFunction1).bind(): #A1 // arrow.resilience/SagaScope.bind|bind@kotlin.coroutines.SuspendFunction1(){0§}[0] @@ -149,98 +237,6 @@ final class arrow.resilience/SagaBuilder : arrow.resilience/SagaScope { // arrow final suspend fun totalCompensation() // arrow.resilience/SagaBuilder.totalCompensation|totalCompensation(){}[0] } -final value class <#A: in kotlin/Any?, #B: out kotlin/Any?> arrow.resilience/Schedule { // arrow.resilience/Schedule|null[0] - constructor (kotlin.coroutines/SuspendFunction1<#A, arrow.resilience/Schedule.Decision<#A, #B>>) // arrow.resilience/Schedule.|(kotlin.coroutines.SuspendFunction1<1:0,arrow.resilience.Schedule.Decision<1:0,1:1>>){}[0] - - final val step // arrow.resilience/Schedule.step|{}step[0] - final fun (): kotlin.coroutines/SuspendFunction1<#A, arrow.resilience/Schedule.Decision<#A, #B>> // arrow.resilience/Schedule.step.|(){}[0] - - final fun <#A1: kotlin/Any?, #B1: kotlin/Any?> and(arrow.resilience/Schedule<#A, #A1>, kotlin.coroutines/SuspendFunction2<#B, #A1, #B1>): arrow.resilience/Schedule<#A, #B1> // arrow.resilience/Schedule.and|and(arrow.resilience.Schedule<1:0,0:0>;kotlin.coroutines.SuspendFunction2<1:1,0:0,0:1>){0§;1§}[0] - final fun <#A1: kotlin/Any?, #B1: kotlin/Any?> and(arrow.resilience/Schedule<#A, #A1>, kotlin.coroutines/SuspendFunction2<#B, #A1, #B1>, kotlin.coroutines/SuspendFunction2): arrow.resilience/Schedule<#A, #B1> // arrow.resilience/Schedule.and|and(arrow.resilience.Schedule<1:0,0:0>;kotlin.coroutines.SuspendFunction2<1:1,0:0,0:1>;kotlin.coroutines.SuspendFunction2){0§;1§}[0] - final fun <#A1: kotlin/Any?, #B1: kotlin/Any?> andThen(arrow.resilience/Schedule<#A, #A1>, kotlin.coroutines/SuspendFunction1<#B, #B1>, kotlin.coroutines/SuspendFunction1<#A1, #B1>): arrow.resilience/Schedule<#A, #B1> // arrow.resilience/Schedule.andThen|andThen(arrow.resilience.Schedule<1:0,0:0>;kotlin.coroutines.SuspendFunction1<1:1,0:1>;kotlin.coroutines.SuspendFunction1<0:0,0:1>){0§;1§}[0] - final fun <#A1: kotlin/Any?, #B1: kotlin/Any?> or(arrow.resilience/Schedule<#A, #A1>, kotlin.coroutines/SuspendFunction2<#B?, #A1?, #B1>, kotlin.coroutines/SuspendFunction2): arrow.resilience/Schedule<#A, #B1> // arrow.resilience/Schedule.or|or(arrow.resilience.Schedule<1:0,0:0>;kotlin.coroutines.SuspendFunction2<1:1?,0:0?,0:1>;kotlin.coroutines.SuspendFunction2){0§;1§}[0] - final fun <#A1: kotlin/Any?> and(arrow.resilience/Schedule<#A, #A1>): arrow.resilience/Schedule<#A, kotlin/Pair<#B, #A1>> // arrow.resilience/Schedule.and|and(arrow.resilience.Schedule<1:0,0:0>){0§}[0] - final fun <#A1: kotlin/Any?> andThen(arrow.resilience/Schedule<#A, #A1>): arrow.resilience/Schedule<#A, arrow.core/Either<#B, #A1>> // arrow.resilience/Schedule.andThen|andThen(arrow.resilience.Schedule<1:0,0:0>){0§}[0] - final fun <#A1: kotlin/Any?> contramap(kotlin.coroutines/SuspendFunction1<#A1, #A>): arrow.resilience/Schedule<#A1, #B> // arrow.resilience/Schedule.contramap|contramap(kotlin.coroutines.SuspendFunction1<0:0,1:0>){0§}[0] - final fun <#A1: kotlin/Any?> fold(#A1, kotlin.coroutines/SuspendFunction2<#A1, #B, #A1>): arrow.resilience/Schedule<#A, #A1> // arrow.resilience/Schedule.fold|fold(0:0;kotlin.coroutines.SuspendFunction2<0:0,1:1,0:0>){0§}[0] - final fun <#A1: kotlin/Any?> map(kotlin.coroutines/SuspendFunction1<#B, #A1>): arrow.resilience/Schedule<#A, #A1> // arrow.resilience/Schedule.map|map(kotlin.coroutines.SuspendFunction1<1:1,0:0>){0§}[0] - final fun <#A1: kotlin/Any?> zipLeft(arrow.resilience/Schedule<#A, #A1>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.zipLeft|zipLeft(arrow.resilience.Schedule<1:0,0:0>){0§}[0] - final fun <#A1: kotlin/Any?> zipRight(arrow.resilience/Schedule<#A, #A1>): arrow.resilience/Schedule<#A, #A1> // arrow.resilience/Schedule.zipRight|zipRight(arrow.resilience.Schedule<1:0,0:0>){0§}[0] - final fun collect(): arrow.resilience/Schedule<#A, kotlin.collections/List<#B>> // arrow.resilience/Schedule.collect|collect(){}[0] - final fun delayed(kotlin.coroutines/SuspendFunction2<#B, kotlin.time/Duration, kotlin.time/Duration>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.delayed|delayed(kotlin.coroutines.SuspendFunction2<1:1,kotlin.time.Duration,kotlin.time.Duration>){}[0] - final fun doUntil(kotlin.coroutines/SuspendFunction2<#A, #B, kotlin/Boolean>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.doUntil|doUntil(kotlin.coroutines.SuspendFunction2<1:0,1:1,kotlin.Boolean>){}[0] - final fun doWhile(kotlin.coroutines/SuspendFunction2<#A, #B, kotlin/Boolean>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.doWhile|doWhile(kotlin.coroutines.SuspendFunction2<1:0,1:1,kotlin.Boolean>){}[0] - final fun equals(kotlin/Any?): kotlin/Boolean // arrow.resilience/Schedule.equals|equals(kotlin.Any?){}[0] - final fun hashCode(): kotlin/Int // arrow.resilience/Schedule.hashCode|hashCode(){}[0] - final fun jittered(kotlin/Double = ..., kotlin/Double = ..., kotlin.random/Random = ...): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.jittered|jittered(kotlin.Double;kotlin.Double;kotlin.random.Random){}[0] - final fun log(kotlin.coroutines/SuspendFunction2<#A, #B, kotlin/Unit>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.log|log(kotlin.coroutines.SuspendFunction2<1:0,1:1,kotlin.Unit>){}[0] - final fun mapDecision(kotlin.coroutines/SuspendFunction1, arrow.resilience/Schedule.Decision<#A, #B>>): arrow.resilience/Schedule<#A, #B> // arrow.resilience/Schedule.mapDecision|mapDecision(kotlin.coroutines.SuspendFunction1,arrow.resilience.Schedule.Decision<1:0,1:1>>){}[0] - final fun toString(): kotlin/String // arrow.resilience/Schedule.toString|toString(){}[0] - final suspend fun <#A1: kotlin/Any?> repeatOrElseEither(kotlin.coroutines/SuspendFunction0<#A>, kotlin.coroutines/SuspendFunction2): arrow.core/Either<#A1, #B> // arrow.resilience/Schedule.repeatOrElseEither|repeatOrElseEither(kotlin.coroutines.SuspendFunction0<1:0>;kotlin.coroutines.SuspendFunction2){0§}[0] - final suspend fun repeat(kotlin.coroutines/SuspendFunction0<#A>): #B // arrow.resilience/Schedule.repeat|repeat(kotlin.coroutines.SuspendFunction0<1:0>){}[0] - final suspend fun repeatOrElse(kotlin.coroutines/SuspendFunction0<#A>, kotlin.coroutines/SuspendFunction2): #B // arrow.resilience/Schedule.repeatOrElse|repeatOrElse(kotlin.coroutines.SuspendFunction0<1:0>;kotlin.coroutines.SuspendFunction2){}[0] - - sealed interface <#A1: in kotlin/Any?, #B1: out kotlin/Any?> Decision { // arrow.resilience/Schedule.Decision|null[0] - abstract val output // arrow.resilience/Schedule.Decision.output|{}output[0] - abstract fun (): #B1 // arrow.resilience/Schedule.Decision.output.|(){}[0] - - open suspend fun <#A2: kotlin/Any?, #B2: kotlin/Any?> and(arrow.resilience/Schedule.Decision<#A1, #A2>, kotlin.coroutines/SuspendFunction2<#B1, #A2, #B2>, kotlin.coroutines/SuspendFunction2): arrow.resilience/Schedule.Decision<#A1, #B2> // arrow.resilience/Schedule.Decision.and|and(arrow.resilience.Schedule.Decision<1:0,0:0>;kotlin.coroutines.SuspendFunction2<1:1,0:0,0:1>;kotlin.coroutines.SuspendFunction2){0§;1§}[0] - open suspend fun <#A2: kotlin/Any?, #B2: kotlin/Any?> andThen(kotlin.coroutines/SuspendFunction1<#A1, arrow.resilience/Schedule.Decision<#A1, #A2>>, kotlin.coroutines/SuspendFunction1<#B1, #B2>, kotlin.coroutines/SuspendFunction1<#A2, #B2>): arrow.resilience/Schedule.Decision<#A1, #B2> // arrow.resilience/Schedule.Decision.andThen|andThen(kotlin.coroutines.SuspendFunction1<1:0,arrow.resilience.Schedule.Decision<1:0,0:0>>;kotlin.coroutines.SuspendFunction1<1:1,0:1>;kotlin.coroutines.SuspendFunction1<0:0,0:1>){0§;1§}[0] - open suspend fun <#A2: kotlin/Any?, #B2: kotlin/Any?> or(arrow.resilience/Schedule.Decision<#A1, #A2>, kotlin.coroutines/SuspendFunction2<#B1?, #A2?, #B2>, kotlin.coroutines/SuspendFunction2): arrow.resilience/Schedule.Decision<#A1, #B2> // arrow.resilience/Schedule.Decision.or|or(arrow.resilience.Schedule.Decision<1:0,0:0>;kotlin.coroutines.SuspendFunction2<1:1?,0:0?,0:1>;kotlin.coroutines.SuspendFunction2){0§;1§}[0] - open suspend fun <#A2: kotlin/Any?> contramap(kotlin.coroutines/SuspendFunction1<#A2, #A1>): arrow.resilience/Schedule.Decision<#A2, #B1> // arrow.resilience/Schedule.Decision.contramap|contramap(kotlin.coroutines.SuspendFunction1<0:0,1:0>){0§}[0] - open suspend fun <#A2: kotlin/Any?> map(kotlin.coroutines/SuspendFunction1<#B1, #A2>): arrow.resilience/Schedule.Decision<#A1, #A2> // arrow.resilience/Schedule.Decision.map|map(kotlin.coroutines.SuspendFunction1<1:1,0:0>){0§}[0] - open suspend fun andThen(kotlin.coroutines/SuspendFunction1<#A1, arrow.resilience/Schedule.Decision<#A1, #B1>>): arrow.resilience/Schedule.Decision<#A1, #B1> // arrow.resilience/Schedule.Decision.andThen|andThen(kotlin.coroutines.SuspendFunction1<1:0,arrow.resilience.Schedule.Decision<1:0,1:1>>){}[0] - open suspend fun delayed(kotlin.coroutines/SuspendFunction2<#B1, kotlin.time/Duration, kotlin.time/Duration>): arrow.resilience/Schedule.Decision<#A1, #B1> // arrow.resilience/Schedule.Decision.delayed|delayed(kotlin.coroutines.SuspendFunction2<1:1,kotlin.time.Duration,kotlin.time.Duration>){}[0] - open suspend fun recursiveMap(kotlin.coroutines/SuspendFunction1, arrow.resilience/Schedule.Decision<#A1, #B1>>): arrow.resilience/Schedule.Decision<#A1, #B1> // arrow.resilience/Schedule.Decision.recursiveMap|recursiveMap(kotlin.coroutines.SuspendFunction1,arrow.resilience.Schedule.Decision<1:0,1:1>>){}[0] - - final class <#A2: in kotlin/Any?, #B2: out kotlin/Any?> Continue : arrow.resilience/Schedule.Decision<#A2, #B2> { // arrow.resilience/Schedule.Decision.Continue|null[0] - constructor (#B2, kotlin.time/Duration, kotlin.coroutines/SuspendFunction1<#A2, arrow.resilience/Schedule.Decision<#A2, #B2>>) // arrow.resilience/Schedule.Decision.Continue.|(1:1;kotlin.time.Duration;kotlin.coroutines.SuspendFunction1<1:0,arrow.resilience.Schedule.Decision<1:0,1:1>>){}[0] - - final val delay // arrow.resilience/Schedule.Decision.Continue.delay|{}delay[0] - final fun (): kotlin.time/Duration // arrow.resilience/Schedule.Decision.Continue.delay.|(){}[0] - final val output // arrow.resilience/Schedule.Decision.Continue.output|{}output[0] - final fun (): #B2 // arrow.resilience/Schedule.Decision.Continue.output.|(){}[0] - final val step // arrow.resilience/Schedule.Decision.Continue.step|{}step[0] - final fun (): kotlin.coroutines/SuspendFunction1<#A2, arrow.resilience/Schedule.Decision<#A2, #B2>> // arrow.resilience/Schedule.Decision.Continue.step.|(){}[0] - - final fun component1(): #B2 // arrow.resilience/Schedule.Decision.Continue.component1|component1(){}[0] - final fun component2(): kotlin.time/Duration // arrow.resilience/Schedule.Decision.Continue.component2|component2(){}[0] - final fun component3(): kotlin.coroutines/SuspendFunction1<#A2, arrow.resilience/Schedule.Decision<#A2, #B2>> // arrow.resilience/Schedule.Decision.Continue.component3|component3(){}[0] - final fun copy(#B2 = ..., kotlin.time/Duration = ..., kotlin.coroutines/SuspendFunction1<#A2, arrow.resilience/Schedule.Decision<#A2, #B2>> = ...): arrow.resilience/Schedule.Decision.Continue<#A2, #B2> // arrow.resilience/Schedule.Decision.Continue.copy|copy(1:1;kotlin.time.Duration;kotlin.coroutines.SuspendFunction1<1:0,arrow.resilience.Schedule.Decision<1:0,1:1>>){}[0] - final fun equals(kotlin/Any?): kotlin/Boolean // arrow.resilience/Schedule.Decision.Continue.equals|equals(kotlin.Any?){}[0] - final fun hashCode(): kotlin/Int // arrow.resilience/Schedule.Decision.Continue.hashCode|hashCode(){}[0] - final fun toString(): kotlin/String // arrow.resilience/Schedule.Decision.Continue.toString|toString(){}[0] - } - - final class <#A2: out kotlin/Any?> Done : arrow.resilience/Schedule.Decision { // arrow.resilience/Schedule.Decision.Done|null[0] - constructor (#A2) // arrow.resilience/Schedule.Decision.Done.|(1:0){}[0] - - final val output // arrow.resilience/Schedule.Decision.Done.output|{}output[0] - final fun (): #A2 // arrow.resilience/Schedule.Decision.Done.output.|(){}[0] - - final fun component1(): #A2 // arrow.resilience/Schedule.Decision.Done.component1|component1(){}[0] - final fun copy(#A2 = ...): arrow.resilience/Schedule.Decision.Done<#A2> // arrow.resilience/Schedule.Decision.Done.copy|copy(1:0){}[0] - final fun equals(kotlin/Any?): kotlin/Boolean // arrow.resilience/Schedule.Decision.Done.equals|equals(kotlin.Any?){}[0] - final fun hashCode(): kotlin/Int // arrow.resilience/Schedule.Decision.Done.hashCode|hashCode(){}[0] - final fun toString(): kotlin/String // arrow.resilience/Schedule.Decision.Done.toString|toString(){}[0] - } - } - - final object Companion { // arrow.resilience/Schedule.Companion|null[0] - final fun <#A2: kotlin/Any?, #B2: kotlin/Any?> unfold(#B2, kotlin.coroutines/SuspendFunction1<#B2, #B2>): arrow.resilience/Schedule<#A2, #B2> // arrow.resilience/Schedule.Companion.unfold|unfold(0:1;kotlin.coroutines.SuspendFunction1<0:1,0:1>){0§;1§}[0] - final fun <#A2: kotlin/Any?> collect(): arrow.resilience/Schedule<#A2, kotlin.collections/List<#A2>> // arrow.resilience/Schedule.Companion.collect|collect(){0§}[0] - final fun <#A2: kotlin/Any?> doUntil(kotlin.coroutines/SuspendFunction2<#A2, #A2, kotlin/Boolean>): arrow.resilience/Schedule<#A2, #A2> // arrow.resilience/Schedule.Companion.doUntil|doUntil(kotlin.coroutines.SuspendFunction2<0:0,0:0,kotlin.Boolean>){0§}[0] - final fun <#A2: kotlin/Any?> doWhile(kotlin.coroutines/SuspendFunction2<#A2, #A2, kotlin/Boolean>): arrow.resilience/Schedule<#A2, #A2> // arrow.resilience/Schedule.Companion.doWhile|doWhile(kotlin.coroutines.SuspendFunction2<0:0,0:0,kotlin.Boolean>){0§}[0] - final fun <#A2: kotlin/Any?> exponential(kotlin.time/Duration, kotlin/Double = ...): arrow.resilience/Schedule<#A2, kotlin.time/Duration> // arrow.resilience/Schedule.Companion.exponential|exponential(kotlin.time.Duration;kotlin.Double){0§}[0] - final fun <#A2: kotlin/Any?> fibonacci(kotlin.time/Duration): arrow.resilience/Schedule<#A2, kotlin.time/Duration> // arrow.resilience/Schedule.Companion.fibonacci|fibonacci(kotlin.time.Duration){0§}[0] - final fun <#A2: kotlin/Any?> forever(): arrow.resilience/Schedule<#A2, kotlin/Long> // arrow.resilience/Schedule.Companion.forever|forever(){0§}[0] - final fun <#A2: kotlin/Any?> identity(): arrow.resilience/Schedule<#A2, #A2> // arrow.resilience/Schedule.Companion.identity|identity(){0§}[0] - final fun <#A2: kotlin/Any?> linear(kotlin.time/Duration): arrow.resilience/Schedule<#A2, kotlin.time/Duration> // arrow.resilience/Schedule.Companion.linear|linear(kotlin.time.Duration){0§}[0] - final fun <#A2: kotlin/Any?> recurs(kotlin/Long): arrow.resilience/Schedule<#A2, kotlin/Long> // arrow.resilience/Schedule.Companion.recurs|recurs(kotlin.Long){0§}[0] - final fun <#A2: kotlin/Any?> spaced(kotlin.time/Duration): arrow.resilience/Schedule<#A2, kotlin/Long> // arrow.resilience/Schedule.Companion.spaced|spaced(kotlin.time.Duration){0§}[0] - } -} - final object arrow.resilience/SagaActionStep // arrow.resilience/SagaActionStep|null[0] final val arrow.resilience.common/platform // arrow.resilience.common/platform|{}platform[0] diff --git a/arrow-libs/resilience/arrow-resilience/src/commonMain/kotlin/arrow/resilience/Schedule.kt b/arrow-libs/resilience/arrow-resilience/src/commonMain/kotlin/arrow/resilience/Schedule.kt index 5217ff4702d..7fff24ee457 100644 --- a/arrow-libs/resilience/arrow-resilience/src/commonMain/kotlin/arrow/resilience/Schedule.kt +++ b/arrow-libs/resilience/arrow-resilience/src/commonMain/kotlin/arrow/resilience/Schedule.kt @@ -6,7 +6,6 @@ import arrow.core.Either import arrow.core.NonFatal import arrow.core.None import arrow.core.Option -import arrow.core.identity import arrow.core.left import arrow.core.merge import arrow.core.nonFatalOrThrow @@ -16,7 +15,6 @@ import arrow.core.raise.fold import arrow.core.right import arrow.core.some import arrow.resilience.Schedule.Companion.identity -import arrow.resilience.Schedule.Decision import arrow.resilience.Schedule.Decision.Continue import arrow.resilience.Schedule.Decision.Done import kotlinx.coroutines.currentCoroutineContext @@ -24,7 +22,6 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.ensureActive import kotlinx.coroutines.flow.retry import kotlin.experimental.ExperimentalTypeInference -import kotlin.jvm.JvmInline import kotlin.math.pow import kotlin.random.Random import kotlin.reflect.KClass @@ -34,7 +31,7 @@ import kotlin.time.Duration.Companion.ZERO import kotlin.time.Duration.Companion.nanoseconds public typealias ScheduleStep = - suspend (Input) -> Decision + suspend (Input) -> Schedule.Decision /** * A [Schedule] describes how a `suspend fun` should [retry] or [repeat]. @@ -44,8 +41,11 @@ public typealias ScheduleStep = * (and if so, the `delay` until the next attempt), * or if the [Schedule] is [Done] retrying or repeating. */ -@JvmInline -public value class Schedule(public val step: ScheduleStep) { +public fun interface Schedule { + + public suspend operator fun invoke(input: Input): Decision + + public val step: ScheduleStep get() = this::invoke /** Repeat the schedule, and uses [block] as [Input] for the [step] function. */ public suspend fun repeat(block: suspend () -> Input): Output = @@ -522,7 +522,7 @@ public suspend inline fun Raise.retry( schedule: Schedule, @BuilderInference action: Raise.() -> Result, ): Result { - var step: ScheduleStep = schedule.step + var step = schedule.step while (true) { currentCoroutineContext().ensureActive() diff --git a/gradle.properties b/gradle.properties index b427106fc2d..2b2fb21bc9b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,7 @@ projects.group=io.arrow-kt projects.version=2.0.0-SNAPSHOT enable_wasm=true +ksp.useKSP2=true # Pomfile definitions #RELEASE_SIGNING_ENABLED=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 80163af526b..1dabf7855c3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,19 +6,19 @@ classgraph = "4.8.177" dokka = "1.9.20" kotest = "5.9.1" kover = "0.8.3" -kotlin = "2.0.21" +kotlin = "2.1.0-RC" kotlinBinaryCompatibilityValidator = "0.16.3" kotlinCompileTesting = "0.5.1" knit = "0.5.0" -kspVersion = "2.0.21-1.0.25" +kspVersion = "2.1.0-Beta2-1.0.26" kotlinxSerialization = "1.7.3" mockWebServer = "4.12.0" retrofit = "2.11.0" moshi = "1.15.1" spotlessVersion = "6.25.0" -compose = "1.7.4" +compose = "1.7.5" composePlugin = "1.7.0" -agp = "8.7.1" +agp = "8.7.2" android-compileSdk = "34" cache4k = "0.13.0" publish="0.30.0"