From 1afb65a74da58897f93ddd51c98ed14332a6eb48 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 20:38:20 +0000 Subject: [PATCH 1/6] Prepare Swift interface update From 1b06711bd92ae3f065bdc7120e890e6837c1b302 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 07:06:06 +0200 Subject: [PATCH 2/6] Update tvos Swift interfaces (#4) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .agents/interfaces/tvos/Either.swiftinterface | 25 + .../tvos/FunctionComposition.swiftinterface | 8 + ...unctionCompositionOperators.swiftinterface | 117 +++ .../tvos/NominalFunctionTypes.swiftinterface | 336 +++++++ ...nalFunctionTypesComposition.swiftinterface | 9 + ...onTypesCompositionFunctions.swiftinterface | 934 ++++++++++++++++++ ...tionTypesCompositionMethods.swiftinterface | 733 ++++++++++++++ ...onTypesCompositionOperators.swiftinterface | 694 +++++++++++++ .../interfaces/tvos/_Currying.swiftinterface | 144 +++ 9 files changed, 3000 insertions(+) create mode 100644 .agents/interfaces/tvos/Either.swiftinterface create mode 100644 .agents/interfaces/tvos/FunctionComposition.swiftinterface create mode 100644 .agents/interfaces/tvos/FunctionCompositionOperators.swiftinterface create mode 100644 .agents/interfaces/tvos/NominalFunctionTypes.swiftinterface create mode 100644 .agents/interfaces/tvos/NominalFunctionTypesComposition.swiftinterface create mode 100644 .agents/interfaces/tvos/NominalFunctionTypesCompositionFunctions.swiftinterface create mode 100644 .agents/interfaces/tvos/NominalFunctionTypesCompositionMethods.swiftinterface create mode 100644 .agents/interfaces/tvos/NominalFunctionTypesCompositionOperators.swiftinterface create mode 100644 .agents/interfaces/tvos/_Currying.swiftinterface diff --git a/.agents/interfaces/tvos/Either.swiftinterface b/.agents/interfaces/tvos/Either.swiftinterface new file mode 100644 index 0000000..156e275 --- /dev/null +++ b/.agents/interfaces/tvos/Either.swiftinterface @@ -0,0 +1,25 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-tvos13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name Either -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +public enum Either { + case left(Left) + case right(Right) +} +extension Either.Either : Swift.Equatable where Left : Swift.Equatable, Right : Swift.Equatable { + @_semantics("derived_enum_equals") @_implements(Swift.Equatable, ==(_:_:)) public static func __derived_enum_equals(_ a: Either.Either, _ b: Either.Either) -> Swift.Bool +} +extension Either.Either : Swift.Hashable where Left : Swift.Hashable, Right : Swift.Hashable { + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension Either.Either : Swift.Sendable where Left : Swift.Sendable, Right : Swift.Sendable { +} +extension Either.Either : Swift.Error where Left : Swift.Error, Right : Swift.Error { +} diff --git a/.agents/interfaces/tvos/FunctionComposition.swiftinterface b/.agents/interfaces/tvos/FunctionComposition.swiftinterface new file mode 100644 index 0000000..d10373b --- /dev/null +++ b/.agents/interfaces/tvos/FunctionComposition.swiftinterface @@ -0,0 +1,8 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-tvos13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name FunctionComposition -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims diff --git a/.agents/interfaces/tvos/FunctionCompositionOperators.swiftinterface b/.agents/interfaces/tvos/FunctionCompositionOperators.swiftinterface new file mode 100644 index 0000000..5af96d3 --- /dev/null +++ b/.agents/interfaces/tvos/FunctionCompositionOperators.swiftinterface @@ -0,0 +1,117 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-tvos13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name FunctionCompositionOperators -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +infix operator <| : infixr0 +infix operator |> : infixl1 +infix operator >>> : infixr9 +infix operator <<< : infixr9 +infix operator <¢> : infixl4 +infix operator ¢> : infixl4 +infix operator <¢ : infixl4 +infix operator <£> : infixl1 +infix operator >¢< : infixl4 +infix operator >£< : infixl4 +infix operator <|> : infixl3 +infix operator <*> : infixl4 +infix operator *> : infixl4 +infix operator <* : infixl4 +infix operator <%> : infixr4 +infix operator %> : infixr4 +infix operator <% : infixr4 +infix operator >=> : infixr1 +infix operator <=< : infixr1 +infix operator <> : infixr5 +prefix operator <> +postfix operator <> +precedencegroup HashRocket { + associativity: left + higherThan: infixr5 +} +infix operator => : HashRocket +precedencegroup infixl0 { + associativity: left + higherThan: AssignmentPrecedence +} +precedencegroup infixr0 { + associativity: right + higherThan: infixl0 +} +precedencegroup infixl1 { + associativity: left + higherThan: infixr0 +} +precedencegroup infixr1 { + associativity: right + higherThan: infixl1 +} +precedencegroup infixl2 { + associativity: left + higherThan: infixr1 +} +precedencegroup infixr2 { + associativity: right + higherThan: infixl2 +} +precedencegroup infixl3 { + associativity: left + higherThan: infixr2 +} +precedencegroup infixr3 { + associativity: right + higherThan: infixl3 +} +precedencegroup infixl4 { + associativity: left + higherThan: infixr3 +} +precedencegroup infixr4 { + associativity: right + higherThan: infixl4 +} +precedencegroup infixl5 { + associativity: left + higherThan: infixr4 +} +precedencegroup infixr5 { + associativity: right + higherThan: infixl5 + lowerThan: AdditionPrecedence +} +precedencegroup infixl6 { + associativity: left + higherThan: infixr5 +} +precedencegroup infixr6 { + associativity: right + higherThan: infixl6 + lowerThan: MultiplicationPrecedence +} +precedencegroup infixl7 { + associativity: left + higherThan: infixr6 +} +precedencegroup infixr7 { + associativity: right + higherThan: infixl7 +} +precedencegroup infixl8 { + associativity: left + higherThan: infixr7 +} +precedencegroup infixr8 { + associativity: right + higherThan: infixl8 +} +precedencegroup infixl9 { + associativity: left + higherThan: infixr8 +} +precedencegroup infixr9 { + associativity: right + higherThan: infixl9 +} diff --git a/.agents/interfaces/tvos/NominalFunctionTypes.swiftinterface b/.agents/interfaces/tvos/NominalFunctionTypes.swiftinterface new file mode 100644 index 0000000..270fd76 --- /dev/null +++ b/.agents/interfaces/tvos/NominalFunctionTypes.swiftinterface @@ -0,0 +1,336 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-tvos13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypes -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import ConcurrencyExtras +@_exported import Either +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +public protocol AsyncFunction : NominalFunctionTypes.AsyncThrowingFunction where Self.Failure == Swift.Never { + func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +extension NominalFunctionTypes.AsyncFunction { + @inlinable public func run(with input: Self.Input) async throws(Swift.Never) -> Self.Output { + return await run(with: input) + } +} +public struct AsyncFunc : NominalFunctionTypes.AsyncFunction { + @usableFromInline + internal var call: (Input) async -> Output + public init(_ call: @escaping (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async -> Output { + return await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableAsyncFunc + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.AsyncFunc where Input == () { + @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +public protocol _MainActorAsyncFunction : NominalFunctionTypes._MainActorAsyncThrowingFunction where Self.Failure == Swift.Never { + @_Concurrency.MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct MainActorAsyncFunc : NominalFunctionTypes._MainActorAsyncFunction, @_Concurrency.MainActor NominalFunctionTypes.AsyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) async -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorAsyncFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) async -> Output { + await call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.MainActorAsyncFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +public struct SendableAsyncFunc : NominalFunctionTypes.AsyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @Sendable (Input) async -> Output + public init(_ call: @escaping @Sendable (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async -> Output { + return await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SendableAsyncFunc where Input == () { + @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +extension NominalFunctionTypes.SendableAsyncFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorAsyncFunc { + MainActorAsyncFunc(call) + } +} +public protocol AsyncThrowingFunction : NominalFunctionTypes._NominalFunctionType { + associatedtype Failure : Swift.Error + func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct AsyncThrowingFunc : NominalFunctionTypes.AsyncThrowingFunction where Failure : Swift.Error { + @usableFromInline + internal var call: (Input) async throws(Failure) -> Output + public init(_ call: @escaping (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncThrowingFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableAsyncThrowingFunc +} +extension NominalFunctionTypes.AsyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +public protocol _MainActorAsyncThrowingFunction : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { + associatedtype Failure : Swift.Error + @_Concurrency.MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct MainActorAsyncThrowingFunc : NominalFunctionTypes._MainActorAsyncThrowingFunction, @_Concurrency.MainActor NominalFunctionTypes.AsyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) async throws(Failure) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorAsyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } +} +extension NominalFunctionTypes.MainActorAsyncThrowingFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +public struct SendableAsyncThrowingFunc : NominalFunctionTypes.AsyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @Sendable (Input) async throws(Failure) -> Output + public init(_ call: @escaping @Sendable (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } +} +extension NominalFunctionTypes.SendableAsyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +extension NominalFunctionTypes.SendableAsyncThrowingFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorAsyncThrowingFunc { + MainActorAsyncThrowingFunc(call) + } +} +public protocol _MainActorSyncFunction : NominalFunctionTypes._MainActorAsyncFunction, NominalFunctionTypes._MainActorSyncThrowingFunction { + @_Concurrency.MainActor func run(with input: Self.Input) -> Self.Output +} +public struct MainActorSyncFunc : NominalFunctionTypes._MainActorSyncFunction, @_Concurrency.MainActor NominalFunctionTypes.SyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorSyncFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.MainActorSyncFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +public struct SendableSyncFunc : NominalFunctionTypes.SyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @Sendable (Input) -> Output + public init(_ call: @escaping @Sendable (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SendableSyncFunc where Input == () { + @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +extension NominalFunctionTypes.SendableSyncFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorSyncFunc { + MainActorSyncFunc(call) + } +} +public protocol SyncFunction : NominalFunctionTypes.AsyncFunction, NominalFunctionTypes.SyncThrowingFunction { + func run(with input: Self.Input) -> Self.Output +} +extension NominalFunctionTypes.SyncFunction { + @inlinable public func syncRun(with input: Self.Input) -> Self.Output { + return run(with: input) + } + @inlinable public func run(with input: Self.Input) async -> Self.Output { + return syncRun(with: input) + } + @inlinable public func run(with input: Self.Input) throws(Self.Failure) -> Self.Output { + return run(with: input) + } +} +public struct SyncFunc : NominalFunctionTypes.SyncFunction { + @usableFromInline + internal var call: (Input) -> Output + public init(_ call: @escaping (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableSyncFunc + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SyncFunc where Input == () { + @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +public protocol _MainActorSyncThrowingFunction : NominalFunctionTypes._MainActorAsyncThrowingFunction { + @_Concurrency.MainActor func run(with input: Self.Input) throws(Self.Failure) -> Self.Output +} +public struct MainActorSyncThrowingFunc : NominalFunctionTypes._MainActorSyncThrowingFunction, @_Concurrency.MainActor NominalFunctionTypes.SyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) throws(Failure) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorSyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try call(input) + } +} +extension NominalFunctionTypes.MainActorSyncThrowingFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +public struct SendableSyncThrowingFunc : NominalFunctionTypes.SyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @Sendable (Input) throws(Failure) -> Output + public init(_ call: @escaping @Sendable (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @inlinable public func callAsFunction(_ input: Input) throws(Failure) -> Output { + return try call(input) + } +} +extension NominalFunctionTypes.SendableSyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +extension NominalFunctionTypes.SendableSyncThrowingFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorSyncThrowingFunc { + MainActorSyncThrowingFunc(call) + } +} +public protocol SyncThrowingFunction : NominalFunctionTypes.AsyncThrowingFunction { + func run(with input: Self.Input) throws(Self.Failure) -> Self.Output +} +extension NominalFunctionTypes.SyncThrowingFunction { + @inlinable public func syncRun(with input: Self.Input) throws(Self.Failure) -> Self.Output { + return try run(with: input) + } + @inlinable public func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output { + return try syncRun(with: input) + } +} +public struct SyncThrowingFunc : NominalFunctionTypes.SyncThrowingFunction where Failure : Swift.Error { + @usableFromInline + internal var call: (Input) throws(Failure) -> Output + public init(_ call: @escaping (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncThrowingFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @inlinable public func callAsFunction(_ input: Input) throws(Failure) -> Output { + return try call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableSyncThrowingFunc +} +extension NominalFunctionTypes.SyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +public protocol _AnyNominalFunctionType { +} +public protocol _NominalFunctionType : NominalFunctionTypes._AnyNominalFunctionType { + associatedtype Input + associatedtype Output +} +public protocol _MainActorNominalFunctionTypeMarker { + associatedtype Input + associatedtype Output +} +extension NominalFunctionTypes.MainActorAsyncFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorAsyncThrowingFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorSyncFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorSyncThrowingFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} diff --git a/.agents/interfaces/tvos/NominalFunctionTypesComposition.swiftinterface b/.agents/interfaces/tvos/NominalFunctionTypesComposition.swiftinterface new file mode 100644 index 0000000..e99976e --- /dev/null +++ b/.agents/interfaces/tvos/NominalFunctionTypesComposition.swiftinterface @@ -0,0 +1,9 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-tvos13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesComposition -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +@_exported import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims diff --git a/.agents/interfaces/tvos/NominalFunctionTypesCompositionFunctions.swiftinterface b/.agents/interfaces/tvos/NominalFunctionTypesCompositionFunctions.swiftinterface new file mode 100644 index 0000000..766b68a --- /dev/null +++ b/.agents/interfaces/tvos/NominalFunctionTypesCompositionFunctions.swiftinterface @@ -0,0 +1,934 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-tvos13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionFunctions -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Either +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F3 : NominalFunctionTypes._MainActorAsyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F3 : NominalFunctionTypes._MainActorSyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + SendableSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F3 : NominalFunctionTypes.AsyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F3 : NominalFunctionTypes.SyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F1.Input == F0.Output { + AsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { + AsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F3 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F1.Input == F0.Output { + SyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { + SyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F3 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F2 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F3 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F2 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F3 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + MainActorSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + MainActorSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + SendableSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + SendableAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SendableAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + SendableSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SendableSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input { + AsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { + AsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F3 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F3 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input { + SyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { + SyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F3 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F3 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input { + AsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { + AsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F3 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + AsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input { + SyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { + SyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F3 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} diff --git a/.agents/interfaces/tvos/NominalFunctionTypesCompositionMethods.swiftinterface b/.agents/interfaces/tvos/NominalFunctionTypesCompositionMethods.swiftinterface new file mode 100644 index 0000000..cde888a --- /dev/null +++ b/.agents/interfaces/tvos/NominalFunctionTypesCompositionMethods.swiftinterface @@ -0,0 +1,733 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-tvos13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionMethods -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorAsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes._MainActorAsyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorSyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes._MainActorSyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncFunc where B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncFunc where B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, Self.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncFunc where B : NominalFunctionTypes.AsyncFunction, Self.Input == B.Output { + AsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, Self.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncFunc where B : NominalFunctionTypes.SyncFunction, Self.Input == B.Output { + SyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorAsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes._MainActorAsyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorSyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes._MainActorSyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Output == A.Input { + SendableAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Output == A.Input { + SendableSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, Self.Output == A.Input { + AsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { + AsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, Self.Output == A.Input { + AsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, Self.Output == A.Input { + SyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { + SyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, Self.Output == A.Input { + SyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} diff --git a/.agents/interfaces/tvos/NominalFunctionTypesCompositionOperators.swiftinterface b/.agents/interfaces/tvos/NominalFunctionTypesCompositionOperators.swiftinterface new file mode 100644 index 0000000..71d2624 --- /dev/null +++ b/.agents/interfaces/tvos/NominalFunctionTypesCompositionOperators.swiftinterface @@ -0,0 +1,694 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-tvos13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionOperators -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +@_exported import FunctionCompositionOperators +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func <| (f: F, input: F.Input) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes.AsyncThrowingFunction { + return try await f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) async -> F.Output where F : NominalFunctionTypes.AsyncFunction { + return await f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) throws(F.Failure) -> F.Output where F : NominalFunctionTypes.SyncThrowingFunction { + return try f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) -> F.Output where F : NominalFunctionTypes.SyncFunction { + return f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes.AsyncThrowingFunction { + return try await f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) async -> F.Output where F : NominalFunctionTypes.AsyncFunction { + return await f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) throws(F.Failure) -> F.Output where F : NominalFunctionTypes.SyncThrowingFunction { + return try f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) -> F.Output where F : NominalFunctionTypes.SyncFunction { + return f.run(with: input) +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, B : NominalFunctionTypes.AsyncFunction, A.Input == B.Output { + AsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, B : NominalFunctionTypes.SyncFunction, A.Input == B.Output { + SyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, B : NominalFunctionTypes.AsyncFunction, A.Input == B.Output { + AsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, B : NominalFunctionTypes.SyncFunction, A.Input == B.Output { + SyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} diff --git a/.agents/interfaces/tvos/_Currying.swiftinterface b/.agents/interfaces/tvos/_Currying.swiftinterface new file mode 100644 index 0000000..f774d1e --- /dev/null +++ b/.agents/interfaces/tvos/_Currying.swiftinterface @@ -0,0 +1,144 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-tvos13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name _Currying -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func curry(_ function: @escaping (A, B) -> C) -> (A) -> (B) -> C { + return { (a: A) -> (B) -> C in + { (b: B) -> C in + function(a, b) + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C) -> D) -> (A) -> (B) -> (C) -> D { + return { (a: A) -> (B) -> (C) -> D in + { (b: B) -> (C) -> D in + { (c: C) -> D in + function(a, b, c) + } + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C, D) -> E) -> (A) -> (B) -> (C) -> (D) -> E { + return { (a: A) -> (B) -> (C) -> (D) -> E in + { (b: B) -> (C) -> (D) -> E in + { (c: C) -> (D) -> E in + { (d: D) -> E in + function(a, b, c, d) + } + } + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C, D, E) -> F) -> (A) -> (B) -> (C) -> (D) -> (E) -> F { + return { (a: A) -> (B) -> (C) -> (D) -> (E) -> F in + { (b: B) -> (C) -> (D) -> (E) -> F in + { (c: C) -> (D) -> (E) -> F in + { (d: D) -> (E) -> F in + { (e: E) -> F in + function(a, b, c, d, e) + } + } + } + } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> C) -> (B) -> (A) -> C { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> D) -> (B) -> (A) -> (C) -> D { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (B) -> (A) -> (C) -> (D) -> E { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (B) -> (A) -> (C) -> (D) -> (E) -> F { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> D) -> (A) -> (C) -> (B) -> D { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A) -> (C) -> (B) -> (D) -> E { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (C) -> (B) -> (D) -> (E) -> F { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip3(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A) -> (B) -> (D) -> (C) -> E { + return { a in + { b in + { d in + { c in + f(a)(b)(c)(d) + } + } + } + } +} +@inlinable public func flip3(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (B) -> (D) -> (C) -> (E) -> F { + return { a in + { b in + { d in + { c in + f(a)(b)(c)(d) + } + } + } + } +} +@inlinable public func flip4(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (B) -> (C) -> (E) -> (D) -> F { + return { a in + { b in + { c in + { e in + { d in + f(a)(b)(c)(d)(e) + } + } + } + } + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> C) -> (A, B) -> C { + return { a, b in + _f(a)(b) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> D) -> (A, B, C) -> D { + return { a, b, c in + _f(a)(b)(c) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A, B, C, D) -> E { + return { a, b, c, d in + _f(a)(b)(c)(d) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A, B, C, D, E) -> F { + return { a, b, c, d, e in + _f(a)(b)(c)(d)(e) + } +} From 46502ccfbba0357b064cefb090b6d06678624518 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 07:06:09 +0200 Subject: [PATCH 3/6] Update macos Swift interfaces (#5) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../interfaces/macos/Either.swiftinterface | 20 +- .../macos/FunctionComposition.swiftinterface | 6 +- ...unctionCompositionOperators.swiftinterface | 6 +- .../macos/NominalFunctionTypes.swiftinterface | 200 ++++++------- ...nalFunctionTypesComposition.swiftinterface | 6 +- ...onTypesCompositionFunctions.swiftinterface | 270 +++++++++--------- ...tionTypesCompositionMethods.swiftinterface | 190 ++++++------ ...onTypesCompositionOperators.swiftinterface | 142 ++++----- .../interfaces/macos/_Currying.swiftinterface | 6 +- 9 files changed, 423 insertions(+), 423 deletions(-) diff --git a/.agents/interfaces/macos/Either.swiftinterface b/.agents/interfaces/macos/Either.swiftinterface index be28074..f919294 100644 --- a/.agents/interfaces/macos/Either.swiftinterface +++ b/.agents/interfaces/macos/Either.swiftinterface @@ -1,7 +1,7 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.4 (swiftlang-6.4.0.25.4 clang-2100.3.25.1) -// swift-module-flags: -target arm64-apple-macos12.0 -enable-objc-interop -language-mode 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name Either -package-name swift_function_composition -// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.4 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-macosx10.15 -enable-objc-interop -swift-version 6 -O -module-name Either -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 import Swift import _Concurrency import _StringProcessing @@ -10,16 +10,16 @@ public enum Either { case left(Left) case right(Right) } -extension Either::Either : Swift::Equatable where Left : Swift::Equatable, Right : Swift::Equatable { - @_semantics("derived_enum_equals") @_implements(Swift::Equatable, ==(_:_:)) public static func __derived_enum_equals(_ a: Either::Either, _ b: Either::Either) -> Swift::Bool +extension Either.Either : Swift.Equatable where Left : Swift.Equatable, Right : Swift.Equatable { + @_semantics("derived_enum_equals") @_implements(Swift.Equatable, ==(_:_:)) public static func __derived_enum_equals(_ a: Either.Either, _ b: Either.Either) -> Swift.Bool } -extension Either::Either : Swift::Hashable where Left : Swift::Hashable, Right : Swift::Hashable { - public func hash(into hasher: inout Swift::Hasher) - public var hashValue: Swift::Int { +extension Either.Either : Swift.Hashable where Left : Swift.Hashable, Right : Swift.Hashable { + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { get } } -extension Either::Either : Swift::Sendable where Left : Swift::Sendable, Right : Swift::Sendable { +extension Either.Either : Swift.Sendable where Left : Swift.Sendable, Right : Swift.Sendable { } -extension Either::Either : Swift::Error where Left : Swift::Error, Right : Swift::Error { +extension Either.Either : Swift.Error where Left : Swift.Error, Right : Swift.Error { } diff --git a/.agents/interfaces/macos/FunctionComposition.swiftinterface b/.agents/interfaces/macos/FunctionComposition.swiftinterface index 204f416..a153251 100644 --- a/.agents/interfaces/macos/FunctionComposition.swiftinterface +++ b/.agents/interfaces/macos/FunctionComposition.swiftinterface @@ -1,7 +1,7 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.4 (swiftlang-6.4.0.25.4 clang-2100.3.25.1) -// swift-module-flags: -target arm64-apple-macos12.0 -enable-objc-interop -language-mode 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name FunctionComposition -package-name swift_function_composition -// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.4 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-macosx10.15 -enable-objc-interop -swift-version 6 -O -module-name FunctionComposition -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 import Swift import _Concurrency import _StringProcessing diff --git a/.agents/interfaces/macos/FunctionCompositionOperators.swiftinterface b/.agents/interfaces/macos/FunctionCompositionOperators.swiftinterface index 34ca01a..5ddbdf1 100644 --- a/.agents/interfaces/macos/FunctionCompositionOperators.swiftinterface +++ b/.agents/interfaces/macos/FunctionCompositionOperators.swiftinterface @@ -1,7 +1,7 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.4 (swiftlang-6.4.0.25.4 clang-2100.3.25.1) -// swift-module-flags: -target arm64-apple-macos12.0 -enable-objc-interop -language-mode 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name FunctionCompositionOperators -package-name swift_function_composition -// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.4 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-macosx10.15 -enable-objc-interop -swift-version 6 -O -module-name FunctionCompositionOperators -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 import Swift import _Concurrency import _StringProcessing diff --git a/.agents/interfaces/macos/NominalFunctionTypes.swiftinterface b/.agents/interfaces/macos/NominalFunctionTypes.swiftinterface index a8c4fd1..ec1d7ff 100644 --- a/.agents/interfaces/macos/NominalFunctionTypes.swiftinterface +++ b/.agents/interfaces/macos/NominalFunctionTypes.swiftinterface @@ -1,26 +1,26 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.4 (swiftlang-6.4.0.25.4 clang-2100.3.25.1) -// swift-module-flags: -target arm64-apple-macos12.0 -enable-objc-interop -language-mode 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name NominalFunctionTypes -package-name swift_function_composition -// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.4 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-macosx10.15 -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypes -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 import ConcurrencyExtras @_exported import Either import Swift import _Concurrency import _StringProcessing import _SwiftConcurrencyShims -public protocol AsyncFunction : NominalFunctionTypes::AsyncThrowingFunction where Self.Failure == Swift::Never { +public protocol AsyncFunction : NominalFunctionTypes.AsyncThrowingFunction where Self.Failure == Swift.Never { func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output } -extension NominalFunctionTypes::AsyncFunction { - @inlinable public func run(with input: Self.Input) async throws(Swift::Never) -> Self.Output { +extension NominalFunctionTypes.AsyncFunction { + @inlinable public func run(with input: Self.Input) async throws(Swift.Never) -> Self.Output { return await run(with: input) } } -public struct AsyncFunc : NominalFunctionTypes::AsyncFunction { +public struct AsyncFunc : NominalFunctionTypes.AsyncFunction { @usableFromInline internal var call: (Input) async -> Output public init(_ call: @escaping (Input) async -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::AsyncFunction) { + @inlinable public init(_ f: any NominalFunctionTypes.AsyncFunction) { self.init(f.run) } @inlinable public func run(with input: Input) async -> Output { @@ -29,42 +29,42 @@ public struct AsyncFunc : NominalFunctionTypes::AsyncFunction { @inlinable public func callAsFunction(_ input: Input) async -> Output { return await call(input) } - public func uncheckedSendable() -> NominalFunctionTypes::SendableAsyncFunc - public typealias Failure = Swift::Never + public func uncheckedSendable() -> NominalFunctionTypes.SendableAsyncFunc + public typealias Failure = Swift.Never } -extension NominalFunctionTypes::AsyncFunc where Input == () { +extension NominalFunctionTypes.AsyncFunc where Input == () { @inlinable public func callAsFunction() async -> Output { return await call(()) } } -public protocol _MainActorAsyncFunction : NominalFunctionTypes::_MainActorAsyncThrowingFunction where Self.Failure == Swift::Never { - @_Concurrency::MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +public protocol _MainActorAsyncFunction : NominalFunctionTypes._MainActorAsyncThrowingFunction where Self.Failure == Swift.Never { + @_Concurrency.MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output } -public struct MainActorAsyncFunc : NominalFunctionTypes::_MainActorAsyncFunction, @_Concurrency::MainActor NominalFunctionTypes::AsyncFunction, Swift::Sendable { +public struct MainActorAsyncFunc : NominalFunctionTypes._MainActorAsyncFunction, @_Concurrency.MainActor NominalFunctionTypes.AsyncFunction, Swift.Sendable { @usableFromInline - internal var call: @_Concurrency::MainActor @Sendable (Input) async -> Output - public init(_ call: @escaping @_Concurrency::MainActor @Sendable (Input) async -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::_MainActorAsyncFunction & Swift::Sendable) { + internal var call: @_Concurrency.MainActor @Sendable (Input) async -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorAsyncFunction & Swift.Sendable) { self.init(f.run) } - @_Concurrency::MainActor @inlinable public func run(with input: Input) async -> Output { + @_Concurrency.MainActor @inlinable public func run(with input: Input) async -> Output { await call(input) } - @_Concurrency::MainActor @inlinable public func callAsFunction(_ input: Input) async -> Output { + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async -> Output { return await call(input) } - public typealias Failure = Swift::Never + public typealias Failure = Swift.Never } -extension NominalFunctionTypes::MainActorAsyncFunc where Input == () { - @_Concurrency::MainActor @inlinable public func callAsFunction() async -> Output { +extension NominalFunctionTypes.MainActorAsyncFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() async -> Output { return await call(()) } } -public struct SendableAsyncFunc : NominalFunctionTypes::AsyncFunction, Swift::Sendable { +public struct SendableAsyncFunc : NominalFunctionTypes.AsyncFunction, Swift.Sendable { @usableFromInline internal var call: @Sendable (Input) async -> Output public init(_ call: @escaping @Sendable (Input) async -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::AsyncFunction & Swift::Sendable) { + @inlinable public init(_ f: any NominalFunctionTypes.AsyncFunction & Swift.Sendable) { self.init(f.run) } @inlinable public func run(with input: Input) async -> Output { @@ -73,27 +73,27 @@ public struct SendableAsyncFunc : NominalFunctionTypes::AsyncFunc @inlinable public func callAsFunction(_ input: Input) async -> Output { return await call(input) } - public typealias Failure = Swift::Never + public typealias Failure = Swift.Never } -extension NominalFunctionTypes::SendableAsyncFunc where Input == () { +extension NominalFunctionTypes.SendableAsyncFunc where Input == () { @inlinable public func callAsFunction() async -> Output { return await call(()) } } -extension NominalFunctionTypes::SendableAsyncFunc where Input : Swift::Sendable, Output : Swift::Sendable { - @inlinable public func mainActor() -> NominalFunctionTypes::MainActorAsyncFunc { +extension NominalFunctionTypes.SendableAsyncFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorAsyncFunc { MainActorAsyncFunc(call) } } -public protocol AsyncThrowingFunction : NominalFunctionTypes::_NominalFunctionType { - associatedtype Failure : Swift::Error +public protocol AsyncThrowingFunction : NominalFunctionTypes._NominalFunctionType { + associatedtype Failure : Swift.Error func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output } -public struct AsyncThrowingFunc : NominalFunctionTypes::AsyncThrowingFunction where Failure : Swift::Error { +public struct AsyncThrowingFunc : NominalFunctionTypes.AsyncThrowingFunction where Failure : Swift.Error { @usableFromInline internal var call: (Input) async throws(Failure) -> Output public init(_ call: @escaping (Input) async throws(Failure) -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::AsyncThrowingFunction) { + @inlinable public init(_ f: any NominalFunctionTypes.AsyncThrowingFunction) { self.init(f.run) } @inlinable public func run(with input: Input) async throws(Failure) -> Output { @@ -102,41 +102,41 @@ public struct AsyncThrowingFunc : NominalFunctionTypes:: @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { return try await call(input) } - public func uncheckedSendable() -> NominalFunctionTypes::SendableAsyncThrowingFunc + public func uncheckedSendable() -> NominalFunctionTypes.SendableAsyncThrowingFunc } -extension NominalFunctionTypes::AsyncThrowingFunc where Input == () { +extension NominalFunctionTypes.AsyncThrowingFunc where Input == () { @inlinable public func callAsFunction() async throws(Failure) -> Output { return try await call(()) } } -public protocol _MainActorAsyncThrowingFunction : NominalFunctionTypes::_MainActorNominalFunctionTypeMarker { - associatedtype Failure : Swift::Error - @_Concurrency::MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +public protocol _MainActorAsyncThrowingFunction : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { + associatedtype Failure : Swift.Error + @_Concurrency.MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output } -public struct MainActorAsyncThrowingFunc : NominalFunctionTypes::_MainActorAsyncThrowingFunction, @_Concurrency::MainActor NominalFunctionTypes::AsyncThrowingFunction, Swift::Sendable where Failure : Swift::Error { +public struct MainActorAsyncThrowingFunc : NominalFunctionTypes._MainActorAsyncThrowingFunction, @_Concurrency.MainActor NominalFunctionTypes.AsyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { @usableFromInline - internal var call: @_Concurrency::MainActor @Sendable (Input) async throws(Failure) -> Output - public init(_ call: @escaping @_Concurrency::MainActor @Sendable (Input) async throws(Failure) -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::_MainActorAsyncThrowingFunction & Swift::Sendable) { + internal var call: @_Concurrency.MainActor @Sendable (Input) async throws(Failure) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorAsyncThrowingFunction & Swift.Sendable) { self.init(f.run) } - @_Concurrency::MainActor @inlinable public func run(with input: Input) async throws(Failure) -> Output { + @_Concurrency.MainActor @inlinable public func run(with input: Input) async throws(Failure) -> Output { return try await call(input) } - @_Concurrency::MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { return try await call(input) } } -extension NominalFunctionTypes::MainActorAsyncThrowingFunc where Input == () { - @_Concurrency::MainActor @inlinable public func callAsFunction() async throws(Failure) -> Output { +extension NominalFunctionTypes.MainActorAsyncThrowingFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() async throws(Failure) -> Output { return try await call(()) } } -public struct SendableAsyncThrowingFunc : NominalFunctionTypes::AsyncThrowingFunction, Swift::Sendable where Failure : Swift::Error { +public struct SendableAsyncThrowingFunc : NominalFunctionTypes.AsyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { @usableFromInline internal var call: @Sendable (Input) async throws(Failure) -> Output public init(_ call: @escaping @Sendable (Input) async throws(Failure) -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::AsyncThrowingFunction & Swift::Sendable) { + @inlinable public init(_ f: any NominalFunctionTypes.AsyncThrowingFunction & Swift.Sendable) { self.init(f.run) } @inlinable public func run(with input: Input) async throws(Failure) -> Output { @@ -146,44 +146,44 @@ public struct SendableAsyncThrowingFunc : NominalFunctio return try await call(input) } } -extension NominalFunctionTypes::SendableAsyncThrowingFunc where Input == () { +extension NominalFunctionTypes.SendableAsyncThrowingFunc where Input == () { @inlinable public func callAsFunction() async throws(Failure) -> Output { return try await call(()) } } -extension NominalFunctionTypes::SendableAsyncThrowingFunc where Input : Swift::Sendable, Output : Swift::Sendable { - @inlinable public func mainActor() -> NominalFunctionTypes::MainActorAsyncThrowingFunc { +extension NominalFunctionTypes.SendableAsyncThrowingFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorAsyncThrowingFunc { MainActorAsyncThrowingFunc(call) } } -public protocol _MainActorSyncFunction : NominalFunctionTypes::_MainActorAsyncFunction, NominalFunctionTypes::_MainActorSyncThrowingFunction { - @_Concurrency::MainActor func run(with input: Self.Input) -> Self.Output +public protocol _MainActorSyncFunction : NominalFunctionTypes._MainActorAsyncFunction, NominalFunctionTypes._MainActorSyncThrowingFunction { + @_Concurrency.MainActor func run(with input: Self.Input) -> Self.Output } -public struct MainActorSyncFunc : NominalFunctionTypes::_MainActorSyncFunction, @_Concurrency::MainActor NominalFunctionTypes::SyncFunction, Swift::Sendable { +public struct MainActorSyncFunc : NominalFunctionTypes._MainActorSyncFunction, @_Concurrency.MainActor NominalFunctionTypes.SyncFunction, Swift.Sendable { @usableFromInline - internal var call: @_Concurrency::MainActor @Sendable (Input) -> Output - public init(_ call: @escaping @_Concurrency::MainActor @Sendable (Input) -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::_MainActorSyncFunction & Swift::Sendable) { + internal var call: @_Concurrency.MainActor @Sendable (Input) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorSyncFunction & Swift.Sendable) { self.init(f.run) } - @_Concurrency::MainActor @inlinable public func run(with input: Input) -> Output { + @_Concurrency.MainActor @inlinable public func run(with input: Input) -> Output { return call(input) } - @_Concurrency::MainActor @inlinable public func callAsFunction(_ input: Input) -> Output { + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) -> Output { return call(input) } - public typealias Failure = Swift::Never + public typealias Failure = Swift.Never } -extension NominalFunctionTypes::MainActorSyncFunc where Input == () { - @_Concurrency::MainActor @inlinable public func callAsFunction() -> Output { +extension NominalFunctionTypes.MainActorSyncFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() -> Output { return call(()) } } -public struct SendableSyncFunc : NominalFunctionTypes::SyncFunction, Swift::Sendable { +public struct SendableSyncFunc : NominalFunctionTypes.SyncFunction, Swift.Sendable { @usableFromInline internal var call: @Sendable (Input) -> Output public init(_ call: @escaping @Sendable (Input) -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::SyncFunction & Swift::Sendable) { + @inlinable public init(_ f: any NominalFunctionTypes.SyncFunction & Swift.Sendable) { self.init(f.run) } @inlinable public func run(with input: Input) -> Output { @@ -192,22 +192,22 @@ public struct SendableSyncFunc : NominalFunctionTypes::SyncFuncti @inlinable public func callAsFunction(_ input: Input) -> Output { return call(input) } - public typealias Failure = Swift::Never + public typealias Failure = Swift.Never } -extension NominalFunctionTypes::SendableSyncFunc where Input == () { +extension NominalFunctionTypes.SendableSyncFunc where Input == () { @inlinable public func callAsFunction() -> Output { return call(()) } } -extension NominalFunctionTypes::SendableSyncFunc where Input : Swift::Sendable, Output : Swift::Sendable { - @inlinable public func mainActor() -> NominalFunctionTypes::MainActorSyncFunc { +extension NominalFunctionTypes.SendableSyncFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorSyncFunc { MainActorSyncFunc(call) } } -public protocol SyncFunction : NominalFunctionTypes::AsyncFunction, NominalFunctionTypes::SyncThrowingFunction { +public protocol SyncFunction : NominalFunctionTypes.AsyncFunction, NominalFunctionTypes.SyncThrowingFunction { func run(with input: Self.Input) -> Self.Output } -extension NominalFunctionTypes::SyncFunction { +extension NominalFunctionTypes.SyncFunction { @inlinable public func syncRun(with input: Self.Input) -> Self.Output { return run(with: input) } @@ -218,11 +218,11 @@ extension NominalFunctionTypes::SyncFunction { return run(with: input) } } -public struct SyncFunc : NominalFunctionTypes::SyncFunction { +public struct SyncFunc : NominalFunctionTypes.SyncFunction { @usableFromInline internal var call: (Input) -> Output public init(_ call: @escaping (Input) -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::SyncFunction) { + @inlinable public init(_ f: any NominalFunctionTypes.SyncFunction) { self.init(f.run) } @inlinable public func run(with input: Input) -> Output { @@ -231,41 +231,41 @@ public struct SyncFunc : NominalFunctionTypes::SyncFunction { @inlinable public func callAsFunction(_ input: Input) -> Output { return call(input) } - public func uncheckedSendable() -> NominalFunctionTypes::SendableSyncFunc - public typealias Failure = Swift::Never + public func uncheckedSendable() -> NominalFunctionTypes.SendableSyncFunc + public typealias Failure = Swift.Never } -extension NominalFunctionTypes::SyncFunc where Input == () { +extension NominalFunctionTypes.SyncFunc where Input == () { @inlinable public func callAsFunction() -> Output { return call(()) } } -public protocol _MainActorSyncThrowingFunction : NominalFunctionTypes::_MainActorAsyncThrowingFunction { - @_Concurrency::MainActor func run(with input: Self.Input) throws(Self.Failure) -> Self.Output +public protocol _MainActorSyncThrowingFunction : NominalFunctionTypes._MainActorAsyncThrowingFunction { + @_Concurrency.MainActor func run(with input: Self.Input) throws(Self.Failure) -> Self.Output } -public struct MainActorSyncThrowingFunc : NominalFunctionTypes::_MainActorSyncThrowingFunction, @_Concurrency::MainActor NominalFunctionTypes::SyncThrowingFunction, Swift::Sendable where Failure : Swift::Error { +public struct MainActorSyncThrowingFunc : NominalFunctionTypes._MainActorSyncThrowingFunction, @_Concurrency.MainActor NominalFunctionTypes.SyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { @usableFromInline - internal var call: @_Concurrency::MainActor @Sendable (Input) throws(Failure) -> Output - public init(_ call: @escaping @_Concurrency::MainActor @Sendable (Input) throws(Failure) -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::_MainActorSyncThrowingFunction & Swift::Sendable) { + internal var call: @_Concurrency.MainActor @Sendable (Input) throws(Failure) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorSyncThrowingFunction & Swift.Sendable) { self.init(f.run) } - @_Concurrency::MainActor @inlinable public func run(with input: Input) throws(Failure) -> Output { + @_Concurrency.MainActor @inlinable public func run(with input: Input) throws(Failure) -> Output { return try call(input) } - @_Concurrency::MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { return try call(input) } } -extension NominalFunctionTypes::MainActorSyncThrowingFunc where Input == () { - @_Concurrency::MainActor @inlinable public func callAsFunction() throws(Failure) -> Output { +extension NominalFunctionTypes.MainActorSyncThrowingFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() throws(Failure) -> Output { return try call(()) } } -public struct SendableSyncThrowingFunc : NominalFunctionTypes::SyncThrowingFunction, Swift::Sendable where Failure : Swift::Error { +public struct SendableSyncThrowingFunc : NominalFunctionTypes.SyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { @usableFromInline internal var call: @Sendable (Input) throws(Failure) -> Output public init(_ call: @escaping @Sendable (Input) throws(Failure) -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::SyncThrowingFunction & Swift::Sendable) { + @inlinable public init(_ f: any NominalFunctionTypes.SyncThrowingFunction & Swift.Sendable) { self.init(f.run) } @inlinable public func run(with input: Input) throws(Failure) -> Output { @@ -275,20 +275,20 @@ public struct SendableSyncThrowingFunc : NominalFunction return try call(input) } } -extension NominalFunctionTypes::SendableSyncThrowingFunc where Input == () { +extension NominalFunctionTypes.SendableSyncThrowingFunc where Input == () { @inlinable public func callAsFunction() throws(Failure) -> Output { return try call(()) } } -extension NominalFunctionTypes::SendableSyncThrowingFunc where Input : Swift::Sendable, Output : Swift::Sendable { - @inlinable public func mainActor() -> NominalFunctionTypes::MainActorSyncThrowingFunc { +extension NominalFunctionTypes.SendableSyncThrowingFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorSyncThrowingFunc { MainActorSyncThrowingFunc(call) } } -public protocol SyncThrowingFunction : NominalFunctionTypes::AsyncThrowingFunction { +public protocol SyncThrowingFunction : NominalFunctionTypes.AsyncThrowingFunction { func run(with input: Self.Input) throws(Self.Failure) -> Self.Output } -extension NominalFunctionTypes::SyncThrowingFunction { +extension NominalFunctionTypes.SyncThrowingFunction { @inlinable public func syncRun(with input: Self.Input) throws(Self.Failure) -> Self.Output { return try run(with: input) } @@ -296,11 +296,11 @@ extension NominalFunctionTypes::SyncThrowingFunction { return try syncRun(with: input) } } -public struct SyncThrowingFunc : NominalFunctionTypes::SyncThrowingFunction where Failure : Swift::Error { +public struct SyncThrowingFunc : NominalFunctionTypes.SyncThrowingFunction where Failure : Swift.Error { @usableFromInline internal var call: (Input) throws(Failure) -> Output public init(_ call: @escaping (Input) throws(Failure) -> Output) - @inlinable public init(_ f: any NominalFunctionTypes::SyncThrowingFunction) { + @inlinable public init(_ f: any NominalFunctionTypes.SyncThrowingFunction) { self.init(f.run) } @inlinable public func run(with input: Input) throws(Failure) -> Output { @@ -309,16 +309,16 @@ public struct SyncThrowingFunc : NominalFunctionTypes::S @inlinable public func callAsFunction(_ input: Input) throws(Failure) -> Output { return try call(input) } - public func uncheckedSendable() -> NominalFunctionTypes::SendableSyncThrowingFunc + public func uncheckedSendable() -> NominalFunctionTypes.SendableSyncThrowingFunc } -extension NominalFunctionTypes::SyncThrowingFunc where Input == () { +extension NominalFunctionTypes.SyncThrowingFunc where Input == () { @inlinable public func callAsFunction() throws(Failure) -> Output { return try call(()) } } public protocol _AnyNominalFunctionType { } -public protocol _NominalFunctionType : NominalFunctionTypes::_AnyNominalFunctionType { +public protocol _NominalFunctionType : NominalFunctionTypes._AnyNominalFunctionType { associatedtype Input associatedtype Output } @@ -326,11 +326,11 @@ public protocol _MainActorNominalFunctionTypeMarker { associatedtype Input associatedtype Output } -extension NominalFunctionTypes::MainActorAsyncFunc : NominalFunctionTypes::_MainActorNominalFunctionTypeMarker { +extension NominalFunctionTypes.MainActorAsyncFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { } -extension NominalFunctionTypes::MainActorAsyncThrowingFunc : NominalFunctionTypes::_MainActorNominalFunctionTypeMarker { +extension NominalFunctionTypes.MainActorAsyncThrowingFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { } -extension NominalFunctionTypes::MainActorSyncFunc : NominalFunctionTypes::_MainActorNominalFunctionTypeMarker { +extension NominalFunctionTypes.MainActorSyncFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { } -extension NominalFunctionTypes::MainActorSyncThrowingFunc : NominalFunctionTypes::_MainActorNominalFunctionTypeMarker { +extension NominalFunctionTypes.MainActorSyncThrowingFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { } diff --git a/.agents/interfaces/macos/NominalFunctionTypesComposition.swiftinterface b/.agents/interfaces/macos/NominalFunctionTypesComposition.swiftinterface index bd301c0..deee68e 100644 --- a/.agents/interfaces/macos/NominalFunctionTypesComposition.swiftinterface +++ b/.agents/interfaces/macos/NominalFunctionTypesComposition.swiftinterface @@ -1,7 +1,7 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.4 (swiftlang-6.4.0.25.4 clang-2100.3.25.1) -// swift-module-flags: -target arm64-apple-macos12.0 -enable-objc-interop -language-mode 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name NominalFunctionTypesComposition -package-name swift_function_composition -// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.4 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-macosx10.15 -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesComposition -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 @_exported import NominalFunctionTypes import Swift import _Concurrency diff --git a/.agents/interfaces/macos/NominalFunctionTypesCompositionFunctions.swiftinterface b/.agents/interfaces/macos/NominalFunctionTypesCompositionFunctions.swiftinterface index e459389..6152090 100644 --- a/.agents/interfaces/macos/NominalFunctionTypesCompositionFunctions.swiftinterface +++ b/.agents/interfaces/macos/NominalFunctionTypesCompositionFunctions.swiftinterface @@ -1,14 +1,14 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.4 (swiftlang-6.4.0.25.4 clang-2100.3.25.1) -// swift-module-flags: -target arm64-apple-macos12.0 -enable-objc-interop -language-mode 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name NominalFunctionTypesCompositionFunctions -package-name swift_function_composition -// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.4 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-macosx10.15 -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionFunctions -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 import Either import NominalFunctionTypes import Swift import _Concurrency import _StringProcessing import _SwiftConcurrencyShims -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1.Input == F0.Output { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -22,7 +22,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -36,7 +36,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1.Input : Swift::Sendable, F1.Input == F0.Output { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Input : Swift.Sendable, F1.Input == F0.Output { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -50,7 +50,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1.Failure == F0.Failure, F1.Input : Swift::Sendable, F1.Input == F0.Output { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input : Swift.Sendable, F1.Input == F0.Output { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -64,7 +64,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1.Input == F0.Output, F0.Input : Swift::Sendable { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -78,7 +78,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift::Sendable { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -92,19 +92,19 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where F2 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncThrowingFunc, Either::Either>> where F3 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where F3 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1.Input == F0.Output { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -118,7 +118,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncThrowingFunc where F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -132,7 +132,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1.Input : Swift::Sendable, F1.Input == F0.Output { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Input : Swift.Sendable, F1.Input == F0.Output { MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -146,7 +146,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncThrowingFunc where F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1.Failure == F0.Failure, F1.Input : Swift::Sendable, F1.Input == F0.Output { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input : Swift.Sendable, F1.Input == F0.Output { MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -160,7 +160,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1.Input == F0.Output, F0.Input : Swift::Sendable { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -174,7 +174,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncThrowingFunc where F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift::Sendable { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -188,69 +188,69 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncThrowingFunc where F2 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncThrowingFunc, Either::Either>> where F3 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncThrowingFunc where F3 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncFunc where F1 : NominalFunctionTypes::_MainActorAsyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncFunction, F0 : Swift::Sendable, F1.Input == F0.Output { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in await f1.run(with:f0.run(with: input)) } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncFunc where F1 : NominalFunctionTypes::AsyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncFunction, F0 : Swift::Sendable, F1.Input == F0.Output, F0.Input : Swift::Sendable { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in await f1.run(with:f0.run(with: input)) } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncFunc where F1 : NominalFunctionTypes::_MainActorAsyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncFunction, F0 : Swift::Sendable, F1.Input == F0.Output, F0.Input : Swift::Sendable { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in await f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncFunc where F2 : NominalFunctionTypes::_MainActorAsyncFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncFunction, F0 : Swift::Sendable, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { MainActorAsyncFunc { (input: F0.Input) async -> F2.Output in await f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorAsyncFunc where F3 : NominalFunctionTypes::_MainActorAsyncFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorAsyncFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorAsyncFunction, F0 : Swift::Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F3 : NominalFunctionTypes._MainActorAsyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { MainActorAsyncFunc { (input: F0.Input) async -> F3.Output in await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncFunc where F1 : NominalFunctionTypes::_MainActorSyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncFunction, F0 : Swift::Sendable, F1.Input == F0.Output { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { MainActorSyncFunc { (input: F0.Input) -> F1.Output in f1.run(with:f0.run(with: input)) } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncFunc where F1 : NominalFunctionTypes::SyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncFunction, F0 : Swift::Sendable, F1.Input == F0.Output, F0.Input : Swift::Sendable { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { MainActorSyncFunc { (input: F0.Input) -> F1.Output in f1.run(with:f0.run(with: input)) } } -@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncFunc where F1 : NominalFunctionTypes::_MainActorSyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncFunction, F0 : Swift::Sendable, F1.Input == F0.Output, F0.Input : Swift::Sendable { +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { MainActorSyncFunc { (input: F0.Input) -> F1.Output in f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncFunc where F2 : NominalFunctionTypes::_MainActorSyncFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncFunction, F0 : Swift::Sendable, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { MainActorSyncFunc { (input: F0.Input) -> F2.Output in f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::MainActorSyncFunc where F3 : NominalFunctionTypes::_MainActorSyncFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorSyncFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::_MainActorSyncFunction, F0 : Swift::Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F3 : NominalFunctionTypes._MainActorSyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { MainActorSyncFunc { (input: F0.Input) -> F3.Output in f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableAsyncThrowingFunc> where F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { SendableAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -264,7 +264,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableAsyncThrowingFunc where F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { SendableAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -278,19 +278,19 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes::AsyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableAsyncThrowingFunc where F2 : NominalFunctionTypes::AsyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableAsyncThrowingFunc, Either::Either>> where F3 : NominalFunctionTypes::AsyncThrowingFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::AsyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableAsyncThrowingFunc where F3 : NominalFunctionTypes::AsyncThrowingFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::AsyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableSyncThrowingFunc> where F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { SendableSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -304,7 +304,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableSyncThrowingFunc where F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { SendableSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -318,49 +318,49 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes::SyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableSyncThrowingFunc where F2 : NominalFunctionTypes::SyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableSyncThrowingFunc, Either::Either>> where F3 : NominalFunctionTypes::SyncThrowingFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::SyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableSyncThrowingFunc where F3 : NominalFunctionTypes::SyncThrowingFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::SyncThrowingFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableAsyncFunc where F1 : NominalFunctionTypes::AsyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncFunction, F0 : Swift::Sendable, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { SendableAsyncFunc { (input: F0.Input) async -> F1.Output in await f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableAsyncFunc where F2 : NominalFunctionTypes::AsyncFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncFunction, F0 : Swift::Sendable, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { SendableAsyncFunc { (input: F0.Input) async -> F2.Output in await f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableAsyncFunc where F3 : NominalFunctionTypes::AsyncFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::AsyncFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::AsyncFunction, F0 : Swift::Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F3 : NominalFunctionTypes.AsyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { SendableAsyncFunc { (input: F0.Input) async -> F3.Output in await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableSyncFunc where F1 : NominalFunctionTypes::SyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncFunction, F0 : Swift::Sendable, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { SendableSyncFunc { (input: F0.Input) -> F1.Output in f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableSyncFunc where F2 : NominalFunctionTypes::SyncFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::SyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncFunction, F0 : Swift::Sendable, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { SendableSyncFunc { (input: F0.Input) -> F2.Output in f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SendableSyncFunc where F3 : NominalFunctionTypes::SyncFunction, F3 : Swift::Sendable, F2 : NominalFunctionTypes::SyncFunction, F2 : Swift::Sendable, F1 : NominalFunctionTypes::SyncFunction, F1 : Swift::Sendable, F0 : NominalFunctionTypes::SyncFunction, F0 : Swift::Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F3 : NominalFunctionTypes.SyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { SendableSyncFunc { (input: F0.Input) -> F3.Output in f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::AsyncThrowingFunc> where F1 : NominalFunctionTypes::AsyncThrowingFunction, F0 : NominalFunctionTypes::AsyncThrowingFunction, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F1.Input == F0.Output { AsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -374,7 +374,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::AsyncThrowingFunc where F1 : NominalFunctionTypes::AsyncThrowingFunction, F0 : NominalFunctionTypes::AsyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { AsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -388,19 +388,19 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::AsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes::AsyncThrowingFunction, F1 : NominalFunctionTypes::AsyncThrowingFunction, F0 : NominalFunctionTypes::AsyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::AsyncThrowingFunc where F2 : NominalFunctionTypes::AsyncThrowingFunction, F1 : NominalFunctionTypes::AsyncThrowingFunction, F0 : NominalFunctionTypes::AsyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::AsyncThrowingFunc, Either::Either>> where F3 : NominalFunctionTypes::AsyncThrowingFunction, F2 : NominalFunctionTypes::AsyncThrowingFunction, F1 : NominalFunctionTypes::AsyncThrowingFunction, F0 : NominalFunctionTypes::AsyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::AsyncThrowingFunc where F3 : NominalFunctionTypes::AsyncThrowingFunction, F2 : NominalFunctionTypes::AsyncThrowingFunction, F1 : NominalFunctionTypes::AsyncThrowingFunction, F0 : NominalFunctionTypes::AsyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F3 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::SyncThrowingFunc> where F1 : NominalFunctionTypes::SyncThrowingFunction, F0 : NominalFunctionTypes::SyncThrowingFunction, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F1.Input == F0.Output { SyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -414,7 +414,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::SyncThrowingFunc where F1 : NominalFunctionTypes::SyncThrowingFunction, F0 : NominalFunctionTypes::SyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { SyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -428,49 +428,49 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes::SyncThrowingFunction, F1 : NominalFunctionTypes::SyncThrowingFunction, F0 : NominalFunctionTypes::SyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SyncThrowingFunc where F2 : NominalFunctionTypes::SyncThrowingFunction, F1 : NominalFunctionTypes::SyncThrowingFunction, F0 : NominalFunctionTypes::SyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(f2, compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SyncThrowingFunc, Either::Either>> where F3 : NominalFunctionTypes::SyncThrowingFunction, F2 : NominalFunctionTypes::SyncThrowingFunction, F1 : NominalFunctionTypes::SyncThrowingFunction, F0 : NominalFunctionTypes::SyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SyncThrowingFunc where F3 : NominalFunctionTypes::SyncThrowingFunction, F2 : NominalFunctionTypes::SyncThrowingFunction, F1 : NominalFunctionTypes::SyncThrowingFunction, F0 : NominalFunctionTypes::SyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F3 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { compose(compose(f3, f2), compose(f1, f0)) } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::AsyncFunc where F1 : NominalFunctionTypes::AsyncFunction, F0 : NominalFunctionTypes::AsyncFunction, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F1.Input == F0.Output { AsyncFunc { (input: F0.Input) async -> F1.Output in await f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::AsyncFunc where F2 : NominalFunctionTypes::AsyncFunction, F1 : NominalFunctionTypes::AsyncFunction, F0 : NominalFunctionTypes::AsyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F2 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { AsyncFunc { (input: F0.Input) async -> F2.Output in await f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::AsyncFunc where F3 : NominalFunctionTypes::AsyncFunction, F2 : NominalFunctionTypes::AsyncFunction, F1 : NominalFunctionTypes::AsyncFunction, F0 : NominalFunctionTypes::AsyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F3 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { AsyncFunc { (input: F0.Input) async -> F3.Output in await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } } -@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes::SyncFunc where F1 : NominalFunctionTypes::SyncFunction, F0 : NominalFunctionTypes::SyncFunction, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F1.Input == F0.Output { SyncFunc { (input: F0.Input) -> F1.Output in f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SyncFunc where F2 : NominalFunctionTypes::SyncFunction, F1 : NominalFunctionTypes::SyncFunction, F0 : NominalFunctionTypes::SyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F2 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { SyncFunc { (input: F0.Input) -> F2.Output in f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes::SyncFunc where F3 : NominalFunctionTypes::SyncFunction, F2 : NominalFunctionTypes::SyncFunction, F1 : NominalFunctionTypes::SyncFunction, F0 : NominalFunctionTypes::SyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F3 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { SyncFunc { (input: F0.Input) -> F3.Output in f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -484,7 +484,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -498,7 +498,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0.Output : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Output : Swift.Sendable, F0.Output == F1.Input { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -512,7 +512,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output : Swift.Sendable, F0.Output == F1.Input { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -526,7 +526,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0.Input : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -540,7 +540,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F0.Failure == F1.Failure, F0.Input : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Input : Swift.Sendable, F0.Output == F1.Input { MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -554,19 +554,19 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::MainActorAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F2 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F2 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::MainActorAsyncThrowingFunc, Either::Either>> where F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F3 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::_MainActorAsyncThrowingFunction, F3 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -580,7 +580,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorSyncThrowingFunc where F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -594,7 +594,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0.Output : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Output : Swift.Sendable, F0.Output == F1.Input { MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -608,7 +608,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorSyncThrowingFunc where F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output : Swift.Sendable, F0.Output == F1.Input { MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -622,7 +622,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0.Input : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -636,7 +636,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorSyncThrowingFunc where F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F0.Failure == F1.Failure, F0.Input : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Input : Swift.Sendable, F0.Output == F1.Input { MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -650,69 +650,69 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::MainActorSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F2 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::MainActorSyncThrowingFunc where F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F2 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::MainActorSyncThrowingFunc, Either::Either>> where F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F3 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::MainActorSyncThrowingFunc where F0 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::_MainActorSyncThrowingFunction, F3 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorAsyncFunc where F0 : NominalFunctionTypes::_MainActorAsyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncFunction, F1 : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in await f1.run(with:f0.run(with: input)) } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorAsyncFunc where F0 : NominalFunctionTypes::_MainActorAsyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncFunction, F1 : Swift::Sendable, F0.Input : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in await f1.run(with:f0.run(with: input)) } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorAsyncFunc where F0 : NominalFunctionTypes::AsyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncFunction, F1 : Swift::Sendable, F0.Input : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in await f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::MainActorAsyncFunc where F0 : NominalFunctionTypes::_MainActorAsyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorAsyncFunction, F2 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { MainActorAsyncFunc { (input: F0.Input) async -> F2.Output in await f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::MainActorAsyncFunc where F0 : NominalFunctionTypes::_MainActorAsyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorAsyncFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorAsyncFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::_MainActorAsyncFunction, F3 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { MainActorAsyncFunc { (input: F0.Input) async -> F3.Output in await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorSyncFunc where F0 : NominalFunctionTypes::_MainActorSyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncFunction, F1 : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { MainActorSyncFunc { (input: F0.Input) -> F1.Output in f1.run(with:f0.run(with: input)) } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorSyncFunc where F0 : NominalFunctionTypes::_MainActorSyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncFunction, F1 : Swift::Sendable, F0.Input : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { MainActorSyncFunc { (input: F0.Input) -> F1.Output in f1.run(with:f0.run(with: input)) } } -@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::MainActorSyncFunc where F0 : NominalFunctionTypes::SyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncFunction, F1 : Swift::Sendable, F0.Input : Swift::Sendable, F0.Output == F1.Input { +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { MainActorSyncFunc { (input: F0.Input) -> F1.Output in f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::MainActorSyncFunc where F0 : NominalFunctionTypes::_MainActorSyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorSyncFunction, F2 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { MainActorSyncFunc { (input: F0.Input) -> F2.Output in f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::MainActorSyncFunc where F0 : NominalFunctionTypes::_MainActorSyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::_MainActorSyncFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::_MainActorSyncFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::_MainActorSyncFunction, F3 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { MainActorSyncFunc { (input: F0.Input) -> F3.Output in f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::SendableAsyncThrowingFunc> where F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { SendableAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -726,7 +726,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::SendableAsyncThrowingFunc where F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { SendableAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -740,19 +740,19 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::SendableAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::AsyncThrowingFunction, F2 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::SendableAsyncThrowingFunc where F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::AsyncThrowingFunction, F2 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::SendableAsyncThrowingFunc, Either::Either>> where F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::AsyncThrowingFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::AsyncThrowingFunction, F3 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::SendableAsyncThrowingFunc where F0 : NominalFunctionTypes::AsyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::AsyncThrowingFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::AsyncThrowingFunction, F3 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::SendableSyncThrowingFunc> where F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { SendableSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -766,7 +766,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::SendableSyncThrowingFunc where F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { SendableSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -780,49 +780,49 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::SendableSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::SyncThrowingFunction, F2 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::SendableSyncThrowingFunc where F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::SyncThrowingFunction, F2 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::SendableSyncThrowingFunc, Either::Either>> where F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::SyncThrowingFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::SyncThrowingFunction, F3 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::SendableSyncThrowingFunc where F0 : NominalFunctionTypes::SyncThrowingFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncThrowingFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::SyncThrowingFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::SyncThrowingFunction, F3 : Swift::Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::SendableAsyncFunc where F0 : NominalFunctionTypes::AsyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncFunction, F1 : Swift::Sendable, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { SendableAsyncFunc { (input: F0.Input) async -> F1.Output in await f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::SendableAsyncFunc where F0 : NominalFunctionTypes::AsyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::AsyncFunction, F2 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { SendableAsyncFunc { (input: F0.Input) async -> F2.Output in await f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::SendableAsyncFunc where F0 : NominalFunctionTypes::AsyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::AsyncFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::AsyncFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::AsyncFunction, F3 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { SendableAsyncFunc { (input: F0.Input) async -> F3.Output in await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::SendableSyncFunc where F0 : NominalFunctionTypes::SyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncFunction, F1 : Swift::Sendable, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { SendableSyncFunc { (input: F0.Input) -> F1.Output in f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::SendableSyncFunc where F0 : NominalFunctionTypes::SyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::SyncFunction, F2 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { SendableSyncFunc { (input: F0.Input) -> F2.Output in f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::SendableSyncFunc where F0 : NominalFunctionTypes::SyncFunction, F0 : Swift::Sendable, F1 : NominalFunctionTypes::SyncFunction, F1 : Swift::Sendable, F2 : NominalFunctionTypes::SyncFunction, F2 : Swift::Sendable, F3 : NominalFunctionTypes::SyncFunction, F3 : Swift::Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { SendableSyncFunc { (input: F0.Input) -> F3.Output in f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::AsyncThrowingFunc> where F0 : NominalFunctionTypes::AsyncThrowingFunction, F1 : NominalFunctionTypes::AsyncThrowingFunction, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input { AsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -836,7 +836,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::AsyncThrowingFunc where F0 : NominalFunctionTypes::AsyncThrowingFunction, F1 : NominalFunctionTypes::AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { AsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in do { let partialResult = try await f0.run(with: input) @@ -850,19 +850,19 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::AsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes::AsyncThrowingFunction, F1 : NominalFunctionTypes::AsyncThrowingFunction, F2 : NominalFunctionTypes::AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::AsyncThrowingFunc where F0 : NominalFunctionTypes::AsyncThrowingFunction, F1 : NominalFunctionTypes::AsyncThrowingFunction, F2 : NominalFunctionTypes::AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::AsyncThrowingFunc, Either::Either>> where F0 : NominalFunctionTypes::AsyncThrowingFunction, F1 : NominalFunctionTypes::AsyncThrowingFunction, F2 : NominalFunctionTypes::AsyncThrowingFunction, F3 : NominalFunctionTypes::AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F3 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::AsyncThrowingFunc where F0 : NominalFunctionTypes::AsyncThrowingFunction, F1 : NominalFunctionTypes::AsyncThrowingFunction, F2 : NominalFunctionTypes::AsyncThrowingFunction, F3 : NominalFunctionTypes::AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F3 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::SyncThrowingFunc> where F0 : NominalFunctionTypes::SyncThrowingFunction, F1 : NominalFunctionTypes::SyncThrowingFunction, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input { SyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -876,7 +876,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::SyncThrowingFunc where F0 : NominalFunctionTypes::SyncThrowingFunction, F1 : NominalFunctionTypes::SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { SyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in do { let partialResult = try f0.run(with: input) @@ -890,44 +890,44 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::SyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes::SyncThrowingFunction, F1 : NominalFunctionTypes::SyncThrowingFunction, F2 : NominalFunctionTypes::SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::SyncThrowingFunc where F0 : NominalFunctionTypes::SyncThrowingFunction, F1 : NominalFunctionTypes::SyncThrowingFunction, F2 : NominalFunctionTypes::SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { pipe(pipe(f0, f1), f2) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::SyncThrowingFunc, Either::Either>> where F0 : NominalFunctionTypes::SyncThrowingFunction, F1 : NominalFunctionTypes::SyncThrowingFunction, F2 : NominalFunctionTypes::SyncThrowingFunction, F3 : NominalFunctionTypes::SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F3 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::SyncThrowingFunc where F0 : NominalFunctionTypes::SyncThrowingFunction, F1 : NominalFunctionTypes::SyncThrowingFunction, F2 : NominalFunctionTypes::SyncThrowingFunction, F3 : NominalFunctionTypes::SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F3 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { pipe(pipe(f0, f1), pipe(f2, f3)) } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::AsyncFunc where F0 : NominalFunctionTypes::AsyncFunction, F1 : NominalFunctionTypes::AsyncFunction, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input { AsyncFunc { (input: F0.Input) async -> F1.Output in await f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::AsyncFunc where F0 : NominalFunctionTypes::AsyncFunction, F1 : NominalFunctionTypes::AsyncFunction, F2 : NominalFunctionTypes::AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { AsyncFunc { (input: F0.Input) async -> F2.Output in await f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::AsyncFunc where F0 : NominalFunctionTypes::AsyncFunction, F1 : NominalFunctionTypes::AsyncFunction, F2 : NominalFunctionTypes::AsyncFunction, F3 : NominalFunctionTypes::AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F3 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { AsyncFunc { (input: F0.Input) async -> F3.Output in await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes::SyncFunc where F0 : NominalFunctionTypes::SyncFunction, F1 : NominalFunctionTypes::SyncFunction, F0.Output == F1.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input { SyncFunc { (input: F0.Input) -> F1.Output in f1.run(with: f0.run(with: input)) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes::SyncFunc where F0 : NominalFunctionTypes::SyncFunction, F1 : NominalFunctionTypes::SyncFunction, F2 : NominalFunctionTypes::SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { SyncFunc { (input: F0.Input) -> F2.Output in f2.run(with: f1.run(with: f0.run(with: input))) } } -@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes::SyncFunc where F0 : NominalFunctionTypes::SyncFunction, F1 : NominalFunctionTypes::SyncFunction, F2 : NominalFunctionTypes::SyncFunction, F3 : NominalFunctionTypes::SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F3 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { SyncFunc { (input: F0.Input) -> F3.Output in f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) } diff --git a/.agents/interfaces/macos/NominalFunctionTypesCompositionMethods.swiftinterface b/.agents/interfaces/macos/NominalFunctionTypesCompositionMethods.swiftinterface index aa089e6..73e9167 100644 --- a/.agents/interfaces/macos/NominalFunctionTypesCompositionMethods.swiftinterface +++ b/.agents/interfaces/macos/NominalFunctionTypesCompositionMethods.swiftinterface @@ -1,14 +1,14 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.4 (swiftlang-6.4.0.25.4 clang-2100.3.25.1) -// swift-module-flags: -target arm64-apple-macos12.0 -enable-objc-interop -language-mode 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name NominalFunctionTypesCompositionMethods -package-name swift_function_composition -// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.4 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-macosx10.15 -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionMethods -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 import NominalFunctionTypes import Swift import _Concurrency import _StringProcessing import _SwiftConcurrencyShims -extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendable { - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in do { let partialResult = try await b.run(with: input) @@ -22,7 +22,7 @@ extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendab } } } - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift::Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in do { let partialResult = try await b.run(with: input) @@ -37,15 +37,15 @@ extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendab } } } -extension NominalFunctionTypes::AsyncFunction where Self : Swift::Sendable { - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorAsyncFunc where B : NominalFunctionTypes::_MainActorAsyncFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncFunc { (input: B.Input) async -> Output in await self.run(with: b.run(with: input)) } } } -extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendable { - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in do { let partialResult = try b.run(with: input) @@ -59,7 +59,7 @@ extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendabl } } } - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc where B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift::Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in do { let partialResult = try b.run(with: input) @@ -74,15 +74,15 @@ extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendabl } } } -extension NominalFunctionTypes::SyncFunction where Self : Swift::Sendable { - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorSyncFunc where B : NominalFunctionTypes::_MainActorSyncFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncFunc { (input: B.Input) -> Output in self.run(with: b.run(with: input)) } } } -extension NominalFunctionTypes::_MainActorAsyncThrowingFunction where Self : Swift::Sendable { - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { +extension NominalFunctionTypes._MainActorAsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in do { let partialResult = try await b.run(with: input) @@ -96,7 +96,7 @@ extension NominalFunctionTypes::_MainActorAsyncThrowingFunction where Self : Swi } } } - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in do { let partialResult = try await b.run(with: input) @@ -110,7 +110,7 @@ extension NominalFunctionTypes::_MainActorAsyncThrowingFunction where Self : Swi } } } - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift::Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in do { let partialResult = try await b.run(with: input) @@ -124,7 +124,7 @@ extension NominalFunctionTypes::_MainActorAsyncThrowingFunction where Self : Swi } } } - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift::Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in do { let partialResult = try await b.run(with: input) @@ -139,20 +139,20 @@ extension NominalFunctionTypes::_MainActorAsyncThrowingFunction where Self : Swi } } } -extension NominalFunctionTypes::_MainActorAsyncFunction where Self : Swift::Sendable { - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorAsyncFunc where B : NominalFunctionTypes::_MainActorAsyncFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { +extension NominalFunctionTypes._MainActorAsyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncFunc { (input: B.Input) async -> Output in await self.run(with: b.run(with: input)) } } - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorAsyncFunc where B : NominalFunctionTypes::AsyncFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncFunc { (input: B.Input) async -> Output in await self.run(with: b.run(with: input)) } } } -extension NominalFunctionTypes::_MainActorSyncThrowingFunction where Self : Swift::Sendable { - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { +extension NominalFunctionTypes._MainActorSyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in do { let partialResult = try b.run(with: input) @@ -166,7 +166,7 @@ extension NominalFunctionTypes::_MainActorSyncThrowingFunction where Self : Swif } } } - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in do { let partialResult = try b.run(with: input) @@ -180,7 +180,7 @@ extension NominalFunctionTypes::_MainActorSyncThrowingFunction where Self : Swif } } } - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc where B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift::Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in do { let partialResult = try b.run(with: input) @@ -194,7 +194,7 @@ extension NominalFunctionTypes::_MainActorSyncThrowingFunction where Self : Swif } } } - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc where B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift::Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in do { let partialResult = try b.run(with: input) @@ -209,20 +209,20 @@ extension NominalFunctionTypes::_MainActorSyncThrowingFunction where Self : Swif } } } -extension NominalFunctionTypes::_MainActorSyncFunction where Self : Swift::Sendable { - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorSyncFunc where B : NominalFunctionTypes::_MainActorSyncFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { +extension NominalFunctionTypes._MainActorSyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncFunc { (input: B.Input) -> Output in self.run(with: b.run(with: input)) } } - @inlinable public func compose(_ b: B) -> NominalFunctionTypes::MainActorSyncFunc where B : NominalFunctionTypes::SyncFunction, B : Swift::Sendable, Self.Input == B.Output, B.Input : Swift::Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncFunc { (input: B.Input) -> Output in self.run(with: b.run(with: input)) } } } -extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendable { - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::SendableAsyncThrowingFunc> where B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, Self.Input == B.Output { +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output { SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in do { let partialResult = try await b.run(with: input) @@ -236,7 +236,7 @@ extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendab } } } - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::SendableAsyncThrowingFunc where B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, Self.Failure == B.Failure, Self.Input == B.Output { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output { SendableAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in do { let partialResult = try await b.run(with: input) @@ -251,15 +251,15 @@ extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendab } } } -extension NominalFunctionTypes::AsyncFunction where Self : Swift::Sendable { - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::SendableAsyncFunc where B : NominalFunctionTypes::AsyncFunction, B : Swift::Sendable, Self.Input == B.Output { +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncFunc where B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, Self.Input == B.Output { SendableAsyncFunc { (input: B.Input) async -> Output in await self.run(with: b.run(with: input)) } } } -extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendable { - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::SendableSyncThrowingFunc> where B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, Self.Input == B.Output { +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output { SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in do { let partialResult = try b.run(with: input) @@ -273,7 +273,7 @@ extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendabl } } } - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::SendableSyncThrowingFunc where B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, Self.Failure == B.Failure, Self.Input == B.Output { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output { SendableSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in do { let partialResult = try b.run(with: input) @@ -288,15 +288,15 @@ extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendabl } } } -extension NominalFunctionTypes::SyncFunction where Self : Swift::Sendable { - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::SendableSyncFunc where B : NominalFunctionTypes::SyncFunction, B : Swift::Sendable, Self.Input == B.Output { +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncFunc where B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, Self.Input == B.Output { SendableSyncFunc { (input: B.Input) -> Output in self.run(with: b.run(with: input)) } } } -extension NominalFunctionTypes::AsyncThrowingFunction { - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::AsyncThrowingFunc> where B : NominalFunctionTypes::AsyncThrowingFunction, Self.Input == B.Output { +extension NominalFunctionTypes.AsyncThrowingFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, Self.Input == B.Output { AsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in do { let partialResult = try await b.run(with: input) @@ -310,7 +310,7 @@ extension NominalFunctionTypes::AsyncThrowingFunction { } } } - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::AsyncThrowingFunc where B : NominalFunctionTypes::AsyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { AsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in do { let partialResult = try await b.run(with: input) @@ -325,15 +325,15 @@ extension NominalFunctionTypes::AsyncThrowingFunction { } } } -extension NominalFunctionTypes::AsyncFunction { - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::AsyncFunc where B : NominalFunctionTypes::AsyncFunction, Self.Input == B.Output { +extension NominalFunctionTypes.AsyncFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncFunc where B : NominalFunctionTypes.AsyncFunction, Self.Input == B.Output { AsyncFunc { (input: B.Input) async -> Output in await self.run(with: b.run(with: input)) } } } -extension NominalFunctionTypes::SyncThrowingFunction { - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::SyncThrowingFunc> where B : NominalFunctionTypes::SyncThrowingFunction, Self.Input == B.Output { +extension NominalFunctionTypes.SyncThrowingFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, Self.Input == B.Output { SyncThrowingFunc { (input: B.Input) throws(Either) -> Output in do { let partialResult = try b.run(with: input) @@ -347,7 +347,7 @@ extension NominalFunctionTypes::SyncThrowingFunction { } } } - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::SyncThrowingFunc where B : NominalFunctionTypes::SyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { SyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in do { let partialResult = try b.run(with: input) @@ -362,15 +362,15 @@ extension NominalFunctionTypes::SyncThrowingFunction { } } } -extension NominalFunctionTypes::SyncFunction { - @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes::SyncFunc where B : NominalFunctionTypes::SyncFunction, Self.Input == B.Output { +extension NominalFunctionTypes.SyncFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncFunc where B : NominalFunctionTypes.SyncFunction, Self.Input == B.Output { SyncFunc { (input: B.Input) -> Output in self.run(with: b.run(with: input)) } } } -extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendable { - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in do { let partialResult = try await self.run(with: input) @@ -384,7 +384,7 @@ extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendab } } } - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, Self.Failure == A.Failure, Self.Input : Swift::Sendable, Self.Output == A.Input { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await self.run(with: input) @@ -399,15 +399,15 @@ extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendab } } } -extension NominalFunctionTypes::AsyncFunction where Self : Swift::Sendable { - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorAsyncFunc where A : NominalFunctionTypes::_MainActorAsyncFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorAsyncFunc { (input: Input) async -> A.Output in await a.run(with: self.run(with: input)) } } } -extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendable { - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in do { let partialResult = try self.run(with: input) @@ -421,7 +421,7 @@ extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendabl } } } - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, Self.Failure == A.Failure, Self.Input : Swift::Sendable, Self.Output == A.Input { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in do { let partialResult = try self.run(with: input) @@ -436,15 +436,15 @@ extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendabl } } } -extension NominalFunctionTypes::SyncFunction where Self : Swift::Sendable { - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorSyncFunc where A : NominalFunctionTypes::_MainActorSyncFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorSyncFunc { (input: Input) -> A.Output in a.run(with: self.run(with: input)) } } } -extension NominalFunctionTypes::_MainActorAsyncThrowingFunction where Self : Swift::Sendable { - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes._MainActorAsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in do { let partialResult = try await self.run(with: input) @@ -458,7 +458,7 @@ extension NominalFunctionTypes::_MainActorAsyncThrowingFunction where Self : Swi } } } - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in do { let partialResult = try await self.run(with: input) @@ -472,7 +472,7 @@ extension NominalFunctionTypes::_MainActorAsyncThrowingFunction where Self : Swi } } } - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, Self.Failure == A.Failure, Self.Input : Swift::Sendable, Self.Output == A.Input { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await self.run(with: input) @@ -486,7 +486,7 @@ extension NominalFunctionTypes::_MainActorAsyncThrowingFunction where Self : Swi } } } - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, Self.Failure == A.Failure, Self.Input : Swift::Sendable, Self.Output == A.Input { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await self.run(with: input) @@ -501,20 +501,20 @@ extension NominalFunctionTypes::_MainActorAsyncThrowingFunction where Self : Swi } } } -extension NominalFunctionTypes::_MainActorAsyncFunction where Self : Swift::Sendable { - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorAsyncFunc where A : NominalFunctionTypes::_MainActorAsyncFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes._MainActorAsyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorAsyncFunc { (input: Input) async -> A.Output in await a.run(with: self.run(with: input)) } } - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorAsyncFunc where A : NominalFunctionTypes::AsyncFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorAsyncFunc { (input: Input) async -> A.Output in await a.run(with: self.run(with: input)) } } } -extension NominalFunctionTypes::_MainActorSyncThrowingFunction where Self : Swift::Sendable { - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes._MainActorSyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in do { let partialResult = try self.run(with: input) @@ -528,7 +528,7 @@ extension NominalFunctionTypes::_MainActorSyncThrowingFunction where Self : Swif } } } - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in do { let partialResult = try self.run(with: input) @@ -542,7 +542,7 @@ extension NominalFunctionTypes::_MainActorSyncThrowingFunction where Self : Swif } } } - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, Self.Failure == A.Failure, Self.Input : Swift::Sendable, Self.Output == A.Input { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in do { let partialResult = try self.run(with: input) @@ -556,7 +556,7 @@ extension NominalFunctionTypes::_MainActorSyncThrowingFunction where Self : Swif } } } - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, Self.Failure == A.Failure, Self.Input : Swift::Sendable, Self.Output == A.Input { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in do { let partialResult = try self.run(with: input) @@ -571,20 +571,20 @@ extension NominalFunctionTypes::_MainActorSyncThrowingFunction where Self : Swif } } } -extension NominalFunctionTypes::_MainActorSyncFunction where Self : Swift::Sendable { - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorSyncFunc where A : NominalFunctionTypes::_MainActorSyncFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes._MainActorSyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorSyncFunc { (input: Input) -> A.Output in a.run(with: self.run(with: input)) } } - @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::MainActorSyncFunc where A : NominalFunctionTypes::SyncFunction, A : Swift::Sendable, Self.Input : Swift::Sendable, Self.Output == A.Input { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { MainActorSyncFunc { (input: Input) -> A.Output in a.run(with: self.run(with: input)) } } } -extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendable { - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::SendableAsyncThrowingFunc> where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Output == A.Input { SendableAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in do { let partialResult = try await self.run(with: input) @@ -598,7 +598,7 @@ extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendab } } } - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::SendableAsyncThrowingFunc where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, Self.Failure == A.Failure, Self.Output == A.Input { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Output == A.Input { SendableAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await self.run(with: input) @@ -613,15 +613,15 @@ extension NominalFunctionTypes::AsyncThrowingFunction where Self : Swift::Sendab } } } -extension NominalFunctionTypes::AsyncFunction where Self : Swift::Sendable { - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::SendableAsyncFunc where A : NominalFunctionTypes::AsyncFunction, A : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, Self.Output == A.Input { SendableAsyncFunc { (input: Input) async -> A.Output in await a.run(with: self.run(with: input)) } } } -extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendable { - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::SendableSyncThrowingFunc> where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Output == A.Input { SendableSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in do { let partialResult = try self.run(with: input) @@ -635,7 +635,7 @@ extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendabl } } } - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::SendableSyncThrowingFunc where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, Self.Failure == A.Failure, Self.Output == A.Input { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Output == A.Input { SendableSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in do { let partialResult = try self.run(with: input) @@ -650,15 +650,15 @@ extension NominalFunctionTypes::SyncThrowingFunction where Self : Swift::Sendabl } } } -extension NominalFunctionTypes::SyncFunction where Self : Swift::Sendable { - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::SendableSyncFunc where A : NominalFunctionTypes::SyncFunction, A : Swift::Sendable, Self.Output == A.Input { +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, Self.Output == A.Input { SendableSyncFunc { (input: Input) -> A.Output in a.run(with: self.run(with: input)) } } } -extension NominalFunctionTypes::AsyncThrowingFunction { - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::AsyncThrowingFunc> where A : NominalFunctionTypes::AsyncThrowingFunction, Self.Output == A.Input { +extension NominalFunctionTypes.AsyncThrowingFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, Self.Output == A.Input { AsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in do { let partialResult = try await self.run(with: input) @@ -672,7 +672,7 @@ extension NominalFunctionTypes::AsyncThrowingFunction { } } } - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::AsyncThrowingFunc where A : NominalFunctionTypes::AsyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { AsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await self.run(with: input) @@ -687,15 +687,15 @@ extension NominalFunctionTypes::AsyncThrowingFunction { } } } -extension NominalFunctionTypes::AsyncFunction { - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::AsyncFunc where A : NominalFunctionTypes::AsyncFunction, Self.Output == A.Input { +extension NominalFunctionTypes.AsyncFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, Self.Output == A.Input { AsyncFunc { (input: Input) async -> A.Output in await a.run(with: self.run(with: input)) } } } -extension NominalFunctionTypes::SyncThrowingFunction { - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::SyncThrowingFunc> where A : NominalFunctionTypes::SyncThrowingFunction, Self.Output == A.Input { +extension NominalFunctionTypes.SyncThrowingFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, Self.Output == A.Input { SyncThrowingFunc { (input: Input) throws(Either) -> A.Output in do { let partialResult = try self.run(with: input) @@ -709,7 +709,7 @@ extension NominalFunctionTypes::SyncThrowingFunction { } } } - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::SyncThrowingFunc where A : NominalFunctionTypes::SyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { SyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in do { let partialResult = try self.run(with: input) @@ -724,8 +724,8 @@ extension NominalFunctionTypes::SyncThrowingFunction { } } } -extension NominalFunctionTypes::SyncFunction { - @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes::SyncFunc where A : NominalFunctionTypes::SyncFunction, Self.Output == A.Input { +extension NominalFunctionTypes.SyncFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, Self.Output == A.Input { SyncFunc { (input: Input) -> A.Output in a.run(with: self.run(with: input)) } diff --git a/.agents/interfaces/macos/NominalFunctionTypesCompositionOperators.swiftinterface b/.agents/interfaces/macos/NominalFunctionTypesCompositionOperators.swiftinterface index 5929afa..88a5adc 100644 --- a/.agents/interfaces/macos/NominalFunctionTypesCompositionOperators.swiftinterface +++ b/.agents/interfaces/macos/NominalFunctionTypesCompositionOperators.swiftinterface @@ -1,38 +1,38 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.4 (swiftlang-6.4.0.25.4 clang-2100.3.25.1) -// swift-module-flags: -target arm64-apple-macos12.0 -enable-objc-interop -language-mode 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name NominalFunctionTypesCompositionOperators -package-name swift_function_composition -// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.4 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-macosx10.15 -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionOperators -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 @_exported import FunctionCompositionOperators import NominalFunctionTypes import Swift import _Concurrency import _StringProcessing import _SwiftConcurrencyShims -@inlinable public func <| (f: F, input: F.Input) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes::AsyncThrowingFunction { +@inlinable public func <| (f: F, input: F.Input) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes.AsyncThrowingFunction { return try await f.run(with: input) } -@inlinable public func <| (f: F, input: F.Input) async -> F.Output where F : NominalFunctionTypes::AsyncFunction { +@inlinable public func <| (f: F, input: F.Input) async -> F.Output where F : NominalFunctionTypes.AsyncFunction { return await f.run(with: input) } -@inlinable public func <| (f: F, input: F.Input) throws(F.Failure) -> F.Output where F : NominalFunctionTypes::SyncThrowingFunction { +@inlinable public func <| (f: F, input: F.Input) throws(F.Failure) -> F.Output where F : NominalFunctionTypes.SyncThrowingFunction { return try f.run(with: input) } -@inlinable public func <| (f: F, input: F.Input) -> F.Output where F : NominalFunctionTypes::SyncFunction { +@inlinable public func <| (f: F, input: F.Input) -> F.Output where F : NominalFunctionTypes.SyncFunction { return f.run(with: input) } -@inlinable public func |> (input: F.Input, f: F) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes::AsyncThrowingFunction { +@inlinable public func |> (input: F.Input, f: F) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes.AsyncThrowingFunction { return try await f.run(with: input) } -@inlinable public func |> (input: F.Input, f: F) async -> F.Output where F : NominalFunctionTypes::AsyncFunction { +@inlinable public func |> (input: F.Input, f: F) async -> F.Output where F : NominalFunctionTypes.AsyncFunction { return await f.run(with: input) } -@inlinable public func |> (input: F.Input, f: F) throws(F.Failure) -> F.Output where F : NominalFunctionTypes::SyncThrowingFunction { +@inlinable public func |> (input: F.Input, f: F) throws(F.Failure) -> F.Output where F : NominalFunctionTypes.SyncThrowingFunction { return try f.run(with: input) } -@inlinable public func |> (input: F.Input, f: F) -> F.Output where F : NominalFunctionTypes::SyncFunction { +@inlinable public func |> (input: F.Input, f: F) -> F.Output where F : NominalFunctionTypes.SyncFunction { return f.run(with: input) } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -46,7 +46,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -60,7 +60,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -74,7 +74,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -88,7 +88,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -102,7 +102,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -116,22 +116,22 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorAsyncFunc where A : NominalFunctionTypes::_MainActorAsyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncFunc { (input: B.Input) async -> A.Output in await a.run(with: b.run(with: input)) } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorAsyncFunc where A : NominalFunctionTypes::_MainActorAsyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncFunc { (input: B.Input) async -> A.Output in await a.run(with: b.run(with: input)) } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorAsyncFunc where A : NominalFunctionTypes::AsyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncFunc { (input: B.Input) async -> A.Output in await a.run(with: b.run(with: input)) } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in do { let partialResult = try b.run(with: input) @@ -145,7 +145,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in do { let partialResult = try b.run(with: input) @@ -159,7 +159,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in do { let partialResult = try b.run(with: input) @@ -173,7 +173,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in do { let partialResult = try b.run(with: input) @@ -187,7 +187,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in do { let partialResult = try b.run(with: input) @@ -201,7 +201,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorSyncThrowingFunc where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in do { let partialResult = try b.run(with: input) @@ -215,22 +215,22 @@ import _SwiftConcurrencyShims } } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorSyncFunc where A : NominalFunctionTypes::_MainActorSyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncFunc { (input: B.Input) -> A.Output in a.run(with: b.run(with: input)) } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorSyncFunc where A : NominalFunctionTypes::_MainActorSyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncFunc { (input: B.Input) -> A.Output in a.run(with: b.run(with: input)) } } -@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::MainActorSyncFunc where A : NominalFunctionTypes::SyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncFunc { (input: B.Input) -> A.Output in a.run(with: b.run(with: input)) } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::SendableAsyncThrowingFunc> where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -244,7 +244,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::SendableAsyncThrowingFunc where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { SendableAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -258,12 +258,12 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::SendableAsyncFunc where A : NominalFunctionTypes::AsyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncFunction, B : Swift::Sendable, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output { SendableAsyncFunc { (input: B.Input) async -> A.Output in await a.run(with: b.run(with: input)) } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::SendableSyncThrowingFunc> where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in do { let partialResult = try b.run(with: input) @@ -277,7 +277,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::SendableSyncThrowingFunc where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { SendableSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in do { let partialResult = try b.run(with: input) @@ -291,12 +291,12 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::SendableSyncFunc where A : NominalFunctionTypes::SyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncFunction, B : Swift::Sendable, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output { SendableSyncFunc { (input: B.Input) -> A.Output in a.run(with: b.run(with: input)) } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::AsyncThrowingFunc> where A : NominalFunctionTypes::AsyncThrowingFunction, B : NominalFunctionTypes::AsyncThrowingFunction, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Input == B.Output { AsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -310,7 +310,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::AsyncThrowingFunc where A : NominalFunctionTypes::AsyncThrowingFunction, B : NominalFunctionTypes::AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { AsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -324,12 +324,12 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::AsyncFunc where A : NominalFunctionTypes::AsyncFunction, B : NominalFunctionTypes::AsyncFunction, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, B : NominalFunctionTypes.AsyncFunction, A.Input == B.Output { AsyncFunc { (input: B.Input) async -> A.Output in await a.run(with: b.run(with: input)) } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::SyncThrowingFunc> where A : NominalFunctionTypes::SyncThrowingFunction, B : NominalFunctionTypes::SyncThrowingFunction, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Input == B.Output { SyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in do { let partialResult = try b.run(with: input) @@ -343,7 +343,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::SyncThrowingFunc where A : NominalFunctionTypes::SyncThrowingFunction, B : NominalFunctionTypes::SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { SyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in do { let partialResult = try b.run(with: input) @@ -357,12 +357,12 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes::SyncFunc where A : NominalFunctionTypes::SyncFunction, B : NominalFunctionTypes::SyncFunction, A.Input == B.Output { +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, B : NominalFunctionTypes.SyncFunction, A.Input == B.Output { SyncFunc { (input: B.Input) -> A.Output in a.run(with: b.run(with: input)) } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -376,7 +376,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -390,7 +390,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc> where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -404,7 +404,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -418,7 +418,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where A : NominalFunctionTypes::_MainActorAsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -432,7 +432,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorAsyncThrowingFunc where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -446,22 +446,22 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorAsyncFunc where A : NominalFunctionTypes::_MainActorAsyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncFunc { (input: B.Input) async -> A.Output in await a.run(with: b.run(with: input)) } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorAsyncFunc where A : NominalFunctionTypes::_MainActorAsyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncFunc { (input: B.Input) async -> A.Output in await a.run(with: b.run(with: input)) } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorAsyncFunc where A : NominalFunctionTypes::AsyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorAsyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorAsyncFunc { (input: B.Input) async -> A.Output in await a.run(with: b.run(with: input)) } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in do { let partialResult = try b.run(with: input) @@ -475,7 +475,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in do { let partialResult = try b.run(with: input) @@ -489,7 +489,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc> where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in do { let partialResult = try b.run(with: input) @@ -503,7 +503,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in do { let partialResult = try b.run(with: input) @@ -517,7 +517,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc where A : NominalFunctionTypes::_MainActorSyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in do { let partialResult = try b.run(with: input) @@ -531,7 +531,7 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorSyncThrowingFunc where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in do { let partialResult = try b.run(with: input) @@ -545,22 +545,22 @@ import _SwiftConcurrencyShims } } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorSyncFunc where A : NominalFunctionTypes::_MainActorSyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncFunc { (input: B.Input) -> A.Output in a.run(with: b.run(with: input)) } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorSyncFunc where A : NominalFunctionTypes::_MainActorSyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncFunc { (input: B.Input) -> A.Output in a.run(with: b.run(with: input)) } } -@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::MainActorSyncFunc where A : NominalFunctionTypes::SyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::_MainActorSyncFunction, B : Swift::Sendable, A.Input == B.Output, B.Input : Swift::Sendable { +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { MainActorSyncFunc { (input: B.Input) -> A.Output in a.run(with: b.run(with: input)) } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::SendableAsyncThrowingFunc> where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -574,7 +574,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::SendableAsyncThrowingFunc where A : NominalFunctionTypes::AsyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { SendableAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -588,12 +588,12 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::SendableAsyncFunc where A : NominalFunctionTypes::AsyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::AsyncFunction, B : Swift::Sendable, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output { SendableAsyncFunc { (input: B.Input) async -> A.Output in await a.run(with: b.run(with: input)) } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::SendableSyncThrowingFunc> where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in do { let partialResult = try b.run(with: input) @@ -607,7 +607,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::SendableSyncThrowingFunc where A : NominalFunctionTypes::SyncThrowingFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncThrowingFunction, B : Swift::Sendable, A.Failure == B.Failure, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { SendableSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in do { let partialResult = try b.run(with: input) @@ -621,12 +621,12 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::SendableSyncFunc where A : NominalFunctionTypes::SyncFunction, A : Swift::Sendable, B : NominalFunctionTypes::SyncFunction, B : Swift::Sendable, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output { SendableSyncFunc { (input: B.Input) -> A.Output in a.run(with: b.run(with: input)) } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::AsyncThrowingFunc> where A : NominalFunctionTypes::AsyncThrowingFunction, B : NominalFunctionTypes::AsyncThrowingFunction, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Input == B.Output { AsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -640,7 +640,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::AsyncThrowingFunc where A : NominalFunctionTypes::AsyncThrowingFunction, B : NominalFunctionTypes::AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { AsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in do { let partialResult = try await b.run(with: input) @@ -654,12 +654,12 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::AsyncFunc where A : NominalFunctionTypes::AsyncFunction, B : NominalFunctionTypes::AsyncFunction, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, B : NominalFunctionTypes.AsyncFunction, A.Input == B.Output { AsyncFunc { (input: B.Input) async -> A.Output in await a.run(with: b.run(with: input)) } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::SyncThrowingFunc> where A : NominalFunctionTypes::SyncThrowingFunction, B : NominalFunctionTypes::SyncThrowingFunction, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Input == B.Output { SyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in do { let partialResult = try b.run(with: input) @@ -673,7 +673,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::SyncThrowingFunc where A : NominalFunctionTypes::SyncThrowingFunction, B : NominalFunctionTypes::SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { SyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in do { let partialResult = try b.run(with: input) @@ -687,7 +687,7 @@ import _SwiftConcurrencyShims } } } -@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes::SyncFunc where A : NominalFunctionTypes::SyncFunction, B : NominalFunctionTypes::SyncFunction, A.Input == B.Output { +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, B : NominalFunctionTypes.SyncFunction, A.Input == B.Output { SyncFunc { (input: B.Input) -> A.Output in a.run(with: b.run(with: input)) } diff --git a/.agents/interfaces/macos/_Currying.swiftinterface b/.agents/interfaces/macos/_Currying.swiftinterface index 5884aa2..8101b37 100644 --- a/.agents/interfaces/macos/_Currying.swiftinterface +++ b/.agents/interfaces/macos/_Currying.swiftinterface @@ -1,7 +1,7 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.4 (swiftlang-6.4.0.25.4 clang-2100.3.25.1) -// swift-module-flags: -target arm64-apple-macos12.0 -enable-objc-interop -language-mode 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name _Currying -package-name swift_function_composition -// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.4 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-macosx10.15 -enable-objc-interop -swift-version 6 -O -module-name _Currying -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 import Swift import _Concurrency import _StringProcessing From bd895db51c2784c6cb5239f0d2385fec36c97630 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 07:06:12 +0200 Subject: [PATCH 4/6] Update ios Swift interfaces (#6) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .agents/interfaces/ios/Either.swiftinterface | 25 + .../ios/FunctionComposition.swiftinterface | 8 + ...unctionCompositionOperators.swiftinterface | 117 +++ .../ios/NominalFunctionTypes.swiftinterface | 336 +++++++ ...nalFunctionTypesComposition.swiftinterface | 9 + ...onTypesCompositionFunctions.swiftinterface | 934 ++++++++++++++++++ ...tionTypesCompositionMethods.swiftinterface | 733 ++++++++++++++ ...onTypesCompositionOperators.swiftinterface | 694 +++++++++++++ .../interfaces/ios/_Currying.swiftinterface | 144 +++ 9 files changed, 3000 insertions(+) create mode 100644 .agents/interfaces/ios/Either.swiftinterface create mode 100644 .agents/interfaces/ios/FunctionComposition.swiftinterface create mode 100644 .agents/interfaces/ios/FunctionCompositionOperators.swiftinterface create mode 100644 .agents/interfaces/ios/NominalFunctionTypes.swiftinterface create mode 100644 .agents/interfaces/ios/NominalFunctionTypesComposition.swiftinterface create mode 100644 .agents/interfaces/ios/NominalFunctionTypesCompositionFunctions.swiftinterface create mode 100644 .agents/interfaces/ios/NominalFunctionTypesCompositionMethods.swiftinterface create mode 100644 .agents/interfaces/ios/NominalFunctionTypesCompositionOperators.swiftinterface create mode 100644 .agents/interfaces/ios/_Currying.swiftinterface diff --git a/.agents/interfaces/ios/Either.swiftinterface b/.agents/interfaces/ios/Either.swiftinterface new file mode 100644 index 0000000..3cc2d61 --- /dev/null +++ b/.agents/interfaces/ios/Either.swiftinterface @@ -0,0 +1,25 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name Either -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +public enum Either { + case left(Left) + case right(Right) +} +extension Either.Either : Swift.Equatable where Left : Swift.Equatable, Right : Swift.Equatable { + @_semantics("derived_enum_equals") @_implements(Swift.Equatable, ==(_:_:)) public static func __derived_enum_equals(_ a: Either.Either, _ b: Either.Either) -> Swift.Bool +} +extension Either.Either : Swift.Hashable where Left : Swift.Hashable, Right : Swift.Hashable { + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension Either.Either : Swift.Sendable where Left : Swift.Sendable, Right : Swift.Sendable { +} +extension Either.Either : Swift.Error where Left : Swift.Error, Right : Swift.Error { +} diff --git a/.agents/interfaces/ios/FunctionComposition.swiftinterface b/.agents/interfaces/ios/FunctionComposition.swiftinterface new file mode 100644 index 0000000..5340ec5 --- /dev/null +++ b/.agents/interfaces/ios/FunctionComposition.swiftinterface @@ -0,0 +1,8 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name FunctionComposition -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims diff --git a/.agents/interfaces/ios/FunctionCompositionOperators.swiftinterface b/.agents/interfaces/ios/FunctionCompositionOperators.swiftinterface new file mode 100644 index 0000000..cf3418b --- /dev/null +++ b/.agents/interfaces/ios/FunctionCompositionOperators.swiftinterface @@ -0,0 +1,117 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name FunctionCompositionOperators -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +infix operator <| : infixr0 +infix operator |> : infixl1 +infix operator >>> : infixr9 +infix operator <<< : infixr9 +infix operator <¢> : infixl4 +infix operator ¢> : infixl4 +infix operator <¢ : infixl4 +infix operator <£> : infixl1 +infix operator >¢< : infixl4 +infix operator >£< : infixl4 +infix operator <|> : infixl3 +infix operator <*> : infixl4 +infix operator *> : infixl4 +infix operator <* : infixl4 +infix operator <%> : infixr4 +infix operator %> : infixr4 +infix operator <% : infixr4 +infix operator >=> : infixr1 +infix operator <=< : infixr1 +infix operator <> : infixr5 +prefix operator <> +postfix operator <> +precedencegroup HashRocket { + associativity: left + higherThan: infixr5 +} +infix operator => : HashRocket +precedencegroup infixl0 { + associativity: left + higherThan: AssignmentPrecedence +} +precedencegroup infixr0 { + associativity: right + higherThan: infixl0 +} +precedencegroup infixl1 { + associativity: left + higherThan: infixr0 +} +precedencegroup infixr1 { + associativity: right + higherThan: infixl1 +} +precedencegroup infixl2 { + associativity: left + higherThan: infixr1 +} +precedencegroup infixr2 { + associativity: right + higherThan: infixl2 +} +precedencegroup infixl3 { + associativity: left + higherThan: infixr2 +} +precedencegroup infixr3 { + associativity: right + higherThan: infixl3 +} +precedencegroup infixl4 { + associativity: left + higherThan: infixr3 +} +precedencegroup infixr4 { + associativity: right + higherThan: infixl4 +} +precedencegroup infixl5 { + associativity: left + higherThan: infixr4 +} +precedencegroup infixr5 { + associativity: right + higherThan: infixl5 + lowerThan: AdditionPrecedence +} +precedencegroup infixl6 { + associativity: left + higherThan: infixr5 +} +precedencegroup infixr6 { + associativity: right + higherThan: infixl6 + lowerThan: MultiplicationPrecedence +} +precedencegroup infixl7 { + associativity: left + higherThan: infixr6 +} +precedencegroup infixr7 { + associativity: right + higherThan: infixl7 +} +precedencegroup infixl8 { + associativity: left + higherThan: infixr7 +} +precedencegroup infixr8 { + associativity: right + higherThan: infixl8 +} +precedencegroup infixl9 { + associativity: left + higherThan: infixr8 +} +precedencegroup infixr9 { + associativity: right + higherThan: infixl9 +} diff --git a/.agents/interfaces/ios/NominalFunctionTypes.swiftinterface b/.agents/interfaces/ios/NominalFunctionTypes.swiftinterface new file mode 100644 index 0000000..7b69442 --- /dev/null +++ b/.agents/interfaces/ios/NominalFunctionTypes.swiftinterface @@ -0,0 +1,336 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypes -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import ConcurrencyExtras +@_exported import Either +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +public protocol AsyncFunction : NominalFunctionTypes.AsyncThrowingFunction where Self.Failure == Swift.Never { + func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +extension NominalFunctionTypes.AsyncFunction { + @inlinable public func run(with input: Self.Input) async throws(Swift.Never) -> Self.Output { + return await run(with: input) + } +} +public struct AsyncFunc : NominalFunctionTypes.AsyncFunction { + @usableFromInline + internal var call: (Input) async -> Output + public init(_ call: @escaping (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async -> Output { + return await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableAsyncFunc + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.AsyncFunc where Input == () { + @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +public protocol _MainActorAsyncFunction : NominalFunctionTypes._MainActorAsyncThrowingFunction where Self.Failure == Swift.Never { + @_Concurrency.MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct MainActorAsyncFunc : NominalFunctionTypes._MainActorAsyncFunction, @_Concurrency.MainActor NominalFunctionTypes.AsyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) async -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorAsyncFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) async -> Output { + await call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.MainActorAsyncFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +public struct SendableAsyncFunc : NominalFunctionTypes.AsyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @Sendable (Input) async -> Output + public init(_ call: @escaping @Sendable (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async -> Output { + return await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SendableAsyncFunc where Input == () { + @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +extension NominalFunctionTypes.SendableAsyncFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorAsyncFunc { + MainActorAsyncFunc(call) + } +} +public protocol AsyncThrowingFunction : NominalFunctionTypes._NominalFunctionType { + associatedtype Failure : Swift.Error + func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct AsyncThrowingFunc : NominalFunctionTypes.AsyncThrowingFunction where Failure : Swift.Error { + @usableFromInline + internal var call: (Input) async throws(Failure) -> Output + public init(_ call: @escaping (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncThrowingFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableAsyncThrowingFunc +} +extension NominalFunctionTypes.AsyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +public protocol _MainActorAsyncThrowingFunction : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { + associatedtype Failure : Swift.Error + @_Concurrency.MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct MainActorAsyncThrowingFunc : NominalFunctionTypes._MainActorAsyncThrowingFunction, @_Concurrency.MainActor NominalFunctionTypes.AsyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) async throws(Failure) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorAsyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } +} +extension NominalFunctionTypes.MainActorAsyncThrowingFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +public struct SendableAsyncThrowingFunc : NominalFunctionTypes.AsyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @Sendable (Input) async throws(Failure) -> Output + public init(_ call: @escaping @Sendable (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } +} +extension NominalFunctionTypes.SendableAsyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +extension NominalFunctionTypes.SendableAsyncThrowingFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorAsyncThrowingFunc { + MainActorAsyncThrowingFunc(call) + } +} +public protocol _MainActorSyncFunction : NominalFunctionTypes._MainActorAsyncFunction, NominalFunctionTypes._MainActorSyncThrowingFunction { + @_Concurrency.MainActor func run(with input: Self.Input) -> Self.Output +} +public struct MainActorSyncFunc : NominalFunctionTypes._MainActorSyncFunction, @_Concurrency.MainActor NominalFunctionTypes.SyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorSyncFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.MainActorSyncFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +public struct SendableSyncFunc : NominalFunctionTypes.SyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @Sendable (Input) -> Output + public init(_ call: @escaping @Sendable (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SendableSyncFunc where Input == () { + @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +extension NominalFunctionTypes.SendableSyncFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorSyncFunc { + MainActorSyncFunc(call) + } +} +public protocol SyncFunction : NominalFunctionTypes.AsyncFunction, NominalFunctionTypes.SyncThrowingFunction { + func run(with input: Self.Input) -> Self.Output +} +extension NominalFunctionTypes.SyncFunction { + @inlinable public func syncRun(with input: Self.Input) -> Self.Output { + return run(with: input) + } + @inlinable public func run(with input: Self.Input) async -> Self.Output { + return syncRun(with: input) + } + @inlinable public func run(with input: Self.Input) throws(Self.Failure) -> Self.Output { + return run(with: input) + } +} +public struct SyncFunc : NominalFunctionTypes.SyncFunction { + @usableFromInline + internal var call: (Input) -> Output + public init(_ call: @escaping (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableSyncFunc + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SyncFunc where Input == () { + @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +public protocol _MainActorSyncThrowingFunction : NominalFunctionTypes._MainActorAsyncThrowingFunction { + @_Concurrency.MainActor func run(with input: Self.Input) throws(Self.Failure) -> Self.Output +} +public struct MainActorSyncThrowingFunc : NominalFunctionTypes._MainActorSyncThrowingFunction, @_Concurrency.MainActor NominalFunctionTypes.SyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) throws(Failure) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorSyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try call(input) + } +} +extension NominalFunctionTypes.MainActorSyncThrowingFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +public struct SendableSyncThrowingFunc : NominalFunctionTypes.SyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @Sendable (Input) throws(Failure) -> Output + public init(_ call: @escaping @Sendable (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @inlinable public func callAsFunction(_ input: Input) throws(Failure) -> Output { + return try call(input) + } +} +extension NominalFunctionTypes.SendableSyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +extension NominalFunctionTypes.SendableSyncThrowingFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorSyncThrowingFunc { + MainActorSyncThrowingFunc(call) + } +} +public protocol SyncThrowingFunction : NominalFunctionTypes.AsyncThrowingFunction { + func run(with input: Self.Input) throws(Self.Failure) -> Self.Output +} +extension NominalFunctionTypes.SyncThrowingFunction { + @inlinable public func syncRun(with input: Self.Input) throws(Self.Failure) -> Self.Output { + return try run(with: input) + } + @inlinable public func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output { + return try syncRun(with: input) + } +} +public struct SyncThrowingFunc : NominalFunctionTypes.SyncThrowingFunction where Failure : Swift.Error { + @usableFromInline + internal var call: (Input) throws(Failure) -> Output + public init(_ call: @escaping (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncThrowingFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @inlinable public func callAsFunction(_ input: Input) throws(Failure) -> Output { + return try call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableSyncThrowingFunc +} +extension NominalFunctionTypes.SyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +public protocol _AnyNominalFunctionType { +} +public protocol _NominalFunctionType : NominalFunctionTypes._AnyNominalFunctionType { + associatedtype Input + associatedtype Output +} +public protocol _MainActorNominalFunctionTypeMarker { + associatedtype Input + associatedtype Output +} +extension NominalFunctionTypes.MainActorAsyncFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorAsyncThrowingFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorSyncFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorSyncThrowingFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} diff --git a/.agents/interfaces/ios/NominalFunctionTypesComposition.swiftinterface b/.agents/interfaces/ios/NominalFunctionTypesComposition.swiftinterface new file mode 100644 index 0000000..16f95a6 --- /dev/null +++ b/.agents/interfaces/ios/NominalFunctionTypesComposition.swiftinterface @@ -0,0 +1,9 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesComposition -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +@_exported import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims diff --git a/.agents/interfaces/ios/NominalFunctionTypesCompositionFunctions.swiftinterface b/.agents/interfaces/ios/NominalFunctionTypesCompositionFunctions.swiftinterface new file mode 100644 index 0000000..55ebae9 --- /dev/null +++ b/.agents/interfaces/ios/NominalFunctionTypesCompositionFunctions.swiftinterface @@ -0,0 +1,934 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionFunctions -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Either +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F3 : NominalFunctionTypes._MainActorAsyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F3 : NominalFunctionTypes._MainActorSyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + SendableSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F3 : NominalFunctionTypes.AsyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F3 : NominalFunctionTypes.SyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F1.Input == F0.Output { + AsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { + AsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F3 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F1.Input == F0.Output { + SyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { + SyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F3 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F2 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F3 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F2 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F3 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + MainActorSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + MainActorSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + SendableSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + SendableAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SendableAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + SendableSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SendableSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input { + AsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { + AsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F3 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F3 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input { + SyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { + SyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F3 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F3 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input { + AsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { + AsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F3 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + AsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input { + SyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { + SyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F3 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} diff --git a/.agents/interfaces/ios/NominalFunctionTypesCompositionMethods.swiftinterface b/.agents/interfaces/ios/NominalFunctionTypesCompositionMethods.swiftinterface new file mode 100644 index 0000000..e8c230c --- /dev/null +++ b/.agents/interfaces/ios/NominalFunctionTypesCompositionMethods.swiftinterface @@ -0,0 +1,733 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionMethods -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorAsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes._MainActorAsyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorSyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes._MainActorSyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncFunc where B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncFunc where B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, Self.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncFunc where B : NominalFunctionTypes.AsyncFunction, Self.Input == B.Output { + AsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, Self.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncFunc where B : NominalFunctionTypes.SyncFunction, Self.Input == B.Output { + SyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorAsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes._MainActorAsyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorSyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes._MainActorSyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Output == A.Input { + SendableAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Output == A.Input { + SendableSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, Self.Output == A.Input { + AsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { + AsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, Self.Output == A.Input { + AsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, Self.Output == A.Input { + SyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { + SyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, Self.Output == A.Input { + SyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} diff --git a/.agents/interfaces/ios/NominalFunctionTypesCompositionOperators.swiftinterface b/.agents/interfaces/ios/NominalFunctionTypesCompositionOperators.swiftinterface new file mode 100644 index 0000000..431f14d --- /dev/null +++ b/.agents/interfaces/ios/NominalFunctionTypesCompositionOperators.swiftinterface @@ -0,0 +1,694 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionOperators -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +@_exported import FunctionCompositionOperators +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func <| (f: F, input: F.Input) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes.AsyncThrowingFunction { + return try await f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) async -> F.Output where F : NominalFunctionTypes.AsyncFunction { + return await f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) throws(F.Failure) -> F.Output where F : NominalFunctionTypes.SyncThrowingFunction { + return try f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) -> F.Output where F : NominalFunctionTypes.SyncFunction { + return f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes.AsyncThrowingFunction { + return try await f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) async -> F.Output where F : NominalFunctionTypes.AsyncFunction { + return await f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) throws(F.Failure) -> F.Output where F : NominalFunctionTypes.SyncThrowingFunction { + return try f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) -> F.Output where F : NominalFunctionTypes.SyncFunction { + return f.run(with: input) +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, B : NominalFunctionTypes.AsyncFunction, A.Input == B.Output { + AsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, B : NominalFunctionTypes.SyncFunction, A.Input == B.Output { + SyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, B : NominalFunctionTypes.AsyncFunction, A.Input == B.Output { + AsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, B : NominalFunctionTypes.SyncFunction, A.Input == B.Output { + SyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} diff --git a/.agents/interfaces/ios/_Currying.swiftinterface b/.agents/interfaces/ios/_Currying.swiftinterface new file mode 100644 index 0000000..75a333a --- /dev/null +++ b/.agents/interfaces/ios/_Currying.swiftinterface @@ -0,0 +1,144 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -swift-version 6 -O -module-name _Currying -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func curry(_ function: @escaping (A, B) -> C) -> (A) -> (B) -> C { + return { (a: A) -> (B) -> C in + { (b: B) -> C in + function(a, b) + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C) -> D) -> (A) -> (B) -> (C) -> D { + return { (a: A) -> (B) -> (C) -> D in + { (b: B) -> (C) -> D in + { (c: C) -> D in + function(a, b, c) + } + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C, D) -> E) -> (A) -> (B) -> (C) -> (D) -> E { + return { (a: A) -> (B) -> (C) -> (D) -> E in + { (b: B) -> (C) -> (D) -> E in + { (c: C) -> (D) -> E in + { (d: D) -> E in + function(a, b, c, d) + } + } + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C, D, E) -> F) -> (A) -> (B) -> (C) -> (D) -> (E) -> F { + return { (a: A) -> (B) -> (C) -> (D) -> (E) -> F in + { (b: B) -> (C) -> (D) -> (E) -> F in + { (c: C) -> (D) -> (E) -> F in + { (d: D) -> (E) -> F in + { (e: E) -> F in + function(a, b, c, d, e) + } + } + } + } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> C) -> (B) -> (A) -> C { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> D) -> (B) -> (A) -> (C) -> D { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (B) -> (A) -> (C) -> (D) -> E { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (B) -> (A) -> (C) -> (D) -> (E) -> F { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> D) -> (A) -> (C) -> (B) -> D { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A) -> (C) -> (B) -> (D) -> E { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (C) -> (B) -> (D) -> (E) -> F { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip3(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A) -> (B) -> (D) -> (C) -> E { + return { a in + { b in + { d in + { c in + f(a)(b)(c)(d) + } + } + } + } +} +@inlinable public func flip3(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (B) -> (D) -> (C) -> (E) -> F { + return { a in + { b in + { d in + { c in + f(a)(b)(c)(d) + } + } + } + } +} +@inlinable public func flip4(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (B) -> (C) -> (E) -> (D) -> F { + return { a in + { b in + { c in + { e in + { d in + f(a)(b)(c)(d)(e) + } + } + } + } + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> C) -> (A, B) -> C { + return { a, b in + _f(a)(b) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> D) -> (A, B, C) -> D { + return { a, b, c in + _f(a)(b)(c) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A, B, C, D) -> E { + return { a, b, c, d in + _f(a)(b)(c)(d) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A, B, C, D, E) -> F { + return { a, b, c, d, e in + _f(a)(b)(c)(d)(e) + } +} From 1fc634194a0169ecbc25583b06811d895aa6423a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 07:06:15 +0200 Subject: [PATCH 5/6] Update watchos Swift interfaces (#7) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../interfaces/watchos/Either.swiftinterface | 25 + .../FunctionComposition.swiftinterface | 8 + ...unctionCompositionOperators.swiftinterface | 117 +++ .../NominalFunctionTypes.swiftinterface | 336 +++++++ ...nalFunctionTypesComposition.swiftinterface | 9 + ...onTypesCompositionFunctions.swiftinterface | 934 ++++++++++++++++++ ...tionTypesCompositionMethods.swiftinterface | 733 ++++++++++++++ ...onTypesCompositionOperators.swiftinterface | 694 +++++++++++++ .../watchos/_Currying.swiftinterface | 144 +++ 9 files changed, 3000 insertions(+) create mode 100644 .agents/interfaces/watchos/Either.swiftinterface create mode 100644 .agents/interfaces/watchos/FunctionComposition.swiftinterface create mode 100644 .agents/interfaces/watchos/FunctionCompositionOperators.swiftinterface create mode 100644 .agents/interfaces/watchos/NominalFunctionTypes.swiftinterface create mode 100644 .agents/interfaces/watchos/NominalFunctionTypesComposition.swiftinterface create mode 100644 .agents/interfaces/watchos/NominalFunctionTypesCompositionFunctions.swiftinterface create mode 100644 .agents/interfaces/watchos/NominalFunctionTypesCompositionMethods.swiftinterface create mode 100644 .agents/interfaces/watchos/NominalFunctionTypesCompositionOperators.swiftinterface create mode 100644 .agents/interfaces/watchos/_Currying.swiftinterface diff --git a/.agents/interfaces/watchos/Either.swiftinterface b/.agents/interfaces/watchos/Either.swiftinterface new file mode 100644 index 0000000..0483c5f --- /dev/null +++ b/.agents/interfaces/watchos/Either.swiftinterface @@ -0,0 +1,25 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-watchos6.0-simulator -enable-objc-interop -swift-version 6 -O -module-name Either -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +public enum Either { + case left(Left) + case right(Right) +} +extension Either.Either : Swift.Equatable where Left : Swift.Equatable, Right : Swift.Equatable { + @_semantics("derived_enum_equals") @_implements(Swift.Equatable, ==(_:_:)) public static func __derived_enum_equals(_ a: Either.Either, _ b: Either.Either) -> Swift.Bool +} +extension Either.Either : Swift.Hashable where Left : Swift.Hashable, Right : Swift.Hashable { + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension Either.Either : Swift.Sendable where Left : Swift.Sendable, Right : Swift.Sendable { +} +extension Either.Either : Swift.Error where Left : Swift.Error, Right : Swift.Error { +} diff --git a/.agents/interfaces/watchos/FunctionComposition.swiftinterface b/.agents/interfaces/watchos/FunctionComposition.swiftinterface new file mode 100644 index 0000000..d58f4d8 --- /dev/null +++ b/.agents/interfaces/watchos/FunctionComposition.swiftinterface @@ -0,0 +1,8 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-watchos6.0-simulator -enable-objc-interop -swift-version 6 -O -module-name FunctionComposition -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims diff --git a/.agents/interfaces/watchos/FunctionCompositionOperators.swiftinterface b/.agents/interfaces/watchos/FunctionCompositionOperators.swiftinterface new file mode 100644 index 0000000..632c26c --- /dev/null +++ b/.agents/interfaces/watchos/FunctionCompositionOperators.swiftinterface @@ -0,0 +1,117 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-watchos6.0-simulator -enable-objc-interop -swift-version 6 -O -module-name FunctionCompositionOperators -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +infix operator <| : infixr0 +infix operator |> : infixl1 +infix operator >>> : infixr9 +infix operator <<< : infixr9 +infix operator <¢> : infixl4 +infix operator ¢> : infixl4 +infix operator <¢ : infixl4 +infix operator <£> : infixl1 +infix operator >¢< : infixl4 +infix operator >£< : infixl4 +infix operator <|> : infixl3 +infix operator <*> : infixl4 +infix operator *> : infixl4 +infix operator <* : infixl4 +infix operator <%> : infixr4 +infix operator %> : infixr4 +infix operator <% : infixr4 +infix operator >=> : infixr1 +infix operator <=< : infixr1 +infix operator <> : infixr5 +prefix operator <> +postfix operator <> +precedencegroup HashRocket { + associativity: left + higherThan: infixr5 +} +infix operator => : HashRocket +precedencegroup infixl0 { + associativity: left + higherThan: AssignmentPrecedence +} +precedencegroup infixr0 { + associativity: right + higherThan: infixl0 +} +precedencegroup infixl1 { + associativity: left + higherThan: infixr0 +} +precedencegroup infixr1 { + associativity: right + higherThan: infixl1 +} +precedencegroup infixl2 { + associativity: left + higherThan: infixr1 +} +precedencegroup infixr2 { + associativity: right + higherThan: infixl2 +} +precedencegroup infixl3 { + associativity: left + higherThan: infixr2 +} +precedencegroup infixr3 { + associativity: right + higherThan: infixl3 +} +precedencegroup infixl4 { + associativity: left + higherThan: infixr3 +} +precedencegroup infixr4 { + associativity: right + higherThan: infixl4 +} +precedencegroup infixl5 { + associativity: left + higherThan: infixr4 +} +precedencegroup infixr5 { + associativity: right + higherThan: infixl5 + lowerThan: AdditionPrecedence +} +precedencegroup infixl6 { + associativity: left + higherThan: infixr5 +} +precedencegroup infixr6 { + associativity: right + higherThan: infixl6 + lowerThan: MultiplicationPrecedence +} +precedencegroup infixl7 { + associativity: left + higherThan: infixr6 +} +precedencegroup infixr7 { + associativity: right + higherThan: infixl7 +} +precedencegroup infixl8 { + associativity: left + higherThan: infixr7 +} +precedencegroup infixr8 { + associativity: right + higherThan: infixl8 +} +precedencegroup infixl9 { + associativity: left + higherThan: infixr8 +} +precedencegroup infixr9 { + associativity: right + higherThan: infixl9 +} diff --git a/.agents/interfaces/watchos/NominalFunctionTypes.swiftinterface b/.agents/interfaces/watchos/NominalFunctionTypes.swiftinterface new file mode 100644 index 0000000..2c2de04 --- /dev/null +++ b/.agents/interfaces/watchos/NominalFunctionTypes.swiftinterface @@ -0,0 +1,336 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-watchos6.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypes -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import ConcurrencyExtras +@_exported import Either +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +public protocol AsyncFunction : NominalFunctionTypes.AsyncThrowingFunction where Self.Failure == Swift.Never { + func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +extension NominalFunctionTypes.AsyncFunction { + @inlinable public func run(with input: Self.Input) async throws(Swift.Never) -> Self.Output { + return await run(with: input) + } +} +public struct AsyncFunc : NominalFunctionTypes.AsyncFunction { + @usableFromInline + internal var call: (Input) async -> Output + public init(_ call: @escaping (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async -> Output { + return await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableAsyncFunc + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.AsyncFunc where Input == () { + @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +public protocol _MainActorAsyncFunction : NominalFunctionTypes._MainActorAsyncThrowingFunction where Self.Failure == Swift.Never { + @_Concurrency.MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct MainActorAsyncFunc : NominalFunctionTypes._MainActorAsyncFunction, @_Concurrency.MainActor NominalFunctionTypes.AsyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) async -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorAsyncFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) async -> Output { + await call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.MainActorAsyncFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +public struct SendableAsyncFunc : NominalFunctionTypes.AsyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @Sendable (Input) async -> Output + public init(_ call: @escaping @Sendable (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async -> Output { + return await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SendableAsyncFunc where Input == () { + @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +extension NominalFunctionTypes.SendableAsyncFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorAsyncFunc { + MainActorAsyncFunc(call) + } +} +public protocol AsyncThrowingFunction : NominalFunctionTypes._NominalFunctionType { + associatedtype Failure : Swift.Error + func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct AsyncThrowingFunc : NominalFunctionTypes.AsyncThrowingFunction where Failure : Swift.Error { + @usableFromInline + internal var call: (Input) async throws(Failure) -> Output + public init(_ call: @escaping (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncThrowingFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableAsyncThrowingFunc +} +extension NominalFunctionTypes.AsyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +public protocol _MainActorAsyncThrowingFunction : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { + associatedtype Failure : Swift.Error + @_Concurrency.MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct MainActorAsyncThrowingFunc : NominalFunctionTypes._MainActorAsyncThrowingFunction, @_Concurrency.MainActor NominalFunctionTypes.AsyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) async throws(Failure) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorAsyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } +} +extension NominalFunctionTypes.MainActorAsyncThrowingFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +public struct SendableAsyncThrowingFunc : NominalFunctionTypes.AsyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @Sendable (Input) async throws(Failure) -> Output + public init(_ call: @escaping @Sendable (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } +} +extension NominalFunctionTypes.SendableAsyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +extension NominalFunctionTypes.SendableAsyncThrowingFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorAsyncThrowingFunc { + MainActorAsyncThrowingFunc(call) + } +} +public protocol _MainActorSyncFunction : NominalFunctionTypes._MainActorAsyncFunction, NominalFunctionTypes._MainActorSyncThrowingFunction { + @_Concurrency.MainActor func run(with input: Self.Input) -> Self.Output +} +public struct MainActorSyncFunc : NominalFunctionTypes._MainActorSyncFunction, @_Concurrency.MainActor NominalFunctionTypes.SyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorSyncFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.MainActorSyncFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +public struct SendableSyncFunc : NominalFunctionTypes.SyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @Sendable (Input) -> Output + public init(_ call: @escaping @Sendable (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SendableSyncFunc where Input == () { + @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +extension NominalFunctionTypes.SendableSyncFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorSyncFunc { + MainActorSyncFunc(call) + } +} +public protocol SyncFunction : NominalFunctionTypes.AsyncFunction, NominalFunctionTypes.SyncThrowingFunction { + func run(with input: Self.Input) -> Self.Output +} +extension NominalFunctionTypes.SyncFunction { + @inlinable public func syncRun(with input: Self.Input) -> Self.Output { + return run(with: input) + } + @inlinable public func run(with input: Self.Input) async -> Self.Output { + return syncRun(with: input) + } + @inlinable public func run(with input: Self.Input) throws(Self.Failure) -> Self.Output { + return run(with: input) + } +} +public struct SyncFunc : NominalFunctionTypes.SyncFunction { + @usableFromInline + internal var call: (Input) -> Output + public init(_ call: @escaping (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableSyncFunc + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SyncFunc where Input == () { + @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +public protocol _MainActorSyncThrowingFunction : NominalFunctionTypes._MainActorAsyncThrowingFunction { + @_Concurrency.MainActor func run(with input: Self.Input) throws(Self.Failure) -> Self.Output +} +public struct MainActorSyncThrowingFunc : NominalFunctionTypes._MainActorSyncThrowingFunction, @_Concurrency.MainActor NominalFunctionTypes.SyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) throws(Failure) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorSyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try call(input) + } +} +extension NominalFunctionTypes.MainActorSyncThrowingFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +public struct SendableSyncThrowingFunc : NominalFunctionTypes.SyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @Sendable (Input) throws(Failure) -> Output + public init(_ call: @escaping @Sendable (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @inlinable public func callAsFunction(_ input: Input) throws(Failure) -> Output { + return try call(input) + } +} +extension NominalFunctionTypes.SendableSyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +extension NominalFunctionTypes.SendableSyncThrowingFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorSyncThrowingFunc { + MainActorSyncThrowingFunc(call) + } +} +public protocol SyncThrowingFunction : NominalFunctionTypes.AsyncThrowingFunction { + func run(with input: Self.Input) throws(Self.Failure) -> Self.Output +} +extension NominalFunctionTypes.SyncThrowingFunction { + @inlinable public func syncRun(with input: Self.Input) throws(Self.Failure) -> Self.Output { + return try run(with: input) + } + @inlinable public func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output { + return try syncRun(with: input) + } +} +public struct SyncThrowingFunc : NominalFunctionTypes.SyncThrowingFunction where Failure : Swift.Error { + @usableFromInline + internal var call: (Input) throws(Failure) -> Output + public init(_ call: @escaping (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncThrowingFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @inlinable public func callAsFunction(_ input: Input) throws(Failure) -> Output { + return try call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableSyncThrowingFunc +} +extension NominalFunctionTypes.SyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +public protocol _AnyNominalFunctionType { +} +public protocol _NominalFunctionType : NominalFunctionTypes._AnyNominalFunctionType { + associatedtype Input + associatedtype Output +} +public protocol _MainActorNominalFunctionTypeMarker { + associatedtype Input + associatedtype Output +} +extension NominalFunctionTypes.MainActorAsyncFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorAsyncThrowingFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorSyncFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorSyncThrowingFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} diff --git a/.agents/interfaces/watchos/NominalFunctionTypesComposition.swiftinterface b/.agents/interfaces/watchos/NominalFunctionTypesComposition.swiftinterface new file mode 100644 index 0000000..7c93085 --- /dev/null +++ b/.agents/interfaces/watchos/NominalFunctionTypesComposition.swiftinterface @@ -0,0 +1,9 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-watchos6.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesComposition -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +@_exported import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims diff --git a/.agents/interfaces/watchos/NominalFunctionTypesCompositionFunctions.swiftinterface b/.agents/interfaces/watchos/NominalFunctionTypesCompositionFunctions.swiftinterface new file mode 100644 index 0000000..16aa3ea --- /dev/null +++ b/.agents/interfaces/watchos/NominalFunctionTypesCompositionFunctions.swiftinterface @@ -0,0 +1,934 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-watchos6.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionFunctions -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Either +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F3 : NominalFunctionTypes._MainActorAsyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F3 : NominalFunctionTypes._MainActorSyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + SendableSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F3 : NominalFunctionTypes.AsyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F3 : NominalFunctionTypes.SyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F1.Input == F0.Output { + AsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { + AsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F3 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F1.Input == F0.Output { + SyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { + SyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F3 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F2 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F3 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F2 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F3 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + MainActorSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + MainActorSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + SendableSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + SendableAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SendableAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + SendableSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SendableSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input { + AsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { + AsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F3 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F3 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input { + SyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { + SyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F3 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F3 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input { + AsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { + AsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F3 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + AsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input { + SyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { + SyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F3 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} diff --git a/.agents/interfaces/watchos/NominalFunctionTypesCompositionMethods.swiftinterface b/.agents/interfaces/watchos/NominalFunctionTypesCompositionMethods.swiftinterface new file mode 100644 index 0000000..5aeddf3 --- /dev/null +++ b/.agents/interfaces/watchos/NominalFunctionTypesCompositionMethods.swiftinterface @@ -0,0 +1,733 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-watchos6.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionMethods -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorAsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes._MainActorAsyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorSyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes._MainActorSyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncFunc where B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncFunc where B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, Self.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncFunc where B : NominalFunctionTypes.AsyncFunction, Self.Input == B.Output { + AsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, Self.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncFunc where B : NominalFunctionTypes.SyncFunction, Self.Input == B.Output { + SyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorAsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes._MainActorAsyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorSyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes._MainActorSyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Output == A.Input { + SendableAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Output == A.Input { + SendableSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, Self.Output == A.Input { + AsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { + AsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, Self.Output == A.Input { + AsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, Self.Output == A.Input { + SyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { + SyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, Self.Output == A.Input { + SyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} diff --git a/.agents/interfaces/watchos/NominalFunctionTypesCompositionOperators.swiftinterface b/.agents/interfaces/watchos/NominalFunctionTypesCompositionOperators.swiftinterface new file mode 100644 index 0000000..96b4867 --- /dev/null +++ b/.agents/interfaces/watchos/NominalFunctionTypesCompositionOperators.swiftinterface @@ -0,0 +1,694 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-watchos6.0-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionOperators -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +@_exported import FunctionCompositionOperators +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func <| (f: F, input: F.Input) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes.AsyncThrowingFunction { + return try await f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) async -> F.Output where F : NominalFunctionTypes.AsyncFunction { + return await f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) throws(F.Failure) -> F.Output where F : NominalFunctionTypes.SyncThrowingFunction { + return try f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) -> F.Output where F : NominalFunctionTypes.SyncFunction { + return f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes.AsyncThrowingFunction { + return try await f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) async -> F.Output where F : NominalFunctionTypes.AsyncFunction { + return await f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) throws(F.Failure) -> F.Output where F : NominalFunctionTypes.SyncThrowingFunction { + return try f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) -> F.Output where F : NominalFunctionTypes.SyncFunction { + return f.run(with: input) +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, B : NominalFunctionTypes.AsyncFunction, A.Input == B.Output { + AsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, B : NominalFunctionTypes.SyncFunction, A.Input == B.Output { + SyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, B : NominalFunctionTypes.AsyncFunction, A.Input == B.Output { + AsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, B : NominalFunctionTypes.SyncFunction, A.Input == B.Output { + SyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} diff --git a/.agents/interfaces/watchos/_Currying.swiftinterface b/.agents/interfaces/watchos/_Currying.swiftinterface new file mode 100644 index 0000000..4e93e95 --- /dev/null +++ b/.agents/interfaces/watchos/_Currying.swiftinterface @@ -0,0 +1,144 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-watchos6.0-simulator -enable-objc-interop -swift-version 6 -O -module-name _Currying -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func curry(_ function: @escaping (A, B) -> C) -> (A) -> (B) -> C { + return { (a: A) -> (B) -> C in + { (b: B) -> C in + function(a, b) + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C) -> D) -> (A) -> (B) -> (C) -> D { + return { (a: A) -> (B) -> (C) -> D in + { (b: B) -> (C) -> D in + { (c: C) -> D in + function(a, b, c) + } + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C, D) -> E) -> (A) -> (B) -> (C) -> (D) -> E { + return { (a: A) -> (B) -> (C) -> (D) -> E in + { (b: B) -> (C) -> (D) -> E in + { (c: C) -> (D) -> E in + { (d: D) -> E in + function(a, b, c, d) + } + } + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C, D, E) -> F) -> (A) -> (B) -> (C) -> (D) -> (E) -> F { + return { (a: A) -> (B) -> (C) -> (D) -> (E) -> F in + { (b: B) -> (C) -> (D) -> (E) -> F in + { (c: C) -> (D) -> (E) -> F in + { (d: D) -> (E) -> F in + { (e: E) -> F in + function(a, b, c, d, e) + } + } + } + } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> C) -> (B) -> (A) -> C { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> D) -> (B) -> (A) -> (C) -> D { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (B) -> (A) -> (C) -> (D) -> E { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (B) -> (A) -> (C) -> (D) -> (E) -> F { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> D) -> (A) -> (C) -> (B) -> D { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A) -> (C) -> (B) -> (D) -> E { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (C) -> (B) -> (D) -> (E) -> F { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip3(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A) -> (B) -> (D) -> (C) -> E { + return { a in + { b in + { d in + { c in + f(a)(b)(c)(d) + } + } + } + } +} +@inlinable public func flip3(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (B) -> (D) -> (C) -> (E) -> F { + return { a in + { b in + { d in + { c in + f(a)(b)(c)(d) + } + } + } + } +} +@inlinable public func flip4(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (B) -> (C) -> (E) -> (D) -> F { + return { a in + { b in + { c in + { e in + { d in + f(a)(b)(c)(d)(e) + } + } + } + } + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> C) -> (A, B) -> C { + return { a, b in + _f(a)(b) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> D) -> (A, B, C) -> D { + return { a, b, c in + _f(a)(b)(c) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A, B, C, D) -> E { + return { a, b, c, d in + _f(a)(b)(c)(d) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A, B, C, D, E) -> F { + return { a, b, c, d, e in + _f(a)(b)(c)(d)(e) + } +} From 68646677124ddc627feb3f963a5c3724d5fbf3c2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 07:06:17 +0200 Subject: [PATCH 6/6] Update visionos Swift interfaces (#8) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../interfaces/visionos/Either.swiftinterface | 25 + .../FunctionComposition.swiftinterface | 8 + ...unctionCompositionOperators.swiftinterface | 117 +++ .../NominalFunctionTypes.swiftinterface | 336 +++++++ ...nalFunctionTypesComposition.swiftinterface | 9 + ...onTypesCompositionFunctions.swiftinterface | 934 ++++++++++++++++++ ...tionTypesCompositionMethods.swiftinterface | 733 ++++++++++++++ ...onTypesCompositionOperators.swiftinterface | 694 +++++++++++++ .../visionos/_Currying.swiftinterface | 144 +++ 9 files changed, 3000 insertions(+) create mode 100644 .agents/interfaces/visionos/Either.swiftinterface create mode 100644 .agents/interfaces/visionos/FunctionComposition.swiftinterface create mode 100644 .agents/interfaces/visionos/FunctionCompositionOperators.swiftinterface create mode 100644 .agents/interfaces/visionos/NominalFunctionTypes.swiftinterface create mode 100644 .agents/interfaces/visionos/NominalFunctionTypesComposition.swiftinterface create mode 100644 .agents/interfaces/visionos/NominalFunctionTypesCompositionFunctions.swiftinterface create mode 100644 .agents/interfaces/visionos/NominalFunctionTypesCompositionMethods.swiftinterface create mode 100644 .agents/interfaces/visionos/NominalFunctionTypesCompositionOperators.swiftinterface create mode 100644 .agents/interfaces/visionos/_Currying.swiftinterface diff --git a/.agents/interfaces/visionos/Either.swiftinterface b/.agents/interfaces/visionos/Either.swiftinterface new file mode 100644 index 0000000..a7ffc79 --- /dev/null +++ b/.agents/interfaces/visionos/Either.swiftinterface @@ -0,0 +1,25 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-xros10.15-simulator -enable-objc-interop -swift-version 6 -O -module-name Either -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +public enum Either { + case left(Left) + case right(Right) +} +extension Either.Either : Swift.Equatable where Left : Swift.Equatable, Right : Swift.Equatable { + @_semantics("derived_enum_equals") @_implements(Swift.Equatable, ==(_:_:)) public static func __derived_enum_equals(_ a: Either.Either, _ b: Either.Either) -> Swift.Bool +} +extension Either.Either : Swift.Hashable where Left : Swift.Hashable, Right : Swift.Hashable { + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension Either.Either : Swift.Sendable where Left : Swift.Sendable, Right : Swift.Sendable { +} +extension Either.Either : Swift.Error where Left : Swift.Error, Right : Swift.Error { +} diff --git a/.agents/interfaces/visionos/FunctionComposition.swiftinterface b/.agents/interfaces/visionos/FunctionComposition.swiftinterface new file mode 100644 index 0000000..27537cb --- /dev/null +++ b/.agents/interfaces/visionos/FunctionComposition.swiftinterface @@ -0,0 +1,8 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-xros10.15-simulator -enable-objc-interop -swift-version 6 -O -module-name FunctionComposition -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims diff --git a/.agents/interfaces/visionos/FunctionCompositionOperators.swiftinterface b/.agents/interfaces/visionos/FunctionCompositionOperators.swiftinterface new file mode 100644 index 0000000..abbd8f9 --- /dev/null +++ b/.agents/interfaces/visionos/FunctionCompositionOperators.swiftinterface @@ -0,0 +1,117 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-xros10.15-simulator -enable-objc-interop -swift-version 6 -O -module-name FunctionCompositionOperators -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +infix operator <| : infixr0 +infix operator |> : infixl1 +infix operator >>> : infixr9 +infix operator <<< : infixr9 +infix operator <¢> : infixl4 +infix operator ¢> : infixl4 +infix operator <¢ : infixl4 +infix operator <£> : infixl1 +infix operator >¢< : infixl4 +infix operator >£< : infixl4 +infix operator <|> : infixl3 +infix operator <*> : infixl4 +infix operator *> : infixl4 +infix operator <* : infixl4 +infix operator <%> : infixr4 +infix operator %> : infixr4 +infix operator <% : infixr4 +infix operator >=> : infixr1 +infix operator <=< : infixr1 +infix operator <> : infixr5 +prefix operator <> +postfix operator <> +precedencegroup HashRocket { + associativity: left + higherThan: infixr5 +} +infix operator => : HashRocket +precedencegroup infixl0 { + associativity: left + higherThan: AssignmentPrecedence +} +precedencegroup infixr0 { + associativity: right + higherThan: infixl0 +} +precedencegroup infixl1 { + associativity: left + higherThan: infixr0 +} +precedencegroup infixr1 { + associativity: right + higherThan: infixl1 +} +precedencegroup infixl2 { + associativity: left + higherThan: infixr1 +} +precedencegroup infixr2 { + associativity: right + higherThan: infixl2 +} +precedencegroup infixl3 { + associativity: left + higherThan: infixr2 +} +precedencegroup infixr3 { + associativity: right + higherThan: infixl3 +} +precedencegroup infixl4 { + associativity: left + higherThan: infixr3 +} +precedencegroup infixr4 { + associativity: right + higherThan: infixl4 +} +precedencegroup infixl5 { + associativity: left + higherThan: infixr4 +} +precedencegroup infixr5 { + associativity: right + higherThan: infixl5 + lowerThan: AdditionPrecedence +} +precedencegroup infixl6 { + associativity: left + higherThan: infixr5 +} +precedencegroup infixr6 { + associativity: right + higherThan: infixl6 + lowerThan: MultiplicationPrecedence +} +precedencegroup infixl7 { + associativity: left + higherThan: infixr6 +} +precedencegroup infixr7 { + associativity: right + higherThan: infixl7 +} +precedencegroup infixl8 { + associativity: left + higherThan: infixr7 +} +precedencegroup infixr8 { + associativity: right + higherThan: infixl8 +} +precedencegroup infixl9 { + associativity: left + higherThan: infixr8 +} +precedencegroup infixr9 { + associativity: right + higherThan: infixl9 +} diff --git a/.agents/interfaces/visionos/NominalFunctionTypes.swiftinterface b/.agents/interfaces/visionos/NominalFunctionTypes.swiftinterface new file mode 100644 index 0000000..e36d4a7 --- /dev/null +++ b/.agents/interfaces/visionos/NominalFunctionTypes.swiftinterface @@ -0,0 +1,336 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-xros10.15-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypes -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import ConcurrencyExtras +@_exported import Either +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +public protocol AsyncFunction : NominalFunctionTypes.AsyncThrowingFunction where Self.Failure == Swift.Never { + func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +extension NominalFunctionTypes.AsyncFunction { + @inlinable public func run(with input: Self.Input) async throws(Swift.Never) -> Self.Output { + return await run(with: input) + } +} +public struct AsyncFunc : NominalFunctionTypes.AsyncFunction { + @usableFromInline + internal var call: (Input) async -> Output + public init(_ call: @escaping (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async -> Output { + return await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableAsyncFunc + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.AsyncFunc where Input == () { + @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +public protocol _MainActorAsyncFunction : NominalFunctionTypes._MainActorAsyncThrowingFunction where Self.Failure == Swift.Never { + @_Concurrency.MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct MainActorAsyncFunc : NominalFunctionTypes._MainActorAsyncFunction, @_Concurrency.MainActor NominalFunctionTypes.AsyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) async -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorAsyncFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) async -> Output { + await call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.MainActorAsyncFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +public struct SendableAsyncFunc : NominalFunctionTypes.AsyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @Sendable (Input) async -> Output + public init(_ call: @escaping @Sendable (Input) async -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async -> Output { + return await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async -> Output { + return await call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SendableAsyncFunc where Input == () { + @inlinable public func callAsFunction() async -> Output { + return await call(()) + } +} +extension NominalFunctionTypes.SendableAsyncFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorAsyncFunc { + MainActorAsyncFunc(call) + } +} +public protocol AsyncThrowingFunction : NominalFunctionTypes._NominalFunctionType { + associatedtype Failure : Swift.Error + func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct AsyncThrowingFunc : NominalFunctionTypes.AsyncThrowingFunction where Failure : Swift.Error { + @usableFromInline + internal var call: (Input) async throws(Failure) -> Output + public init(_ call: @escaping (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncThrowingFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableAsyncThrowingFunc +} +extension NominalFunctionTypes.AsyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +public protocol _MainActorAsyncThrowingFunction : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { + associatedtype Failure : Swift.Error + @_Concurrency.MainActor func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output +} +public struct MainActorAsyncThrowingFunc : NominalFunctionTypes._MainActorAsyncThrowingFunction, @_Concurrency.MainActor NominalFunctionTypes.AsyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) async throws(Failure) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorAsyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } +} +extension NominalFunctionTypes.MainActorAsyncThrowingFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +public struct SendableAsyncThrowingFunc : NominalFunctionTypes.AsyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @Sendable (Input) async throws(Failure) -> Output + public init(_ call: @escaping @Sendable (Input) async throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.AsyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) async throws(Failure) -> Output { + return try await call(input) + } + @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try await call(input) + } +} +extension NominalFunctionTypes.SendableAsyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() async throws(Failure) -> Output { + return try await call(()) + } +} +extension NominalFunctionTypes.SendableAsyncThrowingFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorAsyncThrowingFunc { + MainActorAsyncThrowingFunc(call) + } +} +public protocol _MainActorSyncFunction : NominalFunctionTypes._MainActorAsyncFunction, NominalFunctionTypes._MainActorSyncThrowingFunction { + @_Concurrency.MainActor func run(with input: Self.Input) -> Self.Output +} +public struct MainActorSyncFunc : NominalFunctionTypes._MainActorSyncFunction, @_Concurrency.MainActor NominalFunctionTypes.SyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorSyncFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.MainActorSyncFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +public struct SendableSyncFunc : NominalFunctionTypes.SyncFunction, Swift.Sendable { + @usableFromInline + internal var call: @Sendable (Input) -> Output + public init(_ call: @escaping @Sendable (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SendableSyncFunc where Input == () { + @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +extension NominalFunctionTypes.SendableSyncFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorSyncFunc { + MainActorSyncFunc(call) + } +} +public protocol SyncFunction : NominalFunctionTypes.AsyncFunction, NominalFunctionTypes.SyncThrowingFunction { + func run(with input: Self.Input) -> Self.Output +} +extension NominalFunctionTypes.SyncFunction { + @inlinable public func syncRun(with input: Self.Input) -> Self.Output { + return run(with: input) + } + @inlinable public func run(with input: Self.Input) async -> Self.Output { + return syncRun(with: input) + } + @inlinable public func run(with input: Self.Input) throws(Self.Failure) -> Self.Output { + return run(with: input) + } +} +public struct SyncFunc : NominalFunctionTypes.SyncFunction { + @usableFromInline + internal var call: (Input) -> Output + public init(_ call: @escaping (Input) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) -> Output { + return call(input) + } + @inlinable public func callAsFunction(_ input: Input) -> Output { + return call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableSyncFunc + public typealias Failure = Swift.Never +} +extension NominalFunctionTypes.SyncFunc where Input == () { + @inlinable public func callAsFunction() -> Output { + return call(()) + } +} +public protocol _MainActorSyncThrowingFunction : NominalFunctionTypes._MainActorAsyncThrowingFunction { + @_Concurrency.MainActor func run(with input: Self.Input) throws(Self.Failure) -> Self.Output +} +public struct MainActorSyncThrowingFunc : NominalFunctionTypes._MainActorSyncThrowingFunction, @_Concurrency.MainActor NominalFunctionTypes.SyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @_Concurrency.MainActor @Sendable (Input) throws(Failure) -> Output + public init(_ call: @escaping @_Concurrency.MainActor @Sendable (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes._MainActorSyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @_Concurrency.MainActor @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @_Concurrency.MainActor @inlinable public func callAsFunction(_ input: Input) async throws(Failure) -> Output { + return try call(input) + } +} +extension NominalFunctionTypes.MainActorSyncThrowingFunc where Input == () { + @_Concurrency.MainActor @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +public struct SendableSyncThrowingFunc : NominalFunctionTypes.SyncThrowingFunction, Swift.Sendable where Failure : Swift.Error { + @usableFromInline + internal var call: @Sendable (Input) throws(Failure) -> Output + public init(_ call: @escaping @Sendable (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncThrowingFunction & Swift.Sendable) { + self.init(f.run) + } + @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @inlinable public func callAsFunction(_ input: Input) throws(Failure) -> Output { + return try call(input) + } +} +extension NominalFunctionTypes.SendableSyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +extension NominalFunctionTypes.SendableSyncThrowingFunc where Input : Swift.Sendable, Output : Swift.Sendable { + @inlinable public func mainActor() -> NominalFunctionTypes.MainActorSyncThrowingFunc { + MainActorSyncThrowingFunc(call) + } +} +public protocol SyncThrowingFunction : NominalFunctionTypes.AsyncThrowingFunction { + func run(with input: Self.Input) throws(Self.Failure) -> Self.Output +} +extension NominalFunctionTypes.SyncThrowingFunction { + @inlinable public func syncRun(with input: Self.Input) throws(Self.Failure) -> Self.Output { + return try run(with: input) + } + @inlinable public func run(with input: Self.Input) async throws(Self.Failure) -> Self.Output { + return try syncRun(with: input) + } +} +public struct SyncThrowingFunc : NominalFunctionTypes.SyncThrowingFunction where Failure : Swift.Error { + @usableFromInline + internal var call: (Input) throws(Failure) -> Output + public init(_ call: @escaping (Input) throws(Failure) -> Output) + @inlinable public init(_ f: any NominalFunctionTypes.SyncThrowingFunction) { + self.init(f.run) + } + @inlinable public func run(with input: Input) throws(Failure) -> Output { + return try call(input) + } + @inlinable public func callAsFunction(_ input: Input) throws(Failure) -> Output { + return try call(input) + } + public func uncheckedSendable() -> NominalFunctionTypes.SendableSyncThrowingFunc +} +extension NominalFunctionTypes.SyncThrowingFunc where Input == () { + @inlinable public func callAsFunction() throws(Failure) -> Output { + return try call(()) + } +} +public protocol _AnyNominalFunctionType { +} +public protocol _NominalFunctionType : NominalFunctionTypes._AnyNominalFunctionType { + associatedtype Input + associatedtype Output +} +public protocol _MainActorNominalFunctionTypeMarker { + associatedtype Input + associatedtype Output +} +extension NominalFunctionTypes.MainActorAsyncFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorAsyncThrowingFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorSyncFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} +extension NominalFunctionTypes.MainActorSyncThrowingFunc : NominalFunctionTypes._MainActorNominalFunctionTypeMarker { +} diff --git a/.agents/interfaces/visionos/NominalFunctionTypesComposition.swiftinterface b/.agents/interfaces/visionos/NominalFunctionTypesComposition.swiftinterface new file mode 100644 index 0000000..927e4b3 --- /dev/null +++ b/.agents/interfaces/visionos/NominalFunctionTypesComposition.swiftinterface @@ -0,0 +1,9 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-xros10.15-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesComposition -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +@_exported import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims diff --git a/.agents/interfaces/visionos/NominalFunctionTypesCompositionFunctions.swiftinterface b/.agents/interfaces/visionos/NominalFunctionTypesCompositionFunctions.swiftinterface new file mode 100644 index 0000000..2e746db --- /dev/null +++ b/.agents/interfaces/visionos/NominalFunctionTypesCompositionFunctions.swiftinterface @@ -0,0 +1,934 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-xros10.15-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionFunctions -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Either +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorAsyncFunc where F3 : NominalFunctionTypes._MainActorAsyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output, F0.Input : Swift.Sendable { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.MainActorSyncFunc where F3 : NominalFunctionTypes._MainActorSyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + MainActorSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1.Failure == F0.Failure, F1.Input == F0.Output { + SendableSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncThrowingFunc where F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableAsyncFunc where F3 : NominalFunctionTypes.AsyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SendableAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F2.Input == F1.Output, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SendableSyncFunc where F3 : NominalFunctionTypes.SyncFunction, F3 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SendableSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc> where F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F1.Input == F0.Output { + AsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { + AsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncThrowingFunc where F3 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0 : NominalFunctionTypes.AsyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc> where F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F1.Input == F0.Output { + SyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F1.Failure == F0.Failure, F1.Input == F0.Output { + SyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc, F2.Failure>> where F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F2.Input == F1.Output, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(f2, compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc, Either.Either>> where F3 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncThrowingFunc where F3 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0 : NominalFunctionTypes.SyncThrowingFunction, F3.Failure == F2.Failure, F3.Input == F2.Output, F2.Failure == F1.Failure, F2.Input == F1.Output, F1.Failure == F0.Failure, F1.Input == F0.Output { + compose(compose(f3, f2), compose(f1, f0)) +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F2 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.AsyncFunc where F3 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0 : NominalFunctionTypes.AsyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + AsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func compose(_ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F2 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F2.Input == F1.Output, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func compose(_ f3: F3, _ f2: F2, _ f1: F1, _ f0: F0) -> NominalFunctionTypes.SyncFunc where F3 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0 : NominalFunctionTypes.SyncFunction, F3.Input == F2.Output, F2.Input == F1.Output, F1.Input == F0.Output { + SyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where F0 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncThrowingFunc where F0 : NominalFunctionTypes._MainActorSyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorAsyncFunc where F0 : NominalFunctionTypes._MainActorAsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorAsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorAsyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorAsyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + MainActorAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with:f0.run(with: input)) + } +} +@inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F0.Input : Swift.Sendable, F0.Output == F1.Input { + MainActorSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + MainActorSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.MainActorSyncFunc where F0 : NominalFunctionTypes._MainActorSyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes._MainActorSyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes._MainActorSyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes._MainActorSyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + MainActorSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + SendableAsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableSyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input { + SendableSyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncThrowingFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncThrowingFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncThrowingFunction, F3 : Swift.Sendable, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableAsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + SendableAsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableAsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.AsyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.AsyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.AsyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SendableAsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F0.Output == F1.Input { + SendableSyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input { + SendableSyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SendableSyncFunc where F0 : NominalFunctionTypes.SyncFunction, F0 : Swift.Sendable, F1 : NominalFunctionTypes.SyncFunction, F1 : Swift.Sendable, F2 : NominalFunctionTypes.SyncFunction, F2 : Swift.Sendable, F3 : NominalFunctionTypes.SyncFunction, F3 : Swift.Sendable, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SendableSyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncThrowingFunc> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input { + AsyncThrowingFunc { (input: F0.Input) async throws(Either) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { + AsyncThrowingFunc { (input: F0.Input) async throws(F0.Failure) -> F1.Output in + do { + let partialResult = try await f0.run(with: input) + do { + return try await f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F3 : NominalFunctionTypes.AsyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncThrowingFunc where F0 : NominalFunctionTypes.AsyncThrowingFunction, F1 : NominalFunctionTypes.AsyncThrowingFunction, F2 : NominalFunctionTypes.AsyncThrowingFunction, F3 : NominalFunctionTypes.AsyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncThrowingFunc> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input { + SyncThrowingFunc { (input: F0.Input) throws(Either) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw Either.right(error as! F1.Failure) + } + } catch { + throw Either.left(error as! F0.Failure) + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input { + SyncThrowingFunc { (input: F0.Input) throws(F0.Failure) -> F1.Output in + do { + let partialResult = try f0.run(with: input) + do { + return try f1.run(with: partialResult) + } catch { + throw error as! F1.Failure + } + } catch { + throw error as! F0.Failure + } + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncThrowingFunc, F2.Failure>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input { + pipe(pipe(f0, f1), f2) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncThrowingFunc, Either.Either>> where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F3 : NominalFunctionTypes.SyncThrowingFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncThrowingFunc where F0 : NominalFunctionTypes.SyncThrowingFunction, F1 : NominalFunctionTypes.SyncThrowingFunction, F2 : NominalFunctionTypes.SyncThrowingFunction, F3 : NominalFunctionTypes.SyncThrowingFunction, F0.Failure == F1.Failure, F0.Output == F1.Input, F1.Failure == F2.Failure, F1.Output == F2.Input, F2.Failure == F3.Failure, F2.Output == F3.Input { + pipe(pipe(f0, f1), pipe(f2, f3)) +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input { + AsyncFunc { (input: F0.Input) async -> F1.Output in + await f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { + AsyncFunc { (input: F0.Input) async -> F2.Output in + await f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.AsyncFunc where F0 : NominalFunctionTypes.AsyncFunction, F1 : NominalFunctionTypes.AsyncFunction, F2 : NominalFunctionTypes.AsyncFunction, F3 : NominalFunctionTypes.AsyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + AsyncFunc { (input: F0.Input) async -> F3.Output in + await f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input { + SyncFunc { (input: F0.Input) -> F1.Output in + f1.run(with: f0.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input { + SyncFunc { (input: F0.Input) -> F2.Output in + f2.run(with: f1.run(with: f0.run(with: input))) + } +} +@_disfavoredOverload @inlinable public func pipe(_ f0: F0, _ f1: F1, _ f2: F2, _ f3: F3) -> NominalFunctionTypes.SyncFunc where F0 : NominalFunctionTypes.SyncFunction, F1 : NominalFunctionTypes.SyncFunction, F2 : NominalFunctionTypes.SyncFunction, F3 : NominalFunctionTypes.SyncFunction, F0.Output == F1.Input, F1.Output == F2.Input, F2.Output == F3.Input { + SyncFunc { (input: F0.Input) -> F3.Output in + f3.run(with: f2.run(with: f1.run(with: f0.run(with: input)))) + } +} diff --git a/.agents/interfaces/visionos/NominalFunctionTypesCompositionMethods.swiftinterface b/.agents/interfaces/visionos/NominalFunctionTypesCompositionMethods.swiftinterface new file mode 100644 index 0000000..e4a0bfa --- /dev/null +++ b/.agents/interfaces/visionos/NominalFunctionTypesCompositionMethods.swiftinterface @@ -0,0 +1,733 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-xros10.15-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionMethods -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorAsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes._MainActorAsyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorAsyncFunc where B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorSyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes._MainActorSyncFunction where Self : Swift.Sendable { + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } + @inlinable public func compose(_ b: B) -> NominalFunctionTypes.MainActorSyncFunc where B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, Self.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableAsyncFunc where B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, Self.Failure == B.Failure, Self.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SendableSyncFunc where B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, Self.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncThrowingFunc> where B : NominalFunctionTypes.AsyncThrowingFunction, Self.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncThrowingFunc where B : NominalFunctionTypes.AsyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Failure) -> Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.AsyncFunc where B : NominalFunctionTypes.AsyncFunction, Self.Input == B.Output { + AsyncFunc { (input: B.Input) async -> Output in + await self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncThrowingFunc> where B : NominalFunctionTypes.SyncThrowingFunction, Self.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw Either.right(error as! Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } + } + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncThrowingFunc where B : NominalFunctionTypes.SyncThrowingFunction, Self.Failure == B.Failure, Self.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Failure) -> Output in + do { + let partialResult = try b.run(with: input) + do { + return try self.run(with: partialResult) + } catch { + throw error as! Failure + } + } catch { + throw error as! B.Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction { + @_disfavoredOverload @inlinable public func compose(_ b: B) -> NominalFunctionTypes.SyncFunc where B : NominalFunctionTypes.SyncFunction, Self.Input == B.Output { + SyncFunc { (input: B.Input) -> Output in + self.run(with: b.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorAsyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes._MainActorAsyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes._MainActorSyncThrowingFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes._MainActorSyncFunction where Self : Swift.Sendable { + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } + @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, Self.Input : Swift.Sendable, Self.Output == A.Input { + MainActorSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableAsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Output == A.Input { + SendableAsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableAsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableSyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, Self.Failure == A.Failure, Self.Output == A.Input { + SendableSyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction where Self : Swift.Sendable { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, Self.Output == A.Input { + SendableSyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.AsyncThrowingFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, Self.Output == A.Input { + AsyncThrowingFunc { (input: Input) async throws(Either) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { + AsyncThrowingFunc { (input: Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await self.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.AsyncFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, Self.Output == A.Input { + AsyncFunc { (input: Input) async -> A.Output in + await a.run(with: self.run(with: input)) + } + } +} +extension NominalFunctionTypes.SyncThrowingFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, Self.Output == A.Input { + SyncThrowingFunc { (input: Input) throws(Either) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! Failure) + } + } + } + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, Self.Failure == A.Failure, Self.Output == A.Input { + SyncThrowingFunc { (input: Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try self.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! Failure + } + } + } +} +extension NominalFunctionTypes.SyncFunction { + @_disfavoredOverload @inlinable public func pipe(_ a: A) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, Self.Output == A.Input { + SyncFunc { (input: Input) -> A.Output in + a.run(with: self.run(with: input)) + } + } +} diff --git a/.agents/interfaces/visionos/NominalFunctionTypesCompositionOperators.swiftinterface b/.agents/interfaces/visionos/NominalFunctionTypesCompositionOperators.swiftinterface new file mode 100644 index 0000000..af8e4a1 --- /dev/null +++ b/.agents/interfaces/visionos/NominalFunctionTypesCompositionOperators.swiftinterface @@ -0,0 +1,694 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-xros10.15-simulator -enable-objc-interop -swift-version 6 -O -module-name NominalFunctionTypesCompositionOperators -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +@_exported import FunctionCompositionOperators +import NominalFunctionTypes +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func <| (f: F, input: F.Input) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes.AsyncThrowingFunction { + return try await f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) async -> F.Output where F : NominalFunctionTypes.AsyncFunction { + return await f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) throws(F.Failure) -> F.Output where F : NominalFunctionTypes.SyncThrowingFunction { + return try f.run(with: input) +} +@inlinable public func <| (f: F, input: F.Input) -> F.Output where F : NominalFunctionTypes.SyncFunction { + return f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) async throws(F.Failure) -> F.Output where F : NominalFunctionTypes.AsyncThrowingFunction { + return try await f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) async -> F.Output where F : NominalFunctionTypes.AsyncFunction { + return await f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) throws(F.Failure) -> F.Output where F : NominalFunctionTypes.SyncThrowingFunction { + return try f.run(with: input) +} +@inlinable public func |> (input: F.Input, f: F) -> F.Output where F : NominalFunctionTypes.SyncFunction { + return f.run(with: input) +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, B : NominalFunctionTypes.AsyncFunction, A.Input == B.Output { + AsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func <<< (a: A, b: B) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, B : NominalFunctionTypes.SyncFunction, A.Input == B.Output { + SyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes._MainActorAsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes._MainActorAsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorAsyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes._MainActorSyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes._MainActorSyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.MainActorSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes._MainActorSyncFunction, B : Swift.Sendable, A.Input == B.Output, B.Input : Swift.Sendable { + MainActorSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableAsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableAsyncFunc where A : NominalFunctionTypes.AsyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.AsyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableAsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncThrowingFunction, B : Swift.Sendable, A.Failure == B.Failure, A.Input == B.Output { + SendableSyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SendableSyncFunc where A : NominalFunctionTypes.SyncFunction, A : Swift.Sendable, B : NominalFunctionTypes.SyncFunction, B : Swift.Sendable, A.Input == B.Output { + SendableSyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncThrowingFunc> where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(Either) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncThrowingFunc where A : NominalFunctionTypes.AsyncThrowingFunction, B : NominalFunctionTypes.AsyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + AsyncThrowingFunc { (input: B.Input) async throws(A.Failure) -> A.Output in + do { + let partialResult = try await b.run(with: input) + do { + return try await a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.AsyncFunc where A : NominalFunctionTypes.AsyncFunction, B : NominalFunctionTypes.AsyncFunction, A.Input == B.Output { + AsyncFunc { (input: B.Input) async -> A.Output in + await a.run(with: b.run(with: input)) + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncThrowingFunc> where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(Either) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw Either.right(error as! A.Failure) + } + } catch { + throw Either.left(error as! B.Failure) + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncThrowingFunc where A : NominalFunctionTypes.SyncThrowingFunction, B : NominalFunctionTypes.SyncThrowingFunction, A.Failure == B.Failure, A.Input == B.Output { + SyncThrowingFunc { (input: B.Input) throws(A.Failure) -> A.Output in + do { + let partialResult = try b.run(with: input) + do { + return try a.run(with: partialResult) + } catch { + throw error as! A.Failure + } + } catch { + throw error as! B.Failure + } + } +} +@_disfavoredOverload @inlinable public func >>> (b: B, a: A) -> NominalFunctionTypes.SyncFunc where A : NominalFunctionTypes.SyncFunction, B : NominalFunctionTypes.SyncFunction, A.Input == B.Output { + SyncFunc { (input: B.Input) -> A.Output in + a.run(with: b.run(with: input)) + } +} diff --git a/.agents/interfaces/visionos/_Currying.swiftinterface b/.agents/interfaces/visionos/_Currying.swiftinterface new file mode 100644 index 0000000..9eac864 --- /dev/null +++ b/.agents/interfaces/visionos/_Currying.swiftinterface @@ -0,0 +1,144 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101) +// swift-module-flags: -target arm64-apple-xros10.15-simulator -enable-objc-interop -swift-version 6 -O -module-name _Currying -package-name swift_function_composition +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +@inlinable public func curry(_ function: @escaping (A, B) -> C) -> (A) -> (B) -> C { + return { (a: A) -> (B) -> C in + { (b: B) -> C in + function(a, b) + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C) -> D) -> (A) -> (B) -> (C) -> D { + return { (a: A) -> (B) -> (C) -> D in + { (b: B) -> (C) -> D in + { (c: C) -> D in + function(a, b, c) + } + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C, D) -> E) -> (A) -> (B) -> (C) -> (D) -> E { + return { (a: A) -> (B) -> (C) -> (D) -> E in + { (b: B) -> (C) -> (D) -> E in + { (c: C) -> (D) -> E in + { (d: D) -> E in + function(a, b, c, d) + } + } + } + } +} +@inlinable public func curry(_ function: @escaping (A, B, C, D, E) -> F) -> (A) -> (B) -> (C) -> (D) -> (E) -> F { + return { (a: A) -> (B) -> (C) -> (D) -> (E) -> F in + { (b: B) -> (C) -> (D) -> (E) -> F in + { (c: C) -> (D) -> (E) -> F in + { (d: D) -> (E) -> F in + { (e: E) -> F in + function(a, b, c, d, e) + } + } + } + } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> C) -> (B) -> (A) -> C { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> D) -> (B) -> (A) -> (C) -> D { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (B) -> (A) -> (C) -> (D) -> E { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip1(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (B) -> (A) -> (C) -> (D) -> (E) -> F { + return { b in + { a in f(a)(b) } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> D) -> (A) -> (C) -> (B) -> D { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A) -> (C) -> (B) -> (D) -> E { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip2(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (C) -> (B) -> (D) -> (E) -> F { + return { a in + { c in + { b in f(a)(b)(c) } + } + } +} +@inlinable public func flip3(_ f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A) -> (B) -> (D) -> (C) -> E { + return { a in + { b in + { d in + { c in + f(a)(b)(c)(d) + } + } + } + } +} +@inlinable public func flip3(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (B) -> (D) -> (C) -> (E) -> F { + return { a in + { b in + { d in + { c in + f(a)(b)(c)(d) + } + } + } + } +} +@inlinable public func flip4(_ f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A) -> (B) -> (C) -> (E) -> (D) -> F { + return { a in + { b in + { c in + { e in + { d in + f(a)(b)(c)(d)(e) + } + } + } + } + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> C) -> (A, B) -> C { + return { a, b in + _f(a)(b) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> D) -> (A, B, C) -> D { + return { a, b, c in + _f(a)(b)(c) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> (D) -> E) -> (A, B, C, D) -> E { + return { a, b, c, d in + _f(a)(b)(c)(d) + } +} +@inlinable public func uncurry(_ _f: @escaping (A) -> (B) -> (C) -> (D) -> (E) -> F) -> (A, B, C, D, E) -> F { + return { a, b, c, d, e in + _f(a)(b)(c)(d)(e) + } +}