Skip to content

Commit

Permalink
Feature/remove validated (#2795)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Vergauwen <[email protected]>
Co-authored-by: Alejandro Serrano <[email protected]>
  • Loading branch information
3 people authored Dec 5, 2022
1 parent 48c7bd5 commit fbba669
Show file tree
Hide file tree
Showing 134 changed files with 1,325 additions and 4,809 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

Arrow aims to provide a [*lingua franca*](https://en.wikipedia.org/wiki/Lingua_franca) of interfaces
and abstractions across Kotlin libraries. For this, it includes the most popular data types such
as `Option`, `Either`, `Validated` etc and functional operators such as `traverse` and computation
as `Option`, `Either` etc and functional operators such as `traverse` and computation
blocks to empower users to write pure FP apps and libraries built atop higher order abstractions.

Use the list below to learn more about Λrrow's main features.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public expect fun <A> Atomic(initialValue: A): Atomic<A>
* import arrow.atomic.Atomic
* import arrow.atomic.update
* import arrow.fx.coroutines.parTraverse
*
* suspend fun main() {
* val count = Atomic(0)
* (0 until 20_000).parTraverse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package arrow.atomic.examples.exampleAtomic01
import arrow.atomic.Atomic
import arrow.atomic.update
import arrow.fx.coroutines.parTraverse

suspend fun main() {
val count = Atomic(0)
(0 until 20_000).parTraverse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal object Reset {
* The usage of `try { ... } catch(e: Throwable) { ... }` will catch the [ShortCircuit] error,
* and will lead to recover of short-circuiting.
* You should always prefer to catch the most specific exception class, or
* use `Either.catch`, `Validated.catch` etc or `e.nonFatalOrThrow()`
* use `Either.catch` etc or `e.nonFatalOrThrow()`
* to ensure you're not catching `ShortCircuit`.
*/
@Deprecated(deprecateArrowContinuation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package arrow.continuations.generic
* A [Throwable] class intended for control flow.
* Instance of [ControlThrowable] should **not** be caught,
* and `arrow.core.NonFatal` does not catch this [Throwable].
* Thus by extension `Either.catch` and `Validated.catch` also don't catch [ControlThrowable].
* Thus by extension `Either.catch` also don't catch [ControlThrowable].
*/
@Deprecated(deprecateArrowContinuation)
public expect open class ControlThrowable() : Throwable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package arrow.continuations.generic
* A [Throwable] class intended for control flow.
* Instance of [ControlThrowable.kt] should **not** be caught,
* and `arrow.core.NonFatal` does not catch this [Throwable].
* Thus by extension `Either.catch` and `Validated.catch` also don't catch [ControlThrowable.kt].
* Thus by extension `Either.catch` also don't catch [ControlThrowable.kt].
*/
@Deprecated(deprecateArrowContinuation)
public actual open class ControlThrowable : Throwable()
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package arrow.continuations.generic
* A [Throwable] class intended for control flow.
* Instance of [ControlThrowable.kt] should **not** be caught,
* and `arrow.core.NonFatal` does not catch this [Throwable].
* Thus by extension `Either.catch` and `Validated.catch` also don't catch [ControlThrowable.kt].
* Thus by extension `Either.catch` also don't catch [ControlThrowable.kt].
*/
@Deprecated(deprecateArrowContinuation)
public actual open class ControlThrowable : Throwable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package arrow.continuations.generic
* A [Throwable] class intended for control flow.
* Instance of [ControlThrowable] should **not** be caught,
* and `arrow.core.NonFatal` does not catch this [Throwable].
* Thus by extension `Either.catch` and `Validated.catch` also don't catch [ControlThrowable].
* Thus by extension `Either.catch` also don't catch [ControlThrowable].
*/
@Deprecated(deprecateArrowContinuation)
public actual open class ControlThrowable : Throwable()
1 change: 0 additions & 1 deletion arrow-libs/core/arrow-core-test/api/arrow-core-test.api
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ public final class arrow/core/test/generators/GeneratorsKt {
public static final fun tuple8 (Lio/kotest/property/Arb$Companion;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;)Lio/kotest/property/Arb;
public static final fun tuple9 (Lio/kotest/property/Arb$Companion;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;Lio/kotest/property/Arb;)Lio/kotest/property/Arb;
public static final fun unit (Lio/kotest/property/Arb$Companion;)Lio/kotest/property/Arb;
public static final fun validated (Lio/kotest/property/Arb$Companion;Lio/kotest/property/Arb;Lio/kotest/property/Arb;)Lio/kotest/property/Arb;
}

public final class arrow/core/test/generators/UtilsKt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import arrow.core.Tuple6
import arrow.core.Tuple7
import arrow.core.Tuple8
import arrow.core.Tuple9
import arrow.core.Validated
import arrow.core.left
import arrow.core.right
import arrow.core.test.concurrency.deprecateArrowTestModules
Expand Down Expand Up @@ -220,10 +219,6 @@ public fun <E, A> Arb.Companion.either(arbE: Arb<E>, arbA: Arb<A>): Arb<Either<E
@Deprecated(deprecateArrowTestModules)
public fun <E, A> Arb<E>.or(arbA: Arb<A>): Arb<Either<E, A>> = Arb.either(this, arbA)

@Deprecated(deprecateArrowTestModules)
public fun <E, A> Arb.Companion.validated(arbE: Arb<E>, arbA: Arb<A>): Arb<Validated<E, A>> =
Arb.either(arbE, arbA).map { Validated.fromEither(it) }

@Deprecated(deprecateArrowTestModules)
public fun Arb.Companion.unit(): Arb<Unit> =
Arb.constant(Unit)
Expand Down
Loading

0 comments on commit fbba669

Please sign in to comment.