From 1c4cb40c4bdfcbfd48bb581344f0edb1f1be286b 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:41 +0000 Subject: [PATCH 1/5] Prepare Swift interface update From df6769fb6eb9b76a96cbacf15463600130cf5bd0 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:08:25 +0200 Subject: [PATCH 2/5] Update ios Swift interfaces (#4) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../interfaces/ios/Snippets.swiftinterface | 873 ++++++++++++++++++ 1 file changed, 873 insertions(+) create mode 100644 .agents/interfaces/ios/Snippets.swiftinterface diff --git a/.agents/interfaces/ios/Snippets.swiftinterface b/.agents/interfaces/ios/Snippets.swiftinterface new file mode 100644 index 0000000..89c0bfb --- /dev/null +++ b/.agents/interfaces/ios/Snippets.swiftinterface @@ -0,0 +1,873 @@ +// 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 Snippets -package-name swift_snippets +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Dependencies +import Foundation +import KeyPathsExtensions +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +extension Snippets.SnippetRepresentableLiteral { + public static func const(_ value: Snippets.Snippets.Const) -> Self +} +extension Snippets.Snippets.Const { + @inlinable public init(_ other: Snippets.Snippets.Const) { + self = other + } +} +extension Snippets.Snippets.Const where Output : Snippets.SnippetRepresentableString { + @inlinable public static var newline: Snippets.Snippets.Const { + get { + return .newlines(1) + } + } + @inlinable public static func newlines(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("\n", count: count) + } + @inlinable public static var whitespace: Snippets.Snippets.Const { + get { + return .whitespaces(1) + } + } + @inlinable public static func whitespaces(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(" ", count: count) + } + @inlinable public static var tab: Snippets.Snippets.Const { + get { + return .tabs(1) + } + } + @inlinable public static func tabs(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("\t", count: count) + } + @inlinable public static var quote: Snippets.Snippets.Const { + get { + return .quotes(1) + } + } + @inlinable public static func quotes(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("\"", count: count) + } + @inlinable public static var backtick: Snippets.Snippets.Const { + get { + return .backticks(1) + } + } + @inlinable public static func backticks(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("`", count: count) + } + @inlinable public static var colon: Snippets.Snippets.Const { + get { + return .colons(1) + } + } + @inlinable public static func colons(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(":", count: count) + } + @inlinable public static var dot: Snippets.Snippets.Const { + get { + return .dots(1) + } + } + @inlinable public static func dots(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(".", count: count) + } + @inlinable public static var comma: Snippets.Snippets.Const { + get { + return .commas(1) + } + } + @inlinable public static func commas(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(",", count: count) + } + @inlinable public static var leftBracket: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "[") + } + } + @inlinable public static var rightBracket: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "]") + } + } + @inlinable public static var leftBrace: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "{") + } + } + @inlinable public static var rightBrace: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "}") + } + } + @inlinable public static var leftParenthesis: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "(") + } + } + @inlinable public static var rightParenthesis: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: ")") + } + } + @inlinable public static var lessThan: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "<") + } + } + @inlinable public static var greaterThan: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: ">") + } + } + @inlinable public static var equal: Snippets.Snippets.Const { + get { + return .equals(count: 1) + } + } + @inlinable public static func equals(count: Swift.Int = 2) -> Snippets.Snippets.Const { + return .repeating("=", count: count) + } +} +extension Swift.Array : Snippets.SnippetRepresentable where Element : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: [Element.SnippetRepresentation] + public init(snippetLiteral: [Element]) + @inlinable public init() { + self.init(snippetLiteral: []) + } + @inlinable public func render() -> [Element] { literal.map { $0.render() } } + @inlinable public static func _collect(_ elements: [Swift.Array.SnippetRepresentation.Output]) -> [Element] { + .init(elements.joined(separator: environment(\.separator).render())) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = [Element] + public typealias SnippetLiteralType = [Element] + public typealias SnippetRepresentation = Swift.Array.SnippetRepresentation + } +} +extension Swift.Array : Snippets.SnippetRepresentableLiteral where Element : Snippets.SnippetRepresentableLiteral { +} +extension Foundation.Data : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Foundation.Data + public init(snippetLiteral: Foundation.Data) + @inlinable public init() { + self.init(snippetLiteral: .init()) + } + @inlinable public func render() -> Foundation.Data { literal } + @inlinable public static func _collect(_ elements: [Foundation.Data.SnippetRepresentation.Output]) -> Foundation.Data { + .init(elements.joined(separator: environment(\.separator).render())) + } + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias Content = Swift.Never.SnippetRepresentation + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias Output = Foundation.Data + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias SnippetLiteralType = Foundation.Data + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias SnippetRepresentation = Foundation.Data.SnippetRepresentation + } +} +extension Swift.Optional : Snippets.SnippetRepresentable where Wrapped : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Wrapped.SnippetRepresentation? + public init(snippetLiteral: Wrapped?) + @inlinable public init() { + self.init(snippetLiteral: nil) + } + @inlinable public func render() -> Wrapped? { literal?.render() } + @inlinable public static func _collect(_ elements: [Swift.Optional.SnippetRepresentation.Output]) -> Wrapped? { + Wrapped.SnippetRepresentation._collect(elements.compactMap { $0 }) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Wrapped? + public typealias SnippetLiteralType = Wrapped? + public typealias SnippetRepresentation = Swift.Optional.SnippetRepresentation + } +} +extension Swift.Optional : Snippets.SnippetRepresentableLiteral where Wrapped : Snippets.SnippetRepresentableLiteral { +} +extension Swift.String : Snippets.SnippetRepresentableString { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Swift.String + public init(snippetLiteral: Swift.String) + @inlinable public init() { + self.init(snippetLiteral: "") + } + @inlinable public func render() -> Swift.String { literal } + @inlinable public static func _collect(_ elements: [Swift.String.SnippetRepresentation.Output]) -> Swift.String.SnippetRepresentation.Output { + elements.joined(separator: environment(\.separator).render()) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Swift.String + public typealias SnippetLiteralType = Swift.String + public typealias SnippetRepresentation = Swift.String.SnippetRepresentation + } +} +extension Swift.Substring : Snippets.SnippetRepresentableString { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Swift.Substring + public init(snippetLiteral: Swift.Substring) + @inlinable public init() { + self.init(snippetLiteral: "") + } + @inlinable public func render() -> Swift.Substring { literal } + @inlinable public static func _collect(_ elements: [Swift.Substring.SnippetRepresentation.Output]) -> Swift.Substring { + .init(elements.joined(separator: environment(\.separator).render())) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Swift.Substring + public typealias SnippetLiteralType = Swift.Substring + public typealias SnippetRepresentation = Swift.Substring.SnippetRepresentation + } +} +extension Snippets.SnippetEnvironmentValues { + public var collectPreprocessor: @Sendable ([Output]) -> [Output] { + get + } + public var nonprocessingOutputCollector: @Sendable ([Output]) -> Output { + get + } + public var outputCollector: @Sendable ([Output]) -> Output { + get + } +} +extension Snippets.Snippet { + public func withNextOutputPreprocessor(_ preprocessor: @escaping @Sendable ([Self.Output]) -> [Self.Output], perform operation: () throws -> Self.Output) rethrows -> Self.Output + public func withOutputCollector(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column, perform operation: (@Sendable ([Self.Output]) -> Self.Output) throws -> Self.Output) rethrows -> Self.Output +} +extension Snippets.SnippetEnvironmentValues { + public var emptySeparator: some Snippets.Snippet { + get + } + public var separator: some Snippets.Snippet { + get + } +} +public protocol SnippetEnvironmentKey : Dependencies.DependencyKey { + associatedtype Output : Snippets.SnippetRepresentableLiteral + static var defaultValue: Self.Value { get } +} +extension Snippets.SnippetEnvironmentKey { + public static var liveValue: Self.Value { + get + } + public static var testValue: Self.Value { + get + } + public static var previewValue: Self.Value { + get + } +} +extension Snippets.Snippet { + @inlinable public static func environment(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) -> Snippets.SnippetEnvironmentValues { + SnippetEnvironmentValues( + fileID: fileID, + filePath: filePath, + line: line, + column: column + ) + } + @inlinable public static func environment(_ keyPath: Swift.KeyPath, Value>, fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) -> Value { + environment()[keyPath: keyPath] + } +} +public struct SnippetEnvironmentValues : Swift.Sendable where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let fileID: Swift.StaticString + @usableFromInline + internal let filePath: Swift.StaticString + @usableFromInline + internal let line: Swift.UInt + @usableFromInline + internal let column: Swift.UInt + @usableFromInline + internal init(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) + public func dependency(_ keyPath: Swift.KeyPath) -> Value +} +extension Snippets.SnippetExpressibleByLiteral where Self.Output : Swift.ExpressibleByStringLiteral { + public typealias StringLiteralType = Self.Output.StringLiteralType + public typealias UnicodeScalarLiteralType = Self.Output.UnicodeScalarLiteralType + public typealias ExtendedGraphemeClusterLiteralType = Self.Output.ExtendedGraphemeClusterLiteralType + public init(stringLiteral value: Self.Output.StringLiteralType) + public init(unicodeScalarLiteral value: Self.Output.UnicodeScalarLiteralType) + public init(extendedGraphemeClusterLiteral value: Self.Output.ExtendedGraphemeClusterLiteralType) +} +public protocol SnippetExpressibleByLiteral : Snippets.Snippet { + associatedtype SnippetLiteralType where Self.Output == Self.SnippetLiteralType + init(snippetLiteral: Self.SnippetLiteralType) + @inlinable init() +} +extension Snippets.SnippetExpressibleByLiteral where Self.Output : Swift.StringProtocol { + public init(_ snippet: some Snippet) +} +@usableFromInline +internal func uncheckedSendableAction(_ action: @escaping (Input) -> Output) -> @Sendable (Input) -> Output +public protocol Snippet : Snippets.SnippetRepresentable, Swift.Sendable where Self == Self.SnippetRepresentation { + associatedtype Output : Snippets.SnippetRepresentableLiteral + associatedtype Content : Snippets.Snippet + func render() -> Self.Output + @Snippets.SnippetBuilder var content: Self.Content { get } +} +extension Snippets.Snippet { + public func makeSnippet() -> Self.SnippetRepresentation +} +extension Snippets.Snippet where Self.Output == Self.Content.Output { + @inlinable @_optimize(none) public func render() -> Self.Output { + self.content.render() + } +} +extension Snippets.Snippet where Self.Content == Swift.Never.SnippetRepresentation { + @_transparent public var content: Swift.Never.SnippetRepresentation { + @_transparent get { + ._fatalError("'\(Self.self)' has no body.") + } + } +} +extension Swift.Never : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + public init(snippetLiteral: Swift.Never) + public init() + public var content: some Snippets.Snippet { + get + } + @_transparent public func render() -> Swift.Never { + fatalError("Unreachable") + } + @_transparent public func makeSnippet() -> Swift.Never.SnippetRepresentation { + fatalError("Unreachable") + } + @_transparent public static func _fatalError(_ message: Swift.String) -> Swift.Never.SnippetRepresentation { + fatalError(message) + } + public static func _collect(_ elements: [Swift.Never.SnippetRepresentation.Output]) -> Swift.Never.SnippetRepresentation.Output + public typealias Content = @_opaqueReturnTypeOf("$ss5NeverO8SnippetsE21SnippetRepresentationV7contentQrvp", 0) __ + public typealias Output = Swift.Never + public typealias SnippetLiteralType = Swift.Never + public typealias SnippetRepresentation = Swift.Never.SnippetRepresentation + } +} +@_functionBuilder public enum SnippetBuilder where Output : Snippets.SnippetRepresentableLiteral { + @inlinable public static func buildBlock() -> some Snippets.Snippet { + Output.SnippetRepresentation() + } + + @inlinable public static func buildPartialBlock(first: Component) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + first + } + + @inlinable public static func buildPartialBlock(accumulated: Accumulated, next: Next) -> some Snippets.Snippet where Output == Accumulated.Output, Accumulated : Snippets.Snippet, Next : Snippets.Snippet, Accumulated.Output == Next.Output { + _Sequence(accumulated, next) + } + + @inlinable public static func buildEither(first component: S0) -> Snippets.SnippetBuilder._Conditional where Output == S0.Output, S0 : Snippets.Snippet, S1 : Snippets.Snippet, S0.Output == S1.Output { + .first(component) + } + @inlinable public static func buildEither(second component: S1) -> Snippets.SnippetBuilder._Conditional where Output == S0.Output, S0 : Snippets.Snippet, S1 : Snippets.Snippet, S0.Output == S1.Output { + .second(component) + } + @inlinable public static func buildIf(_ content: Content?) -> Content? where Output == Content.Output, Content : Snippets.Snippet { + content + } + @inlinable public static func buildOptional(_ component: Component?) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + _Optional(component) + } + + @inlinable public static func buildArray(_ components: [Component]) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + _SequenceMany(components) + } + + @inlinable public static func buildExpression(_ component: any Snippets.Snippet) -> some Snippets.Snippet { + AnySnippet(component) + } + + @inlinable public static func buildExpression(_ component: Component?) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + _Optional(component) + } + + @inlinable public static func buildExpression(_ expression: Output) -> some Snippets.Snippet { + expression.makeSnippet() + } + + @inlinable public static func buildExpression(_ expression: some Snippet) -> some Snippets.Snippet { + expression + } + + @inlinable public static func buildExpression(_ expression: [some Snippet]) -> some Snippets.Snippet { + buildArray(expression) + } + + @inlinable public static func buildExpression(_ expression: [Output.SnippetRepresentation]) -> some Snippets.Snippet where Output == S.SnippetRepresentation.Output, S : Snippets.SnippetRepresentable { + buildArray(expression) + } + + @inlinable public static func buildExpression(_ expression: S) -> some Snippets.Snippet where Output == S.SnippetRepresentation.Output, S : Snippets.SnippetRepresentable { + expression.makeSnippet() + } + + @inlinable public static func buildFinalResult(_ component: Component) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + component + } + + public enum _Conditional : Snippets.Snippet where Output == First.Output, First : Snippets.Snippet, Second : Snippets.Snippet, First.Output == Second.Output { + case first(First) + case second(Second) + @inlinable public func render() -> Output { + switch self { + case let .first(first): + return first.render() + + case let .second(second): + return second.render() + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Conditional + } + public enum _Optional : Snippets.Snippet where Output == Contents.Output, Contents : Snippets.Snippet { + case some(Contents) + case none + public init(_ content: Contents?) + @inlinable public func render() -> Output { + switch self { + case let .some(contents): + return contents.render() + + case .none: + return Snippets.Const.empty.render() + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Optional + } + public struct _Sequence : Snippets.Snippet where Output == A.Output, A : Snippets.Snippet, B : Snippets.Snippet, A.Output == B.Output { + @usableFromInline + internal let a: A + @usableFromInline + internal let b: B + public init(_ a: A, _ b: B) + @inlinable public func render() -> Output { + withOutputCollector { collect in + collect(renderOutputs(for: self)) + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Sequence + } + public struct _SequenceMany : Snippets.Snippet where Output == Element.Output, Element : Snippets.Snippet { + @usableFromInline + internal let elements: [Element] + public init(_ elements: [Element]) + @inlinable public func render() -> Output { + withOutputCollector { collect in + collect(renderOutputs(for: self)) + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._SequenceMany + } +} +@usableFromInline +internal func renderOutputs(for snippet: some Snippet) -> [Output] +public struct AnySnippet : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let underlying: any Snippets.Snippet + public init(_ underlying: any Snippets.Snippet) + @inlinable public init(@Snippets.SnippetBuilder content: () -> some Snippet) { + self.init(content()) + } + @_disfavoredOverload public init(_ representable: R) where Output == R.SnippetRepresentation.Output, R : Snippets.SnippetRepresentable + @inlinable public func render() -> Output { + underlying.render() + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.AnySnippet +} +extension Snippets.Snippet { + @inlinable public func eraseToAnySnippet() -> Snippets.AnySnippet { + AnySnippet(self) + } +} +extension Snippets.Snippets { + public struct Append : Snippets.Snippet where Output == Source.Output, Source : Snippets.Snippet, Contents : Snippets.Snippet, Source.Output == Contents.Output { + @usableFromInline + internal let source: Source + @usableFromInline + internal let contents: Contents + public init(to source: Source, @Snippets.SnippetBuilder content: () -> Contents) + public func render() -> Output + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Append + } +} +extension Snippets.Snippet { + @inlinable public func withPrefix(_ prefix: some Snippet) -> some Snippets.Snippet { + Snippets.Append(to: prefix) { self } + } + + @inlinable public func withSuffix(_ suffix: some Snippet) -> some Snippets.Snippet { + Snippets.Append(to: self) { suffix } + } + +} +extension Snippets.SnippetExpressibleByLiteral { + @inlinable public func prefixed(with prefix: Self) -> Self { + .init(snippetLiteral: Snippets.Append(to: prefix) { self }.render()) + } + @inlinable public func suffixed(with suffix: Self) -> Self { + .init(snippetLiteral: Snippets.Append(to: self) { suffix }.render()) + } +} +extension Snippets.Snippets { + public struct Bracket : Snippets.Snippet where Output == Target.Output, Target : Snippets.Snippet { + public struct Brackets : Swift.Sendable { + @usableFromInline + internal let leading: Snippets.Snippets.Const + @usableFromInline + internal let trailing: Snippets.Snippets.Const + public init(leading: Snippets.Snippets.Const, trailing: Snippets.Snippets.Const) + public init(_ bracket: Snippets.Snippets.Const) + } + @usableFromInline + internal let target: Target + @usableFromInline + internal let brackets: Snippets.Snippets.Bracket.Brackets + public init(in brackets: Snippets.Snippets.Bracket.Brackets, @Snippets.SnippetBuilder target: () -> Target) + public init(_ target: Target, in brackets: Snippets.Snippets.Bracket.Brackets) + @inlinable public var content: some Snippets.Snippet { + get { + Join { + brackets.leading + target + brackets.trailing + } + } + } + public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO7BracketV7contentQrvp", 0) __ + public typealias SnippetRepresentation = Snippets.Snippets.Bracket + } +} +extension Snippets.Snippets.Bracket.Brackets { + public func withInner(_ brackets: Snippets.Snippets.Bracket.Brackets) -> Snippets.Snippets.Bracket.Brackets + public func withOuter(_ brackets: Snippets.Snippets.Bracket.Brackets) -> Snippets.Snippets.Bracket.Brackets +} +extension Snippets.Snippets.Bracket.Brackets where Output : Snippets.SnippetRepresentableString { + @inlinable public static func backticks(_ count: Swift.Int = 1) -> Snippets.Snippets.Bracket.Brackets { + .init(.backticks(count)) + } + @inlinable public static func quotes(_ count: Swift.Int = 1) -> Snippets.Snippets.Bracket.Brackets { + .init(.quotes(count)) + } + @inlinable public static var brackets: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .leftBracket, + trailing: .rightBracket + ) + } + } + @inlinable public static var braces: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .leftBrace, + trailing: .rightBrace + ) + } + } + @inlinable public static var parenthesis: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .leftParenthesis, + trailing: .rightParenthesis + ) + } + } + @inlinable public static var diamond: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .lessThan, + trailing: .greaterThan + ) + } + } + @inlinable public static var newlines: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .newline, + trailing: .newline + ) + } + } +} +extension Snippets.Snippets { + public struct Const : Snippets.SnippetExpressibleByLiteral where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let literal: Output.SnippetRepresentation + public init(_ literal: Output.SnippetRepresentation) + @inlinable public init(_ snippetLiteral: Output) { + self.literal = snippetLiteral.makeSnippet() + } + @inlinable public init(snippetLiteral: Output) { + self.init(snippetLiteral) + } + @inlinable public init() { + self.init(Output.SnippetRepresentation().render()) + } + @inlinable public func render() -> Output { literal.render() } + public static func repeating(_ output: Output, count: Swift.Int) -> Snippets.Snippets.Const + public static func repeating(_ literal: Snippets.Snippets.Const, count: Swift.Int) -> Snippets.Snippets.Const + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetLiteralType = Output + public typealias SnippetRepresentation = Snippets.Snippets.Const + } +} +extension Snippets.Snippets.Const { + @inlinable public static var empty: Snippets.Snippets.Const { + get { .init() } + } +} +extension Snippets.Snippets.Const : Swift.ExpressibleByStringLiteral, Swift.ExpressibleByUnicodeScalarLiteral, Swift.ExpressibleByExtendedGraphemeClusterLiteral where Output : Swift.ExpressibleByStringLiteral { +} +extension Snippets.Snippets.Const : Swift.Encodable where Output : Swift.Encodable { + public func encode(to encoder: any Swift.Encoder) throws +} +extension Snippets.Snippets.Const : Swift.Decodable where Output : Swift.Decodable { + public init(from decoder: any Swift.Decoder) throws +} +extension Snippets.Snippets { + public struct ForEach : Snippets.Snippet where Output == ElementSnippet.Output, Element : Swift.Sendable, ElementSnippet : Snippets.Snippet { + @usableFromInline + internal let elements: [ElementSnippet] + public init(_ sequence: S, @Snippets.SnippetBuilder content: (Element) -> ElementSnippet) where Element == S.Element, S : Swift.Sequence + @inlinable public var content: some Snippets.Snippet { + get { + elements + } + } + public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO7ForEachV7contentQrvp", 0) __ + public typealias SnippetRepresentation = Snippets.Snippets.ForEach + } +} +extension Snippets.Snippets { + public struct Group : Snippets.Snippet where Output == Contents.Output, Contents : Snippets.Snippet { + @usableFromInline + internal let contents: Contents + public init(@Snippets.SnippetBuilder content: () -> Contents) + public var content: some Snippets.Snippet { + get + } + public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO5GroupV7contentQrvp", 0) __ + public typealias SnippetRepresentation = Snippets.Snippets.Group + } +} +extension Snippets.Snippets { + public struct Inline : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let output: @Sendable () -> Output + public init(render: @escaping @Sendable () -> Output) + @inlinable public func render() -> Output { output() } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Inline + } +} +extension Snippets.Snippets { + public struct Join : Snippets.Snippet where Output == Separator.Output, Separator : Snippets.Snippet, Contents : Snippets.Snippet, Separator.Output == Contents.Output { + @usableFromInline + internal let separator: Separator + @usableFromInline + internal let contents: Contents + public init(_ separator: Separator, @Snippets.SnippetBuilder content: () -> Contents) + public func render() -> Output + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Join + } +} +extension Snippets.Snippets.Join where Separator == Output.SnippetRepresentation { + @inlinable public init(_ separator: Output, @Snippets.SnippetBuilder content: () -> Contents) { + self.init( + separator.makeSnippet(), + content: content + ) + } + @_disfavoredOverload @inlinable public init(_ separator: Separator = .init(), @Snippets.SnippetBuilder content: () -> Contents) { + self.init( + separator, + content: content + ) + } +} +extension Snippets.Snippets { + public struct Map : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral, Input : Snippets.Snippet { + @usableFromInline + internal let input: Input + @usableFromInline + internal let transform: @Sendable (Input.Output) -> Output + public init(_ input: Input, transform: @escaping @Sendable (Input.Output) -> Output) + @inlinable public init(@Snippets.SnippetBuilder input: () -> Input, transform: @escaping @Sendable (Input.Output) -> Output) { + self.init( + input(), + transform: transform + ) + } + @inlinable public func render() -> Output { + transform(input.render()) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Map + } +} +extension Snippets.Snippet { + @inlinable public func map(_ transform: @escaping @Sendable (Self.Output) -> T) -> some Snippets.Snippet where T : Snippets.SnippetRepresentableLiteral { + Snippets.Map(self, transform: transform) + } + +} +extension Snippets.Snippets { + public struct FlatMap : Snippets.Snippet where Output == Result.Output, Result : Snippets.Snippet, Input : Snippets.Snippet { + @usableFromInline + internal let input: Input + @usableFromInline + internal let transform: @Sendable (Input.Output) -> Result + public init(_ input: Input, @Snippets.SnippetBuilder transform: @escaping @Sendable (Input.Output) -> Result) + @inlinable public init(@Snippets.SnippetBuilder input: () -> Input, @Snippets.SnippetBuilder transform: @escaping @Sendable (Input.Output) -> Result) { + self.init( + input(), + transform: transform + ) + } + @inlinable public func render() -> Output { + transform(input.render()).render() + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.FlatMap + } +} +extension Snippets.Snippet { + @inlinable public func flatMap(@Snippets.SnippetBuilder _ transform: @escaping @Sendable (Self.Output) -> T) -> some Snippets.Snippet where T : Snippets.Snippet { + Snippets.FlatMap(self, transform: transform) + } + +} +extension Snippets.Snippets { + public struct SkipEmpty : Snippets.Snippet where Output : Swift.Collection, Output == Contents.Output, Contents : Snippets.Snippet { + @usableFromInline + internal let contents: Contents + public init(_ contents: Contents) + public init(@Snippets.SnippetBuilder content: () -> Contents) + @inlinable public func render() -> Output { + withNextOutputPreprocessor( + uncheckedSendableAction { $0.filter { !$0.isEmpty } } + ) { + contents.render() + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.SkipEmpty + } +} +extension Snippets.Snippets.SkipEmpty : Snippets.SnippetExpressibleByLiteral where Contents == Output.SnippetRepresentation { + public init(snippetLiteral: Output) + public init() + public typealias SnippetLiteralType = Output +} +extension Snippets.Snippet where Self.Output : Swift.Collection { + @inlinable public func skipEmpty() -> some Snippets.Snippet { + Snippets.SkipEmpty(self) + } + +} +extension Snippets.Snippets { + public struct UnsafeSendable : Snippets.SnippetExpressibleByLiteral where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let underlying: Snippets.Snippets.UnsafeSendable.Underlying + public init(_ literal: Output) + @inlinable public init(snippetLiteral: Output) { + self.init(snippetLiteral) + } + @inlinable public init() { + self.init(snippetLiteral: Output.SnippetRepresentation().render()) + } + public init(render: @escaping () -> Output) + @inlinable public func render() -> Output { underlying.render() } + @usableFromInline + internal enum Underlying : Snippets.Snippet { + case const(Snippets.Snippets.UnsafeSendable.Const) + case inline(Snippets.Snippets.UnsafeSendable.Inline) + @usableFromInline + internal func render() -> Output + @usableFromInline + internal typealias Content = Swift.Never.SnippetRepresentation + @usableFromInline + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Underlying + } + @usableFromInline + internal struct Const : Snippets.SnippetExpressibleByLiteral { + @usableFromInline + nonisolated(unsafe) internal let output: Output + @usableFromInline + internal init(snippetLiteral: Output) + @usableFromInline + internal init() + @usableFromInline + internal func render() -> Output + @usableFromInline + internal typealias Content = Swift.Never.SnippetRepresentation + @usableFromInline + internal typealias SnippetLiteralType = Output + @usableFromInline + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Const + } + @usableFromInline + internal struct Inline : Snippets.Snippet { + @usableFromInline + nonisolated(unsafe) internal let output: () -> Output + @usableFromInline + internal init(render: @escaping () -> Output) + @usableFromInline + internal func render() -> Output + @usableFromInline + internal typealias Content = Swift.Never.SnippetRepresentation + @usableFromInline + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Inline + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetLiteralType = Output + public typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable + } +} +public protocol SnippetRepresentable { + associatedtype SnippetRepresentation : Snippets.Snippet + func makeSnippet() -> Self.SnippetRepresentation +} +extension Snippets.SnippetRepresentable where Self : Snippets.SnippetRepresentableLiteral { + public func makeSnippet() -> Self.SnippetRepresentation +} +public protocol _StaticSnippetOutputCollector : Snippets.Snippet { + static func _collect(_ elements: [Self.Output]) -> Self.Output +} +public protocol SnippetRepresentableLiteral : Snippets.SnippetRepresentable where Self == Self.SnippetRepresentation.Output, Self.SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Self.SnippetRepresentation : Snippets._StaticSnippetOutputCollector { +} +public protocol SnippetRepresentableString : Snippets.SnippetRepresentableLiteral, Swift.StringProtocol { +} +extension Snippets.SnippetRepresentable { + @inlinable public static func snippet(@Snippets.SnippetBuilder content: () -> some Snippet) -> Self { + return .snippet(content()) + } + @inlinable public static func snippet(_ snippet: some Snippet) -> Self { + snippet.render() + } +} +public enum Snippets { +} From 29c9414970f84125cf11798444db40834f77ddb5 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:08:27 +0200 Subject: [PATCH 3/5] Update tvos Swift interfaces (#5) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../interfaces/tvos/Snippets.swiftinterface | 873 ++++++++++++++++++ 1 file changed, 873 insertions(+) create mode 100644 .agents/interfaces/tvos/Snippets.swiftinterface diff --git a/.agents/interfaces/tvos/Snippets.swiftinterface b/.agents/interfaces/tvos/Snippets.swiftinterface new file mode 100644 index 0000000..2366528 --- /dev/null +++ b/.agents/interfaces/tvos/Snippets.swiftinterface @@ -0,0 +1,873 @@ +// 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 Snippets -package-name swift_snippets +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Dependencies +import Foundation +import KeyPathsExtensions +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +extension Snippets.SnippetRepresentableLiteral { + public static func const(_ value: Snippets.Snippets.Const) -> Self +} +extension Snippets.Snippets.Const { + @inlinable public init(_ other: Snippets.Snippets.Const) { + self = other + } +} +extension Snippets.Snippets.Const where Output : Snippets.SnippetRepresentableString { + @inlinable public static var newline: Snippets.Snippets.Const { + get { + return .newlines(1) + } + } + @inlinable public static func newlines(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("\n", count: count) + } + @inlinable public static var whitespace: Snippets.Snippets.Const { + get { + return .whitespaces(1) + } + } + @inlinable public static func whitespaces(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(" ", count: count) + } + @inlinable public static var tab: Snippets.Snippets.Const { + get { + return .tabs(1) + } + } + @inlinable public static func tabs(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("\t", count: count) + } + @inlinable public static var quote: Snippets.Snippets.Const { + get { + return .quotes(1) + } + } + @inlinable public static func quotes(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("\"", count: count) + } + @inlinable public static var backtick: Snippets.Snippets.Const { + get { + return .backticks(1) + } + } + @inlinable public static func backticks(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("`", count: count) + } + @inlinable public static var colon: Snippets.Snippets.Const { + get { + return .colons(1) + } + } + @inlinable public static func colons(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(":", count: count) + } + @inlinable public static var dot: Snippets.Snippets.Const { + get { + return .dots(1) + } + } + @inlinable public static func dots(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(".", count: count) + } + @inlinable public static var comma: Snippets.Snippets.Const { + get { + return .commas(1) + } + } + @inlinable public static func commas(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(",", count: count) + } + @inlinable public static var leftBracket: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "[") + } + } + @inlinable public static var rightBracket: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "]") + } + } + @inlinable public static var leftBrace: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "{") + } + } + @inlinable public static var rightBrace: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "}") + } + } + @inlinable public static var leftParenthesis: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "(") + } + } + @inlinable public static var rightParenthesis: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: ")") + } + } + @inlinable public static var lessThan: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "<") + } + } + @inlinable public static var greaterThan: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: ">") + } + } + @inlinable public static var equal: Snippets.Snippets.Const { + get { + return .equals(count: 1) + } + } + @inlinable public static func equals(count: Swift.Int = 2) -> Snippets.Snippets.Const { + return .repeating("=", count: count) + } +} +extension Swift.Array : Snippets.SnippetRepresentable where Element : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: [Element.SnippetRepresentation] + public init(snippetLiteral: [Element]) + @inlinable public init() { + self.init(snippetLiteral: []) + } + @inlinable public func render() -> [Element] { literal.map { $0.render() } } + @inlinable public static func _collect(_ elements: [Swift.Array.SnippetRepresentation.Output]) -> [Element] { + .init(elements.joined(separator: environment(\.separator).render())) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = [Element] + public typealias SnippetLiteralType = [Element] + public typealias SnippetRepresentation = Swift.Array.SnippetRepresentation + } +} +extension Swift.Array : Snippets.SnippetRepresentableLiteral where Element : Snippets.SnippetRepresentableLiteral { +} +extension Foundation.Data : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Foundation.Data + public init(snippetLiteral: Foundation.Data) + @inlinable public init() { + self.init(snippetLiteral: .init()) + } + @inlinable public func render() -> Foundation.Data { literal } + @inlinable public static func _collect(_ elements: [Foundation.Data.SnippetRepresentation.Output]) -> Foundation.Data { + .init(elements.joined(separator: environment(\.separator).render())) + } + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias Content = Swift.Never.SnippetRepresentation + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias Output = Foundation.Data + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias SnippetLiteralType = Foundation.Data + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias SnippetRepresentation = Foundation.Data.SnippetRepresentation + } +} +extension Swift.Optional : Snippets.SnippetRepresentable where Wrapped : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Wrapped.SnippetRepresentation? + public init(snippetLiteral: Wrapped?) + @inlinable public init() { + self.init(snippetLiteral: nil) + } + @inlinable public func render() -> Wrapped? { literal?.render() } + @inlinable public static func _collect(_ elements: [Swift.Optional.SnippetRepresentation.Output]) -> Wrapped? { + Wrapped.SnippetRepresentation._collect(elements.compactMap { $0 }) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Wrapped? + public typealias SnippetLiteralType = Wrapped? + public typealias SnippetRepresentation = Swift.Optional.SnippetRepresentation + } +} +extension Swift.Optional : Snippets.SnippetRepresentableLiteral where Wrapped : Snippets.SnippetRepresentableLiteral { +} +extension Swift.String : Snippets.SnippetRepresentableString { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Swift.String + public init(snippetLiteral: Swift.String) + @inlinable public init() { + self.init(snippetLiteral: "") + } + @inlinable public func render() -> Swift.String { literal } + @inlinable public static func _collect(_ elements: [Swift.String.SnippetRepresentation.Output]) -> Swift.String.SnippetRepresentation.Output { + elements.joined(separator: environment(\.separator).render()) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Swift.String + public typealias SnippetLiteralType = Swift.String + public typealias SnippetRepresentation = Swift.String.SnippetRepresentation + } +} +extension Swift.Substring : Snippets.SnippetRepresentableString { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Swift.Substring + public init(snippetLiteral: Swift.Substring) + @inlinable public init() { + self.init(snippetLiteral: "") + } + @inlinable public func render() -> Swift.Substring { literal } + @inlinable public static func _collect(_ elements: [Swift.Substring.SnippetRepresentation.Output]) -> Swift.Substring { + .init(elements.joined(separator: environment(\.separator).render())) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Swift.Substring + public typealias SnippetLiteralType = Swift.Substring + public typealias SnippetRepresentation = Swift.Substring.SnippetRepresentation + } +} +extension Snippets.SnippetEnvironmentValues { + public var collectPreprocessor: @Sendable ([Output]) -> [Output] { + get + } + public var nonprocessingOutputCollector: @Sendable ([Output]) -> Output { + get + } + public var outputCollector: @Sendable ([Output]) -> Output { + get + } +} +extension Snippets.Snippet { + public func withNextOutputPreprocessor(_ preprocessor: @escaping @Sendable ([Self.Output]) -> [Self.Output], perform operation: () throws -> Self.Output) rethrows -> Self.Output + public func withOutputCollector(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column, perform operation: (@Sendable ([Self.Output]) -> Self.Output) throws -> Self.Output) rethrows -> Self.Output +} +extension Snippets.SnippetEnvironmentValues { + public var emptySeparator: some Snippets.Snippet { + get + } + public var separator: some Snippets.Snippet { + get + } +} +public protocol SnippetEnvironmentKey : Dependencies.DependencyKey { + associatedtype Output : Snippets.SnippetRepresentableLiteral + static var defaultValue: Self.Value { get } +} +extension Snippets.SnippetEnvironmentKey { + public static var liveValue: Self.Value { + get + } + public static var testValue: Self.Value { + get + } + public static var previewValue: Self.Value { + get + } +} +extension Snippets.Snippet { + @inlinable public static func environment(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) -> Snippets.SnippetEnvironmentValues { + SnippetEnvironmentValues( + fileID: fileID, + filePath: filePath, + line: line, + column: column + ) + } + @inlinable public static func environment(_ keyPath: Swift.KeyPath, Value>, fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) -> Value { + environment()[keyPath: keyPath] + } +} +public struct SnippetEnvironmentValues : Swift.Sendable where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let fileID: Swift.StaticString + @usableFromInline + internal let filePath: Swift.StaticString + @usableFromInline + internal let line: Swift.UInt + @usableFromInline + internal let column: Swift.UInt + @usableFromInline + internal init(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) + public func dependency(_ keyPath: Swift.KeyPath) -> Value +} +extension Snippets.SnippetExpressibleByLiteral where Self.Output : Swift.ExpressibleByStringLiteral { + public typealias StringLiteralType = Self.Output.StringLiteralType + public typealias UnicodeScalarLiteralType = Self.Output.UnicodeScalarLiteralType + public typealias ExtendedGraphemeClusterLiteralType = Self.Output.ExtendedGraphemeClusterLiteralType + public init(stringLiteral value: Self.Output.StringLiteralType) + public init(unicodeScalarLiteral value: Self.Output.UnicodeScalarLiteralType) + public init(extendedGraphemeClusterLiteral value: Self.Output.ExtendedGraphemeClusterLiteralType) +} +public protocol SnippetExpressibleByLiteral : Snippets.Snippet { + associatedtype SnippetLiteralType where Self.Output == Self.SnippetLiteralType + init(snippetLiteral: Self.SnippetLiteralType) + @inlinable init() +} +extension Snippets.SnippetExpressibleByLiteral where Self.Output : Swift.StringProtocol { + public init(_ snippet: some Snippet) +} +@usableFromInline +internal func uncheckedSendableAction(_ action: @escaping (Input) -> Output) -> @Sendable (Input) -> Output +public protocol Snippet : Snippets.SnippetRepresentable, Swift.Sendable where Self == Self.SnippetRepresentation { + associatedtype Output : Snippets.SnippetRepresentableLiteral + associatedtype Content : Snippets.Snippet + func render() -> Self.Output + @Snippets.SnippetBuilder var content: Self.Content { get } +} +extension Snippets.Snippet { + public func makeSnippet() -> Self.SnippetRepresentation +} +extension Snippets.Snippet where Self.Output == Self.Content.Output { + @inlinable @_optimize(none) public func render() -> Self.Output { + self.content.render() + } +} +extension Snippets.Snippet where Self.Content == Swift.Never.SnippetRepresentation { + @_transparent public var content: Swift.Never.SnippetRepresentation { + @_transparent get { + ._fatalError("'\(Self.self)' has no body.") + } + } +} +extension Swift.Never : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + public init(snippetLiteral: Swift.Never) + public init() + public var content: some Snippets.Snippet { + get + } + @_transparent public func render() -> Swift.Never { + fatalError("Unreachable") + } + @_transparent public func makeSnippet() -> Swift.Never.SnippetRepresentation { + fatalError("Unreachable") + } + @_transparent public static func _fatalError(_ message: Swift.String) -> Swift.Never.SnippetRepresentation { + fatalError(message) + } + public static func _collect(_ elements: [Swift.Never.SnippetRepresentation.Output]) -> Swift.Never.SnippetRepresentation.Output + public typealias Content = @_opaqueReturnTypeOf("$ss5NeverO8SnippetsE21SnippetRepresentationV7contentQrvp", 0) __ + public typealias Output = Swift.Never + public typealias SnippetLiteralType = Swift.Never + public typealias SnippetRepresentation = Swift.Never.SnippetRepresentation + } +} +@_functionBuilder public enum SnippetBuilder where Output : Snippets.SnippetRepresentableLiteral { + @inlinable public static func buildBlock() -> some Snippets.Snippet { + Output.SnippetRepresentation() + } + + @inlinable public static func buildPartialBlock(first: Component) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + first + } + + @inlinable public static func buildPartialBlock(accumulated: Accumulated, next: Next) -> some Snippets.Snippet where Output == Accumulated.Output, Accumulated : Snippets.Snippet, Next : Snippets.Snippet, Accumulated.Output == Next.Output { + _Sequence(accumulated, next) + } + + @inlinable public static func buildEither(first component: S0) -> Snippets.SnippetBuilder._Conditional where Output == S0.Output, S0 : Snippets.Snippet, S1 : Snippets.Snippet, S0.Output == S1.Output { + .first(component) + } + @inlinable public static func buildEither(second component: S1) -> Snippets.SnippetBuilder._Conditional where Output == S0.Output, S0 : Snippets.Snippet, S1 : Snippets.Snippet, S0.Output == S1.Output { + .second(component) + } + @inlinable public static func buildIf(_ content: Content?) -> Content? where Output == Content.Output, Content : Snippets.Snippet { + content + } + @inlinable public static func buildOptional(_ component: Component?) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + _Optional(component) + } + + @inlinable public static func buildArray(_ components: [Component]) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + _SequenceMany(components) + } + + @inlinable public static func buildExpression(_ component: any Snippets.Snippet) -> some Snippets.Snippet { + AnySnippet(component) + } + + @inlinable public static func buildExpression(_ component: Component?) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + _Optional(component) + } + + @inlinable public static func buildExpression(_ expression: Output) -> some Snippets.Snippet { + expression.makeSnippet() + } + + @inlinable public static func buildExpression(_ expression: some Snippet) -> some Snippets.Snippet { + expression + } + + @inlinable public static func buildExpression(_ expression: [some Snippet]) -> some Snippets.Snippet { + buildArray(expression) + } + + @inlinable public static func buildExpression(_ expression: [Output.SnippetRepresentation]) -> some Snippets.Snippet where Output == S.SnippetRepresentation.Output, S : Snippets.SnippetRepresentable { + buildArray(expression) + } + + @inlinable public static func buildExpression(_ expression: S) -> some Snippets.Snippet where Output == S.SnippetRepresentation.Output, S : Snippets.SnippetRepresentable { + expression.makeSnippet() + } + + @inlinable public static func buildFinalResult(_ component: Component) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + component + } + + public enum _Conditional : Snippets.Snippet where Output == First.Output, First : Snippets.Snippet, Second : Snippets.Snippet, First.Output == Second.Output { + case first(First) + case second(Second) + @inlinable public func render() -> Output { + switch self { + case let .first(first): + return first.render() + + case let .second(second): + return second.render() + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Conditional + } + public enum _Optional : Snippets.Snippet where Output == Contents.Output, Contents : Snippets.Snippet { + case some(Contents) + case none + public init(_ content: Contents?) + @inlinable public func render() -> Output { + switch self { + case let .some(contents): + return contents.render() + + case .none: + return Snippets.Const.empty.render() + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Optional + } + public struct _Sequence : Snippets.Snippet where Output == A.Output, A : Snippets.Snippet, B : Snippets.Snippet, A.Output == B.Output { + @usableFromInline + internal let a: A + @usableFromInline + internal let b: B + public init(_ a: A, _ b: B) + @inlinable public func render() -> Output { + withOutputCollector { collect in + collect(renderOutputs(for: self)) + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Sequence + } + public struct _SequenceMany : Snippets.Snippet where Output == Element.Output, Element : Snippets.Snippet { + @usableFromInline + internal let elements: [Element] + public init(_ elements: [Element]) + @inlinable public func render() -> Output { + withOutputCollector { collect in + collect(renderOutputs(for: self)) + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._SequenceMany + } +} +@usableFromInline +internal func renderOutputs(for snippet: some Snippet) -> [Output] +public struct AnySnippet : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let underlying: any Snippets.Snippet + public init(_ underlying: any Snippets.Snippet) + @inlinable public init(@Snippets.SnippetBuilder content: () -> some Snippet) { + self.init(content()) + } + @_disfavoredOverload public init(_ representable: R) where Output == R.SnippetRepresentation.Output, R : Snippets.SnippetRepresentable + @inlinable public func render() -> Output { + underlying.render() + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.AnySnippet +} +extension Snippets.Snippet { + @inlinable public func eraseToAnySnippet() -> Snippets.AnySnippet { + AnySnippet(self) + } +} +extension Snippets.Snippets { + public struct Append : Snippets.Snippet where Output == Source.Output, Source : Snippets.Snippet, Contents : Snippets.Snippet, Source.Output == Contents.Output { + @usableFromInline + internal let source: Source + @usableFromInline + internal let contents: Contents + public init(to source: Source, @Snippets.SnippetBuilder content: () -> Contents) + public func render() -> Output + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Append + } +} +extension Snippets.Snippet { + @inlinable public func withPrefix(_ prefix: some Snippet) -> some Snippets.Snippet { + Snippets.Append(to: prefix) { self } + } + + @inlinable public func withSuffix(_ suffix: some Snippet) -> some Snippets.Snippet { + Snippets.Append(to: self) { suffix } + } + +} +extension Snippets.SnippetExpressibleByLiteral { + @inlinable public func prefixed(with prefix: Self) -> Self { + .init(snippetLiteral: Snippets.Append(to: prefix) { self }.render()) + } + @inlinable public func suffixed(with suffix: Self) -> Self { + .init(snippetLiteral: Snippets.Append(to: self) { suffix }.render()) + } +} +extension Snippets.Snippets { + public struct Bracket : Snippets.Snippet where Output == Target.Output, Target : Snippets.Snippet { + public struct Brackets : Swift.Sendable { + @usableFromInline + internal let leading: Snippets.Snippets.Const + @usableFromInline + internal let trailing: Snippets.Snippets.Const + public init(leading: Snippets.Snippets.Const, trailing: Snippets.Snippets.Const) + public init(_ bracket: Snippets.Snippets.Const) + } + @usableFromInline + internal let target: Target + @usableFromInline + internal let brackets: Snippets.Snippets.Bracket.Brackets + public init(in brackets: Snippets.Snippets.Bracket.Brackets, @Snippets.SnippetBuilder target: () -> Target) + public init(_ target: Target, in brackets: Snippets.Snippets.Bracket.Brackets) + @inlinable public var content: some Snippets.Snippet { + get { + Join { + brackets.leading + target + brackets.trailing + } + } + } + public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO7BracketV7contentQrvp", 0) __ + public typealias SnippetRepresentation = Snippets.Snippets.Bracket + } +} +extension Snippets.Snippets.Bracket.Brackets { + public func withInner(_ brackets: Snippets.Snippets.Bracket.Brackets) -> Snippets.Snippets.Bracket.Brackets + public func withOuter(_ brackets: Snippets.Snippets.Bracket.Brackets) -> Snippets.Snippets.Bracket.Brackets +} +extension Snippets.Snippets.Bracket.Brackets where Output : Snippets.SnippetRepresentableString { + @inlinable public static func backticks(_ count: Swift.Int = 1) -> Snippets.Snippets.Bracket.Brackets { + .init(.backticks(count)) + } + @inlinable public static func quotes(_ count: Swift.Int = 1) -> Snippets.Snippets.Bracket.Brackets { + .init(.quotes(count)) + } + @inlinable public static var brackets: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .leftBracket, + trailing: .rightBracket + ) + } + } + @inlinable public static var braces: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .leftBrace, + trailing: .rightBrace + ) + } + } + @inlinable public static var parenthesis: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .leftParenthesis, + trailing: .rightParenthesis + ) + } + } + @inlinable public static var diamond: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .lessThan, + trailing: .greaterThan + ) + } + } + @inlinable public static var newlines: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .newline, + trailing: .newline + ) + } + } +} +extension Snippets.Snippets { + public struct Const : Snippets.SnippetExpressibleByLiteral where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let literal: Output.SnippetRepresentation + public init(_ literal: Output.SnippetRepresentation) + @inlinable public init(_ snippetLiteral: Output) { + self.literal = snippetLiteral.makeSnippet() + } + @inlinable public init(snippetLiteral: Output) { + self.init(snippetLiteral) + } + @inlinable public init() { + self.init(Output.SnippetRepresentation().render()) + } + @inlinable public func render() -> Output { literal.render() } + public static func repeating(_ output: Output, count: Swift.Int) -> Snippets.Snippets.Const + public static func repeating(_ literal: Snippets.Snippets.Const, count: Swift.Int) -> Snippets.Snippets.Const + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetLiteralType = Output + public typealias SnippetRepresentation = Snippets.Snippets.Const + } +} +extension Snippets.Snippets.Const { + @inlinable public static var empty: Snippets.Snippets.Const { + get { .init() } + } +} +extension Snippets.Snippets.Const : Swift.ExpressibleByStringLiteral, Swift.ExpressibleByUnicodeScalarLiteral, Swift.ExpressibleByExtendedGraphemeClusterLiteral where Output : Swift.ExpressibleByStringLiteral { +} +extension Snippets.Snippets.Const : Swift.Encodable where Output : Swift.Encodable { + public func encode(to encoder: any Swift.Encoder) throws +} +extension Snippets.Snippets.Const : Swift.Decodable where Output : Swift.Decodable { + public init(from decoder: any Swift.Decoder) throws +} +extension Snippets.Snippets { + public struct ForEach : Snippets.Snippet where Output == ElementSnippet.Output, Element : Swift.Sendable, ElementSnippet : Snippets.Snippet { + @usableFromInline + internal let elements: [ElementSnippet] + public init(_ sequence: S, @Snippets.SnippetBuilder content: (Element) -> ElementSnippet) where Element == S.Element, S : Swift.Sequence + @inlinable public var content: some Snippets.Snippet { + get { + elements + } + } + public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO7ForEachV7contentQrvp", 0) __ + public typealias SnippetRepresentation = Snippets.Snippets.ForEach + } +} +extension Snippets.Snippets { + public struct Group : Snippets.Snippet where Output == Contents.Output, Contents : Snippets.Snippet { + @usableFromInline + internal let contents: Contents + public init(@Snippets.SnippetBuilder content: () -> Contents) + public var content: some Snippets.Snippet { + get + } + public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO5GroupV7contentQrvp", 0) __ + public typealias SnippetRepresentation = Snippets.Snippets.Group + } +} +extension Snippets.Snippets { + public struct Inline : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let output: @Sendable () -> Output + public init(render: @escaping @Sendable () -> Output) + @inlinable public func render() -> Output { output() } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Inline + } +} +extension Snippets.Snippets { + public struct Join : Snippets.Snippet where Output == Separator.Output, Separator : Snippets.Snippet, Contents : Snippets.Snippet, Separator.Output == Contents.Output { + @usableFromInline + internal let separator: Separator + @usableFromInline + internal let contents: Contents + public init(_ separator: Separator, @Snippets.SnippetBuilder content: () -> Contents) + public func render() -> Output + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Join + } +} +extension Snippets.Snippets.Join where Separator == Output.SnippetRepresentation { + @inlinable public init(_ separator: Output, @Snippets.SnippetBuilder content: () -> Contents) { + self.init( + separator.makeSnippet(), + content: content + ) + } + @_disfavoredOverload @inlinable public init(_ separator: Separator = .init(), @Snippets.SnippetBuilder content: () -> Contents) { + self.init( + separator, + content: content + ) + } +} +extension Snippets.Snippets { + public struct Map : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral, Input : Snippets.Snippet { + @usableFromInline + internal let input: Input + @usableFromInline + internal let transform: @Sendable (Input.Output) -> Output + public init(_ input: Input, transform: @escaping @Sendable (Input.Output) -> Output) + @inlinable public init(@Snippets.SnippetBuilder input: () -> Input, transform: @escaping @Sendable (Input.Output) -> Output) { + self.init( + input(), + transform: transform + ) + } + @inlinable public func render() -> Output { + transform(input.render()) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Map + } +} +extension Snippets.Snippet { + @inlinable public func map(_ transform: @escaping @Sendable (Self.Output) -> T) -> some Snippets.Snippet where T : Snippets.SnippetRepresentableLiteral { + Snippets.Map(self, transform: transform) + } + +} +extension Snippets.Snippets { + public struct FlatMap : Snippets.Snippet where Output == Result.Output, Result : Snippets.Snippet, Input : Snippets.Snippet { + @usableFromInline + internal let input: Input + @usableFromInline + internal let transform: @Sendable (Input.Output) -> Result + public init(_ input: Input, @Snippets.SnippetBuilder transform: @escaping @Sendable (Input.Output) -> Result) + @inlinable public init(@Snippets.SnippetBuilder input: () -> Input, @Snippets.SnippetBuilder transform: @escaping @Sendable (Input.Output) -> Result) { + self.init( + input(), + transform: transform + ) + } + @inlinable public func render() -> Output { + transform(input.render()).render() + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.FlatMap + } +} +extension Snippets.Snippet { + @inlinable public func flatMap(@Snippets.SnippetBuilder _ transform: @escaping @Sendable (Self.Output) -> T) -> some Snippets.Snippet where T : Snippets.Snippet { + Snippets.FlatMap(self, transform: transform) + } + +} +extension Snippets.Snippets { + public struct SkipEmpty : Snippets.Snippet where Output : Swift.Collection, Output == Contents.Output, Contents : Snippets.Snippet { + @usableFromInline + internal let contents: Contents + public init(_ contents: Contents) + public init(@Snippets.SnippetBuilder content: () -> Contents) + @inlinable public func render() -> Output { + withNextOutputPreprocessor( + uncheckedSendableAction { $0.filter { !$0.isEmpty } } + ) { + contents.render() + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.SkipEmpty + } +} +extension Snippets.Snippets.SkipEmpty : Snippets.SnippetExpressibleByLiteral where Contents == Output.SnippetRepresentation { + public init(snippetLiteral: Output) + public init() + public typealias SnippetLiteralType = Output +} +extension Snippets.Snippet where Self.Output : Swift.Collection { + @inlinable public func skipEmpty() -> some Snippets.Snippet { + Snippets.SkipEmpty(self) + } + +} +extension Snippets.Snippets { + public struct UnsafeSendable : Snippets.SnippetExpressibleByLiteral where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let underlying: Snippets.Snippets.UnsafeSendable.Underlying + public init(_ literal: Output) + @inlinable public init(snippetLiteral: Output) { + self.init(snippetLiteral) + } + @inlinable public init() { + self.init(snippetLiteral: Output.SnippetRepresentation().render()) + } + public init(render: @escaping () -> Output) + @inlinable public func render() -> Output { underlying.render() } + @usableFromInline + internal enum Underlying : Snippets.Snippet { + case const(Snippets.Snippets.UnsafeSendable.Const) + case inline(Snippets.Snippets.UnsafeSendable.Inline) + @usableFromInline + internal func render() -> Output + @usableFromInline + internal typealias Content = Swift.Never.SnippetRepresentation + @usableFromInline + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Underlying + } + @usableFromInline + internal struct Const : Snippets.SnippetExpressibleByLiteral { + @usableFromInline + nonisolated(unsafe) internal let output: Output + @usableFromInline + internal init(snippetLiteral: Output) + @usableFromInline + internal init() + @usableFromInline + internal func render() -> Output + @usableFromInline + internal typealias Content = Swift.Never.SnippetRepresentation + @usableFromInline + internal typealias SnippetLiteralType = Output + @usableFromInline + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Const + } + @usableFromInline + internal struct Inline : Snippets.Snippet { + @usableFromInline + nonisolated(unsafe) internal let output: () -> Output + @usableFromInline + internal init(render: @escaping () -> Output) + @usableFromInline + internal func render() -> Output + @usableFromInline + internal typealias Content = Swift.Never.SnippetRepresentation + @usableFromInline + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Inline + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetLiteralType = Output + public typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable + } +} +public protocol SnippetRepresentable { + associatedtype SnippetRepresentation : Snippets.Snippet + func makeSnippet() -> Self.SnippetRepresentation +} +extension Snippets.SnippetRepresentable where Self : Snippets.SnippetRepresentableLiteral { + public func makeSnippet() -> Self.SnippetRepresentation +} +public protocol _StaticSnippetOutputCollector : Snippets.Snippet { + static func _collect(_ elements: [Self.Output]) -> Self.Output +} +public protocol SnippetRepresentableLiteral : Snippets.SnippetRepresentable where Self == Self.SnippetRepresentation.Output, Self.SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Self.SnippetRepresentation : Snippets._StaticSnippetOutputCollector { +} +public protocol SnippetRepresentableString : Snippets.SnippetRepresentableLiteral, Swift.StringProtocol { +} +extension Snippets.SnippetRepresentable { + @inlinable public static func snippet(@Snippets.SnippetBuilder content: () -> some Snippet) -> Self { + return .snippet(content()) + } + @inlinable public static func snippet(_ snippet: some Snippet) -> Self { + snippet.render() + } +} +public enum Snippets { +} From da347e32e4490380b12a8e3f5420532275540ecc 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:08:30 +0200 Subject: [PATCH 4/5] Update watchos Swift interfaces (#6) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../watchos/Snippets.swiftinterface | 873 ++++++++++++++++++ 1 file changed, 873 insertions(+) create mode 100644 .agents/interfaces/watchos/Snippets.swiftinterface diff --git a/.agents/interfaces/watchos/Snippets.swiftinterface b/.agents/interfaces/watchos/Snippets.swiftinterface new file mode 100644 index 0000000..307957c --- /dev/null +++ b/.agents/interfaces/watchos/Snippets.swiftinterface @@ -0,0 +1,873 @@ +// 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 Snippets -package-name swift_snippets +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 +import Dependencies +import Foundation +import KeyPathsExtensions +import Swift +import _Concurrency +import _StringProcessing +import _SwiftConcurrencyShims +extension Snippets.SnippetRepresentableLiteral { + public static func const(_ value: Snippets.Snippets.Const) -> Self +} +extension Snippets.Snippets.Const { + @inlinable public init(_ other: Snippets.Snippets.Const) { + self = other + } +} +extension Snippets.Snippets.Const where Output : Snippets.SnippetRepresentableString { + @inlinable public static var newline: Snippets.Snippets.Const { + get { + return .newlines(1) + } + } + @inlinable public static func newlines(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("\n", count: count) + } + @inlinable public static var whitespace: Snippets.Snippets.Const { + get { + return .whitespaces(1) + } + } + @inlinable public static func whitespaces(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(" ", count: count) + } + @inlinable public static var tab: Snippets.Snippets.Const { + get { + return .tabs(1) + } + } + @inlinable public static func tabs(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("\t", count: count) + } + @inlinable public static var quote: Snippets.Snippets.Const { + get { + return .quotes(1) + } + } + @inlinable public static func quotes(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("\"", count: count) + } + @inlinable public static var backtick: Snippets.Snippets.Const { + get { + return .backticks(1) + } + } + @inlinable public static func backticks(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating("`", count: count) + } + @inlinable public static var colon: Snippets.Snippets.Const { + get { + return .colons(1) + } + } + @inlinable public static func colons(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(":", count: count) + } + @inlinable public static var dot: Snippets.Snippets.Const { + get { + return .dots(1) + } + } + @inlinable public static func dots(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(".", count: count) + } + @inlinable public static var comma: Snippets.Snippets.Const { + get { + return .commas(1) + } + } + @inlinable public static func commas(_ count: Swift.Int) -> Snippets.Snippets.Const { + .repeating(",", count: count) + } + @inlinable public static var leftBracket: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "[") + } + } + @inlinable public static var rightBracket: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "]") + } + } + @inlinable public static var leftBrace: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "{") + } + } + @inlinable public static var rightBrace: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "}") + } + } + @inlinable public static var leftParenthesis: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "(") + } + } + @inlinable public static var rightParenthesis: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: ")") + } + } + @inlinable public static var lessThan: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: "<") + } + } + @inlinable public static var greaterThan: Snippets.Snippets.Const { + get { + return .init(snippetLiteral: ">") + } + } + @inlinable public static var equal: Snippets.Snippets.Const { + get { + return .equals(count: 1) + } + } + @inlinable public static func equals(count: Swift.Int = 2) -> Snippets.Snippets.Const { + return .repeating("=", count: count) + } +} +extension Swift.Array : Snippets.SnippetRepresentable where Element : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: [Element.SnippetRepresentation] + public init(snippetLiteral: [Element]) + @inlinable public init() { + self.init(snippetLiteral: []) + } + @inlinable public func render() -> [Element] { literal.map { $0.render() } } + @inlinable public static func _collect(_ elements: [Swift.Array.SnippetRepresentation.Output]) -> [Element] { + .init(elements.joined(separator: environment(\.separator).render())) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = [Element] + public typealias SnippetLiteralType = [Element] + public typealias SnippetRepresentation = Swift.Array.SnippetRepresentation + } +} +extension Swift.Array : Snippets.SnippetRepresentableLiteral where Element : Snippets.SnippetRepresentableLiteral { +} +extension Foundation.Data : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Foundation.Data + public init(snippetLiteral: Foundation.Data) + @inlinable public init() { + self.init(snippetLiteral: .init()) + } + @inlinable public func render() -> Foundation.Data { literal } + @inlinable public static func _collect(_ elements: [Foundation.Data.SnippetRepresentation.Output]) -> Foundation.Data { + .init(elements.joined(separator: environment(\.separator).render())) + } + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias Content = Swift.Never.SnippetRepresentation + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias Output = Foundation.Data + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias SnippetLiteralType = Foundation.Data + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias SnippetRepresentation = Foundation.Data.SnippetRepresentation + } +} +extension Swift.Optional : Snippets.SnippetRepresentable where Wrapped : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Wrapped.SnippetRepresentation? + public init(snippetLiteral: Wrapped?) + @inlinable public init() { + self.init(snippetLiteral: nil) + } + @inlinable public func render() -> Wrapped? { literal?.render() } + @inlinable public static func _collect(_ elements: [Swift.Optional.SnippetRepresentation.Output]) -> Wrapped? { + Wrapped.SnippetRepresentation._collect(elements.compactMap { $0 }) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Wrapped? + public typealias SnippetLiteralType = Wrapped? + public typealias SnippetRepresentation = Swift.Optional.SnippetRepresentation + } +} +extension Swift.Optional : Snippets.SnippetRepresentableLiteral where Wrapped : Snippets.SnippetRepresentableLiteral { +} +extension Swift.String : Snippets.SnippetRepresentableString { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Swift.String + public init(snippetLiteral: Swift.String) + @inlinable public init() { + self.init(snippetLiteral: "") + } + @inlinable public func render() -> Swift.String { literal } + @inlinable public static func _collect(_ elements: [Swift.String.SnippetRepresentation.Output]) -> Swift.String.SnippetRepresentation.Output { + elements.joined(separator: environment(\.separator).render()) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Swift.String + public typealias SnippetLiteralType = Swift.String + public typealias SnippetRepresentation = Swift.String.SnippetRepresentation + } +} +extension Swift.Substring : Snippets.SnippetRepresentableString { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + @usableFromInline + internal let literal: Swift.Substring + public init(snippetLiteral: Swift.Substring) + @inlinable public init() { + self.init(snippetLiteral: "") + } + @inlinable public func render() -> Swift.Substring { literal } + @inlinable public static func _collect(_ elements: [Swift.Substring.SnippetRepresentation.Output]) -> Swift.Substring { + .init(elements.joined(separator: environment(\.separator).render())) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Swift.Substring + public typealias SnippetLiteralType = Swift.Substring + public typealias SnippetRepresentation = Swift.Substring.SnippetRepresentation + } +} +extension Snippets.SnippetEnvironmentValues { + public var collectPreprocessor: @Sendable ([Output]) -> [Output] { + get + } + public var nonprocessingOutputCollector: @Sendable ([Output]) -> Output { + get + } + public var outputCollector: @Sendable ([Output]) -> Output { + get + } +} +extension Snippets.Snippet { + public func withNextOutputPreprocessor(_ preprocessor: @escaping @Sendable ([Self.Output]) -> [Self.Output], perform operation: () throws -> Self.Output) rethrows -> Self.Output + public func withOutputCollector(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column, perform operation: (@Sendable ([Self.Output]) -> Self.Output) throws -> Self.Output) rethrows -> Self.Output +} +extension Snippets.SnippetEnvironmentValues { + public var emptySeparator: some Snippets.Snippet { + get + } + public var separator: some Snippets.Snippet { + get + } +} +public protocol SnippetEnvironmentKey : Dependencies.DependencyKey { + associatedtype Output : Snippets.SnippetRepresentableLiteral + static var defaultValue: Self.Value { get } +} +extension Snippets.SnippetEnvironmentKey { + public static var liveValue: Self.Value { + get + } + public static var testValue: Self.Value { + get + } + public static var previewValue: Self.Value { + get + } +} +extension Snippets.Snippet { + @inlinable public static func environment(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) -> Snippets.SnippetEnvironmentValues { + SnippetEnvironmentValues( + fileID: fileID, + filePath: filePath, + line: line, + column: column + ) + } + @inlinable public static func environment(_ keyPath: Swift.KeyPath, Value>, fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) -> Value { + environment()[keyPath: keyPath] + } +} +public struct SnippetEnvironmentValues : Swift.Sendable where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let fileID: Swift.StaticString + @usableFromInline + internal let filePath: Swift.StaticString + @usableFromInline + internal let line: Swift.UInt + @usableFromInline + internal let column: Swift.UInt + @usableFromInline + internal init(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) + public func dependency(_ keyPath: Swift.KeyPath) -> Value +} +extension Snippets.SnippetExpressibleByLiteral where Self.Output : Swift.ExpressibleByStringLiteral { + public typealias StringLiteralType = Self.Output.StringLiteralType + public typealias UnicodeScalarLiteralType = Self.Output.UnicodeScalarLiteralType + public typealias ExtendedGraphemeClusterLiteralType = Self.Output.ExtendedGraphemeClusterLiteralType + public init(stringLiteral value: Self.Output.StringLiteralType) + public init(unicodeScalarLiteral value: Self.Output.UnicodeScalarLiteralType) + public init(extendedGraphemeClusterLiteral value: Self.Output.ExtendedGraphemeClusterLiteralType) +} +public protocol SnippetExpressibleByLiteral : Snippets.Snippet { + associatedtype SnippetLiteralType where Self.Output == Self.SnippetLiteralType + init(snippetLiteral: Self.SnippetLiteralType) + @inlinable init() +} +extension Snippets.SnippetExpressibleByLiteral where Self.Output : Swift.StringProtocol { + public init(_ snippet: some Snippet) +} +@usableFromInline +internal func uncheckedSendableAction(_ action: @escaping (Input) -> Output) -> @Sendable (Input) -> Output +public protocol Snippet : Snippets.SnippetRepresentable, Swift.Sendable where Self == Self.SnippetRepresentation { + associatedtype Output : Snippets.SnippetRepresentableLiteral + associatedtype Content : Snippets.Snippet + func render() -> Self.Output + @Snippets.SnippetBuilder var content: Self.Content { get } +} +extension Snippets.Snippet { + public func makeSnippet() -> Self.SnippetRepresentation +} +extension Snippets.Snippet where Self.Output == Self.Content.Output { + @inlinable @_optimize(none) public func render() -> Self.Output { + self.content.render() + } +} +extension Snippets.Snippet where Self.Content == Swift.Never.SnippetRepresentation { + @_transparent public var content: Swift.Never.SnippetRepresentation { + @_transparent get { + ._fatalError("'\(Self.self)' has no body.") + } + } +} +extension Swift.Never : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + public init(snippetLiteral: Swift.Never) + public init() + public var content: some Snippets.Snippet { + get + } + @_transparent public func render() -> Swift.Never { + fatalError("Unreachable") + } + @_transparent public func makeSnippet() -> Swift.Never.SnippetRepresentation { + fatalError("Unreachable") + } + @_transparent public static func _fatalError(_ message: Swift.String) -> Swift.Never.SnippetRepresentation { + fatalError(message) + } + public static func _collect(_ elements: [Swift.Never.SnippetRepresentation.Output]) -> Swift.Never.SnippetRepresentation.Output + public typealias Content = @_opaqueReturnTypeOf("$ss5NeverO8SnippetsE21SnippetRepresentationV7contentQrvp", 0) __ + public typealias Output = Swift.Never + public typealias SnippetLiteralType = Swift.Never + public typealias SnippetRepresentation = Swift.Never.SnippetRepresentation + } +} +@_functionBuilder public enum SnippetBuilder where Output : Snippets.SnippetRepresentableLiteral { + @inlinable public static func buildBlock() -> some Snippets.Snippet { + Output.SnippetRepresentation() + } + + @inlinable public static func buildPartialBlock(first: Component) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + first + } + + @inlinable public static func buildPartialBlock(accumulated: Accumulated, next: Next) -> some Snippets.Snippet where Output == Accumulated.Output, Accumulated : Snippets.Snippet, Next : Snippets.Snippet, Accumulated.Output == Next.Output { + _Sequence(accumulated, next) + } + + @inlinable public static func buildEither(first component: S0) -> Snippets.SnippetBuilder._Conditional where Output == S0.Output, S0 : Snippets.Snippet, S1 : Snippets.Snippet, S0.Output == S1.Output { + .first(component) + } + @inlinable public static func buildEither(second component: S1) -> Snippets.SnippetBuilder._Conditional where Output == S0.Output, S0 : Snippets.Snippet, S1 : Snippets.Snippet, S0.Output == S1.Output { + .second(component) + } + @inlinable public static func buildIf(_ content: Content?) -> Content? where Output == Content.Output, Content : Snippets.Snippet { + content + } + @inlinable public static func buildOptional(_ component: Component?) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + _Optional(component) + } + + @inlinable public static func buildArray(_ components: [Component]) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + _SequenceMany(components) + } + + @inlinable public static func buildExpression(_ component: any Snippets.Snippet) -> some Snippets.Snippet { + AnySnippet(component) + } + + @inlinable public static func buildExpression(_ component: Component?) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + _Optional(component) + } + + @inlinable public static func buildExpression(_ expression: Output) -> some Snippets.Snippet { + expression.makeSnippet() + } + + @inlinable public static func buildExpression(_ expression: some Snippet) -> some Snippets.Snippet { + expression + } + + @inlinable public static func buildExpression(_ expression: [some Snippet]) -> some Snippets.Snippet { + buildArray(expression) + } + + @inlinable public static func buildExpression(_ expression: [Output.SnippetRepresentation]) -> some Snippets.Snippet where Output == S.SnippetRepresentation.Output, S : Snippets.SnippetRepresentable { + buildArray(expression) + } + + @inlinable public static func buildExpression(_ expression: S) -> some Snippets.Snippet where Output == S.SnippetRepresentation.Output, S : Snippets.SnippetRepresentable { + expression.makeSnippet() + } + + @inlinable public static func buildFinalResult(_ component: Component) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { + component + } + + public enum _Conditional : Snippets.Snippet where Output == First.Output, First : Snippets.Snippet, Second : Snippets.Snippet, First.Output == Second.Output { + case first(First) + case second(Second) + @inlinable public func render() -> Output { + switch self { + case let .first(first): + return first.render() + + case let .second(second): + return second.render() + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Conditional + } + public enum _Optional : Snippets.Snippet where Output == Contents.Output, Contents : Snippets.Snippet { + case some(Contents) + case none + public init(_ content: Contents?) + @inlinable public func render() -> Output { + switch self { + case let .some(contents): + return contents.render() + + case .none: + return Snippets.Const.empty.render() + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Optional + } + public struct _Sequence : Snippets.Snippet where Output == A.Output, A : Snippets.Snippet, B : Snippets.Snippet, A.Output == B.Output { + @usableFromInline + internal let a: A + @usableFromInline + internal let b: B + public init(_ a: A, _ b: B) + @inlinable public func render() -> Output { + withOutputCollector { collect in + collect(renderOutputs(for: self)) + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Sequence + } + public struct _SequenceMany : Snippets.Snippet where Output == Element.Output, Element : Snippets.Snippet { + @usableFromInline + internal let elements: [Element] + public init(_ elements: [Element]) + @inlinable public func render() -> Output { + withOutputCollector { collect in + collect(renderOutputs(for: self)) + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Output + public typealias SnippetRepresentation = Snippets.SnippetBuilder._SequenceMany + } +} +@usableFromInline +internal func renderOutputs(for snippet: some Snippet) -> [Output] +public struct AnySnippet : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let underlying: any Snippets.Snippet + public init(_ underlying: any Snippets.Snippet) + @inlinable public init(@Snippets.SnippetBuilder content: () -> some Snippet) { + self.init(content()) + } + @_disfavoredOverload public init(_ representable: R) where Output == R.SnippetRepresentation.Output, R : Snippets.SnippetRepresentable + @inlinable public func render() -> Output { + underlying.render() + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.AnySnippet +} +extension Snippets.Snippet { + @inlinable public func eraseToAnySnippet() -> Snippets.AnySnippet { + AnySnippet(self) + } +} +extension Snippets.Snippets { + public struct Append : Snippets.Snippet where Output == Source.Output, Source : Snippets.Snippet, Contents : Snippets.Snippet, Source.Output == Contents.Output { + @usableFromInline + internal let source: Source + @usableFromInline + internal let contents: Contents + public init(to source: Source, @Snippets.SnippetBuilder content: () -> Contents) + public func render() -> Output + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Append + } +} +extension Snippets.Snippet { + @inlinable public func withPrefix(_ prefix: some Snippet) -> some Snippets.Snippet { + Snippets.Append(to: prefix) { self } + } + + @inlinable public func withSuffix(_ suffix: some Snippet) -> some Snippets.Snippet { + Snippets.Append(to: self) { suffix } + } + +} +extension Snippets.SnippetExpressibleByLiteral { + @inlinable public func prefixed(with prefix: Self) -> Self { + .init(snippetLiteral: Snippets.Append(to: prefix) { self }.render()) + } + @inlinable public func suffixed(with suffix: Self) -> Self { + .init(snippetLiteral: Snippets.Append(to: self) { suffix }.render()) + } +} +extension Snippets.Snippets { + public struct Bracket : Snippets.Snippet where Output == Target.Output, Target : Snippets.Snippet { + public struct Brackets : Swift.Sendable { + @usableFromInline + internal let leading: Snippets.Snippets.Const + @usableFromInline + internal let trailing: Snippets.Snippets.Const + public init(leading: Snippets.Snippets.Const, trailing: Snippets.Snippets.Const) + public init(_ bracket: Snippets.Snippets.Const) + } + @usableFromInline + internal let target: Target + @usableFromInline + internal let brackets: Snippets.Snippets.Bracket.Brackets + public init(in brackets: Snippets.Snippets.Bracket.Brackets, @Snippets.SnippetBuilder target: () -> Target) + public init(_ target: Target, in brackets: Snippets.Snippets.Bracket.Brackets) + @inlinable public var content: some Snippets.Snippet { + get { + Join { + brackets.leading + target + brackets.trailing + } + } + } + public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO7BracketV7contentQrvp", 0) __ + public typealias SnippetRepresentation = Snippets.Snippets.Bracket + } +} +extension Snippets.Snippets.Bracket.Brackets { + public func withInner(_ brackets: Snippets.Snippets.Bracket.Brackets) -> Snippets.Snippets.Bracket.Brackets + public func withOuter(_ brackets: Snippets.Snippets.Bracket.Brackets) -> Snippets.Snippets.Bracket.Brackets +} +extension Snippets.Snippets.Bracket.Brackets where Output : Snippets.SnippetRepresentableString { + @inlinable public static func backticks(_ count: Swift.Int = 1) -> Snippets.Snippets.Bracket.Brackets { + .init(.backticks(count)) + } + @inlinable public static func quotes(_ count: Swift.Int = 1) -> Snippets.Snippets.Bracket.Brackets { + .init(.quotes(count)) + } + @inlinable public static var brackets: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .leftBracket, + trailing: .rightBracket + ) + } + } + @inlinable public static var braces: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .leftBrace, + trailing: .rightBrace + ) + } + } + @inlinable public static var parenthesis: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .leftParenthesis, + trailing: .rightParenthesis + ) + } + } + @inlinable public static var diamond: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .lessThan, + trailing: .greaterThan + ) + } + } + @inlinable public static var newlines: Snippets.Snippets.Bracket.Brackets { + get { + return .init( + leading: .newline, + trailing: .newline + ) + } + } +} +extension Snippets.Snippets { + public struct Const : Snippets.SnippetExpressibleByLiteral where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let literal: Output.SnippetRepresentation + public init(_ literal: Output.SnippetRepresentation) + @inlinable public init(_ snippetLiteral: Output) { + self.literal = snippetLiteral.makeSnippet() + } + @inlinable public init(snippetLiteral: Output) { + self.init(snippetLiteral) + } + @inlinable public init() { + self.init(Output.SnippetRepresentation().render()) + } + @inlinable public func render() -> Output { literal.render() } + public static func repeating(_ output: Output, count: Swift.Int) -> Snippets.Snippets.Const + public static func repeating(_ literal: Snippets.Snippets.Const, count: Swift.Int) -> Snippets.Snippets.Const + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetLiteralType = Output + public typealias SnippetRepresentation = Snippets.Snippets.Const + } +} +extension Snippets.Snippets.Const { + @inlinable public static var empty: Snippets.Snippets.Const { + get { .init() } + } +} +extension Snippets.Snippets.Const : Swift.ExpressibleByStringLiteral, Swift.ExpressibleByUnicodeScalarLiteral, Swift.ExpressibleByExtendedGraphemeClusterLiteral where Output : Swift.ExpressibleByStringLiteral { +} +extension Snippets.Snippets.Const : Swift.Encodable where Output : Swift.Encodable { + public func encode(to encoder: any Swift.Encoder) throws +} +extension Snippets.Snippets.Const : Swift.Decodable where Output : Swift.Decodable { + public init(from decoder: any Swift.Decoder) throws +} +extension Snippets.Snippets { + public struct ForEach : Snippets.Snippet where Output == ElementSnippet.Output, Element : Swift.Sendable, ElementSnippet : Snippets.Snippet { + @usableFromInline + internal let elements: [ElementSnippet] + public init(_ sequence: S, @Snippets.SnippetBuilder content: (Element) -> ElementSnippet) where Element == S.Element, S : Swift.Sequence + @inlinable public var content: some Snippets.Snippet { + get { + elements + } + } + public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO7ForEachV7contentQrvp", 0) __ + public typealias SnippetRepresentation = Snippets.Snippets.ForEach + } +} +extension Snippets.Snippets { + public struct Group : Snippets.Snippet where Output == Contents.Output, Contents : Snippets.Snippet { + @usableFromInline + internal let contents: Contents + public init(@Snippets.SnippetBuilder content: () -> Contents) + public var content: some Snippets.Snippet { + get + } + public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO5GroupV7contentQrvp", 0) __ + public typealias SnippetRepresentation = Snippets.Snippets.Group + } +} +extension Snippets.Snippets { + public struct Inline : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let output: @Sendable () -> Output + public init(render: @escaping @Sendable () -> Output) + @inlinable public func render() -> Output { output() } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Inline + } +} +extension Snippets.Snippets { + public struct Join : Snippets.Snippet where Output == Separator.Output, Separator : Snippets.Snippet, Contents : Snippets.Snippet, Separator.Output == Contents.Output { + @usableFromInline + internal let separator: Separator + @usableFromInline + internal let contents: Contents + public init(_ separator: Separator, @Snippets.SnippetBuilder content: () -> Contents) + public func render() -> Output + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Join + } +} +extension Snippets.Snippets.Join where Separator == Output.SnippetRepresentation { + @inlinable public init(_ separator: Output, @Snippets.SnippetBuilder content: () -> Contents) { + self.init( + separator.makeSnippet(), + content: content + ) + } + @_disfavoredOverload @inlinable public init(_ separator: Separator = .init(), @Snippets.SnippetBuilder content: () -> Contents) { + self.init( + separator, + content: content + ) + } +} +extension Snippets.Snippets { + public struct Map : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral, Input : Snippets.Snippet { + @usableFromInline + internal let input: Input + @usableFromInline + internal let transform: @Sendable (Input.Output) -> Output + public init(_ input: Input, transform: @escaping @Sendable (Input.Output) -> Output) + @inlinable public init(@Snippets.SnippetBuilder input: () -> Input, transform: @escaping @Sendable (Input.Output) -> Output) { + self.init( + input(), + transform: transform + ) + } + @inlinable public func render() -> Output { + transform(input.render()) + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Map + } +} +extension Snippets.Snippet { + @inlinable public func map(_ transform: @escaping @Sendable (Self.Output) -> T) -> some Snippets.Snippet where T : Snippets.SnippetRepresentableLiteral { + Snippets.Map(self, transform: transform) + } + +} +extension Snippets.Snippets { + public struct FlatMap : Snippets.Snippet where Output == Result.Output, Result : Snippets.Snippet, Input : Snippets.Snippet { + @usableFromInline + internal let input: Input + @usableFromInline + internal let transform: @Sendable (Input.Output) -> Result + public init(_ input: Input, @Snippets.SnippetBuilder transform: @escaping @Sendable (Input.Output) -> Result) + @inlinable public init(@Snippets.SnippetBuilder input: () -> Input, @Snippets.SnippetBuilder transform: @escaping @Sendable (Input.Output) -> Result) { + self.init( + input(), + transform: transform + ) + } + @inlinable public func render() -> Output { + transform(input.render()).render() + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.FlatMap + } +} +extension Snippets.Snippet { + @inlinable public func flatMap(@Snippets.SnippetBuilder _ transform: @escaping @Sendable (Self.Output) -> T) -> some Snippets.Snippet where T : Snippets.Snippet { + Snippets.FlatMap(self, transform: transform) + } + +} +extension Snippets.Snippets { + public struct SkipEmpty : Snippets.Snippet where Output : Swift.Collection, Output == Contents.Output, Contents : Snippets.Snippet { + @usableFromInline + internal let contents: Contents + public init(_ contents: Contents) + public init(@Snippets.SnippetBuilder content: () -> Contents) + @inlinable public func render() -> Output { + withNextOutputPreprocessor( + uncheckedSendableAction { $0.filter { !$0.isEmpty } } + ) { + contents.render() + } + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.SkipEmpty + } +} +extension Snippets.Snippets.SkipEmpty : Snippets.SnippetExpressibleByLiteral where Contents == Output.SnippetRepresentation { + public init(snippetLiteral: Output) + public init() + public typealias SnippetLiteralType = Output +} +extension Snippets.Snippet where Self.Output : Swift.Collection { + @inlinable public func skipEmpty() -> some Snippets.Snippet { + Snippets.SkipEmpty(self) + } + +} +extension Snippets.Snippets { + public struct UnsafeSendable : Snippets.SnippetExpressibleByLiteral where Output : Snippets.SnippetRepresentableLiteral { + @usableFromInline + internal let underlying: Snippets.Snippets.UnsafeSendable.Underlying + public init(_ literal: Output) + @inlinable public init(snippetLiteral: Output) { + self.init(snippetLiteral) + } + @inlinable public init() { + self.init(snippetLiteral: Output.SnippetRepresentation().render()) + } + public init(render: @escaping () -> Output) + @inlinable public func render() -> Output { underlying.render() } + @usableFromInline + internal enum Underlying : Snippets.Snippet { + case const(Snippets.Snippets.UnsafeSendable.Const) + case inline(Snippets.Snippets.UnsafeSendable.Inline) + @usableFromInline + internal func render() -> Output + @usableFromInline + internal typealias Content = Swift.Never.SnippetRepresentation + @usableFromInline + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Underlying + } + @usableFromInline + internal struct Const : Snippets.SnippetExpressibleByLiteral { + @usableFromInline + nonisolated(unsafe) internal let output: Output + @usableFromInline + internal init(snippetLiteral: Output) + @usableFromInline + internal init() + @usableFromInline + internal func render() -> Output + @usableFromInline + internal typealias Content = Swift.Never.SnippetRepresentation + @usableFromInline + internal typealias SnippetLiteralType = Output + @usableFromInline + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Const + } + @usableFromInline + internal struct Inline : Snippets.Snippet { + @usableFromInline + nonisolated(unsafe) internal let output: () -> Output + @usableFromInline + internal init(render: @escaping () -> Output) + @usableFromInline + internal func render() -> Output + @usableFromInline + internal typealias Content = Swift.Never.SnippetRepresentation + @usableFromInline + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Inline + } + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetLiteralType = Output + public typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable + } +} +public protocol SnippetRepresentable { + associatedtype SnippetRepresentation : Snippets.Snippet + func makeSnippet() -> Self.SnippetRepresentation +} +extension Snippets.SnippetRepresentable where Self : Snippets.SnippetRepresentableLiteral { + public func makeSnippet() -> Self.SnippetRepresentation +} +public protocol _StaticSnippetOutputCollector : Snippets.Snippet { + static func _collect(_ elements: [Self.Output]) -> Self.Output +} +public protocol SnippetRepresentableLiteral : Snippets.SnippetRepresentable where Self == Self.SnippetRepresentation.Output, Self.SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Self.SnippetRepresentation : Snippets._StaticSnippetOutputCollector { +} +public protocol SnippetRepresentableString : Snippets.SnippetRepresentableLiteral, Swift.StringProtocol { +} +extension Snippets.SnippetRepresentable { + @inlinable public static func snippet(@Snippets.SnippetBuilder content: () -> some Snippet) -> Self { + return .snippet(content()) + } + @inlinable public static func snippet(_ snippet: some Snippet) -> Self { + snippet.render() + } +} +public enum Snippets { +} From a4dff028eefe4deb65940d7a06b7a6908959953e 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:08:33 +0200 Subject: [PATCH 5/5] Update macos Swift interfaces (#7) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../interfaces/macos/Snippets.swiftinterface | 548 +++++++++--------- 1 file changed, 274 insertions(+), 274 deletions(-) diff --git a/.agents/interfaces/macos/Snippets.swiftinterface b/.agents/interfaces/macos/Snippets.swiftinterface index 4cbf570..7a9cacc 100644 --- a/.agents/interfaces/macos/Snippets.swiftinterface +++ b/.agents/interfaces/macos/Snippets.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 Snippets -package-name swift_snippets -// 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 Snippets -package-name swift_snippets +// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3 import Dependencies import Foundation import KeyPathsExtensions @@ -9,130 +9,130 @@ import Swift import _Concurrency import _StringProcessing import _SwiftConcurrencyShims -extension Snippets::SnippetRepresentableLiteral { - public static func const(_ value: Snippets::Snippets.Snippets::Const) -> Self +extension Snippets.SnippetRepresentableLiteral { + public static func const(_ value: Snippets.Snippets.Const) -> Self } -extension Snippets::Snippets.Snippets::Const { - @inlinable public init(_ other: Snippets::Snippets.Snippets::Const) { +extension Snippets.Snippets.Const { + @inlinable public init(_ other: Snippets.Snippets.Const) { self = other } } -extension Snippets::Snippets.Snippets::Const where Output : Snippets::SnippetRepresentableString { - @inlinable public static var newline: Snippets::Snippets.Snippets::Const { +extension Snippets.Snippets.Const where Output : Snippets.SnippetRepresentableString { + @inlinable public static var newline: Snippets.Snippets.Const { get { return .newlines(1) } } - @inlinable public static func newlines(_ count: Swift::Int) -> Snippets::Snippets.Snippets::Const { + @inlinable public static func newlines(_ count: Swift.Int) -> Snippets.Snippets.Const { .repeating("\n", count: count) } - @inlinable public static var whitespace: Snippets::Snippets.Snippets::Const { + @inlinable public static var whitespace: Snippets.Snippets.Const { get { return .whitespaces(1) } } - @inlinable public static func whitespaces(_ count: Swift::Int) -> Snippets::Snippets.Snippets::Const { + @inlinable public static func whitespaces(_ count: Swift.Int) -> Snippets.Snippets.Const { .repeating(" ", count: count) } - @inlinable public static var tab: Snippets::Snippets.Snippets::Const { + @inlinable public static var tab: Snippets.Snippets.Const { get { return .tabs(1) } } - @inlinable public static func tabs(_ count: Swift::Int) -> Snippets::Snippets.Snippets::Const { + @inlinable public static func tabs(_ count: Swift.Int) -> Snippets.Snippets.Const { .repeating("\t", count: count) } - @inlinable public static var quote: Snippets::Snippets.Snippets::Const { + @inlinable public static var quote: Snippets.Snippets.Const { get { return .quotes(1) } } - @inlinable public static func quotes(_ count: Swift::Int) -> Snippets::Snippets.Snippets::Const { + @inlinable public static func quotes(_ count: Swift.Int) -> Snippets.Snippets.Const { .repeating("\"", count: count) } - @inlinable public static var backtick: Snippets::Snippets.Snippets::Const { + @inlinable public static var backtick: Snippets.Snippets.Const { get { return .backticks(1) } } - @inlinable public static func backticks(_ count: Swift::Int) -> Snippets::Snippets.Snippets::Const { + @inlinable public static func backticks(_ count: Swift.Int) -> Snippets.Snippets.Const { .repeating("`", count: count) } - @inlinable public static var colon: Snippets::Snippets.Snippets::Const { + @inlinable public static var colon: Snippets.Snippets.Const { get { return .colons(1) } } - @inlinable public static func colons(_ count: Swift::Int) -> Snippets::Snippets.Snippets::Const { + @inlinable public static func colons(_ count: Swift.Int) -> Snippets.Snippets.Const { .repeating(":", count: count) } - @inlinable public static var dot: Snippets::Snippets.Snippets::Const { + @inlinable public static var dot: Snippets.Snippets.Const { get { return .dots(1) } } - @inlinable public static func dots(_ count: Swift::Int) -> Snippets::Snippets.Snippets::Const { + @inlinable public static func dots(_ count: Swift.Int) -> Snippets.Snippets.Const { .repeating(".", count: count) } - @inlinable public static var comma: Snippets::Snippets.Snippets::Const { + @inlinable public static var comma: Snippets.Snippets.Const { get { return .commas(1) } } - @inlinable public static func commas(_ count: Swift::Int) -> Snippets::Snippets.Snippets::Const { + @inlinable public static func commas(_ count: Swift.Int) -> Snippets.Snippets.Const { .repeating(",", count: count) } - @inlinable public static var leftBracket: Snippets::Snippets.Snippets::Const { + @inlinable public static var leftBracket: Snippets.Snippets.Const { get { return .init(snippetLiteral: "[") } } - @inlinable public static var rightBracket: Snippets::Snippets.Snippets::Const { + @inlinable public static var rightBracket: Snippets.Snippets.Const { get { return .init(snippetLiteral: "]") } } - @inlinable public static var leftBrace: Snippets::Snippets.Snippets::Const { + @inlinable public static var leftBrace: Snippets.Snippets.Const { get { return .init(snippetLiteral: "{") } } - @inlinable public static var rightBrace: Snippets::Snippets.Snippets::Const { + @inlinable public static var rightBrace: Snippets.Snippets.Const { get { return .init(snippetLiteral: "}") } } - @inlinable public static var leftParenthesis: Snippets::Snippets.Snippets::Const { + @inlinable public static var leftParenthesis: Snippets.Snippets.Const { get { return .init(snippetLiteral: "(") } } - @inlinable public static var rightParenthesis: Snippets::Snippets.Snippets::Const { + @inlinable public static var rightParenthesis: Snippets.Snippets.Const { get { return .init(snippetLiteral: ")") } } - @inlinable public static var lessThan: Snippets::Snippets.Snippets::Const { + @inlinable public static var lessThan: Snippets.Snippets.Const { get { return .init(snippetLiteral: "<") } } - @inlinable public static var greaterThan: Snippets::Snippets.Snippets::Const { + @inlinable public static var greaterThan: Snippets.Snippets.Const { get { return .init(snippetLiteral: ">") } } - @inlinable public static var equal: Snippets::Snippets.Snippets::Const { + @inlinable public static var equal: Snippets.Snippets.Const { get { return .equals(count: 1) } } - @inlinable public static func equals(count: Swift::Int = 2) -> Snippets::Snippets.Snippets::Const { + @inlinable public static func equals(count: Swift.Int = 2) -> Snippets.Snippets.Const { return .repeating("=", count: count) } } -extension Swift::Array : Snippets::SnippetRepresentable where Element : Snippets::SnippetRepresentableLiteral { - public struct SnippetRepresentation : Snippets::SnippetExpressibleByLiteral, Snippets::_StaticSnippetOutputCollector { +extension Swift.Array : Snippets.SnippetRepresentable where Element : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { @usableFromInline internal let literal: [Element.SnippetRepresentation] public init(snippetLiteral: [Element]) @@ -140,41 +140,41 @@ extension Swift::Array : Snippets::SnippetRepresentable where Element : Snippets self.init(snippetLiteral: []) } @inlinable public func render() -> [Element] { literal.map { $0.render() } } - @inlinable public static func _collect(_ elements: [Swift::Array.Snippets::SnippetRepresentation.Snippets::Output]) -> [Element] { + @inlinable public static func _collect(_ elements: [Swift.Array.SnippetRepresentation.Output]) -> [Element] { .init(elements.joined(separator: environment(\.separator).render())) } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation + public typealias Content = Swift.Never.SnippetRepresentation public typealias Output = [Element] public typealias SnippetLiteralType = [Element] - public typealias SnippetRepresentation = Swift::Array.Snippets::SnippetRepresentation + public typealias SnippetRepresentation = Swift.Array.SnippetRepresentation } } -extension Swift::Array : Snippets::SnippetRepresentableLiteral where Element : Snippets::SnippetRepresentableLiteral { +extension Swift.Array : Snippets.SnippetRepresentableLiteral where Element : Snippets.SnippetRepresentableLiteral { } -extension Foundation::Data : Snippets::SnippetRepresentableLiteral { - public struct SnippetRepresentation : Snippets::SnippetExpressibleByLiteral, Snippets::_StaticSnippetOutputCollector { +extension Foundation.Data : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { @usableFromInline - internal let literal: Foundation::Data - public init(snippetLiteral: Foundation::Data) + internal let literal: Foundation.Data + public init(snippetLiteral: Foundation.Data) @inlinable public init() { self.init(snippetLiteral: .init()) } - @inlinable public func render() -> Foundation::Data { literal } - @inlinable public static func _collect(_ elements: [Foundation::Data.Snippets::SnippetRepresentation.Snippets::Output]) -> Foundation::Data { + @inlinable public func render() -> Foundation.Data { literal } + @inlinable public static func _collect(_ elements: [Foundation.Data.SnippetRepresentation.Output]) -> Foundation.Data { .init(elements.joined(separator: environment(\.separator).render())) } - @available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) - public typealias Content = Swift::Never.Snippets::SnippetRepresentation - @available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) - public typealias Output = Foundation::Data - @available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) - public typealias SnippetLiteralType = Foundation::Data - @available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) - public typealias SnippetRepresentation = Foundation::Data.Snippets::SnippetRepresentation - } -} -extension Swift::Optional : Snippets::SnippetRepresentable where Wrapped : Snippets::SnippetRepresentableLiteral { - public struct SnippetRepresentation : Snippets::SnippetExpressibleByLiteral, Snippets::_StaticSnippetOutputCollector { + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias Content = Swift.Never.SnippetRepresentation + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias Output = Foundation.Data + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias SnippetLiteralType = Foundation.Data + @available(iOS 8.0, tvOS 9.0, watchOS 2.0, macOS 10.10, *) + public typealias SnippetRepresentation = Foundation.Data.SnippetRepresentation + } +} +extension Swift.Optional : Snippets.SnippetRepresentable where Wrapped : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { @usableFromInline internal let literal: Wrapped.SnippetRepresentation? public init(snippetLiteral: Wrapped?) @@ -182,54 +182,54 @@ extension Swift::Optional : Snippets::SnippetRepresentable where Wrapped : Snipp self.init(snippetLiteral: nil) } @inlinable public func render() -> Wrapped? { literal?.render() } - @inlinable public static func _collect(_ elements: [Swift::Optional.Snippets::SnippetRepresentation.Snippets::Output]) -> Wrapped? { + @inlinable public static func _collect(_ elements: [Swift.Optional.SnippetRepresentation.Output]) -> Wrapped? { Wrapped.SnippetRepresentation._collect(elements.compactMap { $0 }) } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation + public typealias Content = Swift.Never.SnippetRepresentation public typealias Output = Wrapped? public typealias SnippetLiteralType = Wrapped? - public typealias SnippetRepresentation = Swift::Optional.Snippets::SnippetRepresentation + public typealias SnippetRepresentation = Swift.Optional.SnippetRepresentation } } -extension Swift::Optional : Snippets::SnippetRepresentableLiteral where Wrapped : Snippets::SnippetRepresentableLiteral { +extension Swift.Optional : Snippets.SnippetRepresentableLiteral where Wrapped : Snippets.SnippetRepresentableLiteral { } -extension Swift::String : Snippets::SnippetRepresentableString { - public struct SnippetRepresentation : Snippets::SnippetExpressibleByLiteral, Snippets::_StaticSnippetOutputCollector { +extension Swift.String : Snippets.SnippetRepresentableString { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { @usableFromInline - internal let literal: Swift::String - public init(snippetLiteral: Swift::String) + internal let literal: Swift.String + public init(snippetLiteral: Swift.String) @inlinable public init() { self.init(snippetLiteral: "") } - @inlinable public func render() -> Swift::String { literal } - @inlinable public static func _collect(_ elements: [Swift::String.Snippets::SnippetRepresentation.Snippets::Output]) -> Swift::String.Snippets::SnippetRepresentation.Snippets::Output { + @inlinable public func render() -> Swift.String { literal } + @inlinable public static func _collect(_ elements: [Swift.String.SnippetRepresentation.Output]) -> Swift.String.SnippetRepresentation.Output { elements.joined(separator: environment(\.separator).render()) } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation - public typealias Output = Swift::String - public typealias SnippetLiteralType = Swift::String - public typealias SnippetRepresentation = Swift::String.Snippets::SnippetRepresentation + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Swift.String + public typealias SnippetLiteralType = Swift.String + public typealias SnippetRepresentation = Swift.String.SnippetRepresentation } } -extension Swift::Substring : Snippets::SnippetRepresentableString { - public struct SnippetRepresentation : Snippets::SnippetExpressibleByLiteral, Snippets::_StaticSnippetOutputCollector { +extension Swift.Substring : Snippets.SnippetRepresentableString { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { @usableFromInline - internal let literal: Swift::Substring - public init(snippetLiteral: Swift::Substring) + internal let literal: Swift.Substring + public init(snippetLiteral: Swift.Substring) @inlinable public init() { self.init(snippetLiteral: "") } - @inlinable public func render() -> Swift::Substring { literal } - @inlinable public static func _collect(_ elements: [Swift::Substring.Snippets::SnippetRepresentation.Snippets::Output]) -> Swift::Substring { + @inlinable public func render() -> Swift.Substring { literal } + @inlinable public static func _collect(_ elements: [Swift.Substring.SnippetRepresentation.Output]) -> Swift.Substring { .init(elements.joined(separator: environment(\.separator).render())) } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation - public typealias Output = Swift::Substring - public typealias SnippetLiteralType = Swift::Substring - public typealias SnippetRepresentation = Swift::Substring.Snippets::SnippetRepresentation + public typealias Content = Swift.Never.SnippetRepresentation + public typealias Output = Swift.Substring + public typealias SnippetLiteralType = Swift.Substring + public typealias SnippetRepresentation = Swift.Substring.SnippetRepresentation } } -extension Snippets::SnippetEnvironmentValues { +extension Snippets.SnippetEnvironmentValues { public var collectPreprocessor: @Sendable ([Output]) -> [Output] { get } @@ -240,23 +240,23 @@ extension Snippets::SnippetEnvironmentValues { get } } -extension Snippets::Snippet { +extension Snippets.Snippet { public func withNextOutputPreprocessor(_ preprocessor: @escaping @Sendable ([Self.Output]) -> [Self.Output], perform operation: () throws -> Self.Output) rethrows -> Self.Output - public func withOutputCollector(fileID: Swift::StaticString = #fileID, filePath: Swift::StaticString = #filePath, line: Swift::UInt = #line, column: Swift::UInt = #column, perform operation: (@Sendable ([Self.Output]) -> Self.Output) throws -> Self.Output) rethrows -> Self.Output + public func withOutputCollector(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column, perform operation: (@Sendable ([Self.Output]) -> Self.Output) throws -> Self.Output) rethrows -> Self.Output } -extension Snippets::SnippetEnvironmentValues { - public var emptySeparator: some Snippets::Snippet { +extension Snippets.SnippetEnvironmentValues { + public var emptySeparator: some Snippets.Snippet { get } - public var separator: some Snippets::Snippet { + public var separator: some Snippets.Snippet { get } } -public protocol SnippetEnvironmentKey : Dependencies::DependencyKey { - associatedtype Output : Snippets::SnippetRepresentableLiteral +public protocol SnippetEnvironmentKey : Dependencies.DependencyKey { + associatedtype Output : Snippets.SnippetRepresentableLiteral static var defaultValue: Self.Value { get } } -extension Snippets::SnippetEnvironmentKey { +extension Snippets.SnippetEnvironmentKey { public static var liveValue: Self.Value { get } @@ -267,8 +267,8 @@ extension Snippets::SnippetEnvironmentKey { get } } -extension Snippets::Snippet { - @inlinable public static func environment(fileID: Swift::StaticString = #fileID, filePath: Swift::StaticString = #filePath, line: Swift::UInt = #line, column: Swift::UInt = #column) -> Snippets::SnippetEnvironmentValues { +extension Snippets.Snippet { + @inlinable public static func environment(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) -> Snippets.SnippetEnvironmentValues { SnippetEnvironmentValues( fileID: fileID, filePath: filePath, @@ -276,24 +276,24 @@ extension Snippets::Snippet { column: column ) } - @inlinable public static func environment(_ keyPath: Swift::KeyPath, Value>, fileID: Swift::StaticString = #fileID, filePath: Swift::StaticString = #filePath, line: Swift::UInt = #line, column: Swift::UInt = #column) -> Value { + @inlinable public static func environment(_ keyPath: Swift.KeyPath, Value>, fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) -> Value { environment()[keyPath: keyPath] } } -public struct SnippetEnvironmentValues : Swift::Sendable where Output : Snippets::SnippetRepresentableLiteral { +public struct SnippetEnvironmentValues : Swift.Sendable where Output : Snippets.SnippetRepresentableLiteral { @usableFromInline - internal let fileID: Swift::StaticString + internal let fileID: Swift.StaticString @usableFromInline - internal let filePath: Swift::StaticString + internal let filePath: Swift.StaticString @usableFromInline - internal let line: Swift::UInt + internal let line: Swift.UInt @usableFromInline - internal let column: Swift::UInt + internal let column: Swift.UInt @usableFromInline - internal init(fileID: Swift::StaticString = #fileID, filePath: Swift::StaticString = #filePath, line: Swift::UInt = #line, column: Swift::UInt = #column) - public func dependency(_ keyPath: Swift::KeyPath) -> Value + internal init(fileID: Swift.StaticString = #fileID, filePath: Swift.StaticString = #filePath, line: Swift.UInt = #line, column: Swift.UInt = #column) + public func dependency(_ keyPath: Swift.KeyPath) -> Value } -extension Snippets::SnippetExpressibleByLiteral where Self.Output : Swift::ExpressibleByStringLiteral { +extension Snippets.SnippetExpressibleByLiteral where Self.Output : Swift.ExpressibleByStringLiteral { public typealias StringLiteralType = Self.Output.StringLiteralType public typealias UnicodeScalarLiteralType = Self.Output.UnicodeScalarLiteralType public typealias ExtendedGraphemeClusterLiteralType = Self.Output.ExtendedGraphemeClusterLiteralType @@ -301,123 +301,123 @@ extension Snippets::SnippetExpressibleByLiteral where Self.Output : Swift::Expre public init(unicodeScalarLiteral value: Self.Output.UnicodeScalarLiteralType) public init(extendedGraphemeClusterLiteral value: Self.Output.ExtendedGraphemeClusterLiteralType) } -public protocol SnippetExpressibleByLiteral : Snippets::Snippet { +public protocol SnippetExpressibleByLiteral : Snippets.Snippet { associatedtype SnippetLiteralType where Self.Output == Self.SnippetLiteralType init(snippetLiteral: Self.SnippetLiteralType) @inlinable init() } -extension Snippets::SnippetExpressibleByLiteral where Self.Output : Swift::StringProtocol { +extension Snippets.SnippetExpressibleByLiteral where Self.Output : Swift.StringProtocol { public init(_ snippet: some Snippet) } @usableFromInline internal func uncheckedSendableAction(_ action: @escaping (Input) -> Output) -> @Sendable (Input) -> Output -public protocol Snippet : Snippets::SnippetRepresentable, Swift::Sendable where Self == Self.SnippetRepresentation { - associatedtype Output : Snippets::SnippetRepresentableLiteral - associatedtype Content : Snippets::Snippet +public protocol Snippet : Snippets.SnippetRepresentable, Swift.Sendable where Self == Self.SnippetRepresentation { + associatedtype Output : Snippets.SnippetRepresentableLiteral + associatedtype Content : Snippets.Snippet func render() -> Self.Output - @Snippets::SnippetBuilder var content: Self.Content { get } + @Snippets.SnippetBuilder var content: Self.Content { get } } -extension Snippets::Snippet { +extension Snippets.Snippet { public func makeSnippet() -> Self.SnippetRepresentation } -extension Snippets::Snippet where Self.Output == Self.Content.Output { +extension Snippets.Snippet where Self.Output == Self.Content.Output { @inlinable @_optimize(none) public func render() -> Self.Output { self.content.render() } } -extension Snippets::Snippet where Self.Content == Swift::Never.Snippets::SnippetRepresentation { - @_transparent public var content: Swift::Never.Snippets::SnippetRepresentation { +extension Snippets.Snippet where Self.Content == Swift.Never.SnippetRepresentation { + @_transparent public var content: Swift.Never.SnippetRepresentation { @_transparent get { ._fatalError("'\(Self.self)' has no body.") } } } -extension Swift::Never : Snippets::SnippetRepresentableLiteral { - public struct SnippetRepresentation : Snippets::SnippetExpressibleByLiteral, Snippets::_StaticSnippetOutputCollector { - public init(snippetLiteral: Swift::Never) +extension Swift.Never : Snippets.SnippetRepresentableLiteral { + public struct SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Snippets._StaticSnippetOutputCollector { + public init(snippetLiteral: Swift.Never) public init() - public var content: some Snippets::Snippet { + public var content: some Snippets.Snippet { get } - @_transparent public func render() -> Swift::Never { + @_transparent public func render() -> Swift.Never { fatalError("Unreachable") } - @_transparent public func makeSnippet() -> Swift::Never.Snippets::SnippetRepresentation { + @_transparent public func makeSnippet() -> Swift.Never.SnippetRepresentation { fatalError("Unreachable") } - @_transparent public static func _fatalError(_ message: Swift::String) -> Swift::Never.Snippets::SnippetRepresentation { + @_transparent public static func _fatalError(_ message: Swift.String) -> Swift.Never.SnippetRepresentation { fatalError(message) } - public static func _collect(_ elements: [Swift::Never.Snippets::SnippetRepresentation.Snippets::Output]) -> Swift::Never.Snippets::SnippetRepresentation.Snippets::Output + public static func _collect(_ elements: [Swift.Never.SnippetRepresentation.Output]) -> Swift.Never.SnippetRepresentation.Output public typealias Content = @_opaqueReturnTypeOf("$ss5NeverO8SnippetsE21SnippetRepresentationV7contentQrvp", 0) __ - public typealias Output = Swift::Never - public typealias SnippetLiteralType = Swift::Never - public typealias SnippetRepresentation = Swift::Never.Snippets::SnippetRepresentation + public typealias Output = Swift.Never + public typealias SnippetLiteralType = Swift.Never + public typealias SnippetRepresentation = Swift.Never.SnippetRepresentation } } -@_functionBuilder public enum SnippetBuilder where Output : Snippets::SnippetRepresentableLiteral { - @inlinable public static func buildBlock() -> some Snippets::Snippet { +@_functionBuilder public enum SnippetBuilder where Output : Snippets.SnippetRepresentableLiteral { + @inlinable public static func buildBlock() -> some Snippets.Snippet { Output.SnippetRepresentation() } - @inlinable public static func buildPartialBlock(first: Component) -> some Snippets::Snippet where Output == Component.Output, Component : Snippets::Snippet { + @inlinable public static func buildPartialBlock(first: Component) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { first } - @inlinable public static func buildPartialBlock(accumulated: Accumulated, next: Next) -> some Snippets::Snippet where Output == Accumulated.Output, Accumulated : Snippets::Snippet, Next : Snippets::Snippet, Accumulated.Output == Next.Output { + @inlinable public static func buildPartialBlock(accumulated: Accumulated, next: Next) -> some Snippets.Snippet where Output == Accumulated.Output, Accumulated : Snippets.Snippet, Next : Snippets.Snippet, Accumulated.Output == Next.Output { _Sequence(accumulated, next) } - @inlinable public static func buildEither(first component: S0) -> Snippets::SnippetBuilder.Snippets::_Conditional where Output == S0.Output, S0 : Snippets::Snippet, S1 : Snippets::Snippet, S0.Output == S1.Output { + @inlinable public static func buildEither(first component: S0) -> Snippets.SnippetBuilder._Conditional where Output == S0.Output, S0 : Snippets.Snippet, S1 : Snippets.Snippet, S0.Output == S1.Output { .first(component) } - @inlinable public static func buildEither(second component: S1) -> Snippets::SnippetBuilder.Snippets::_Conditional where Output == S0.Output, S0 : Snippets::Snippet, S1 : Snippets::Snippet, S0.Output == S1.Output { + @inlinable public static func buildEither(second component: S1) -> Snippets.SnippetBuilder._Conditional where Output == S0.Output, S0 : Snippets.Snippet, S1 : Snippets.Snippet, S0.Output == S1.Output { .second(component) } - @inlinable public static func buildIf(_ content: Content?) -> Content? where Output == Content.Output, Content : Snippets::Snippet { + @inlinable public static func buildIf(_ content: Content?) -> Content? where Output == Content.Output, Content : Snippets.Snippet { content } - @inlinable public static func buildOptional(_ component: Component?) -> some Snippets::Snippet where Output == Component.Output, Component : Snippets::Snippet { + @inlinable public static func buildOptional(_ component: Component?) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { _Optional(component) } - @inlinable public static func buildArray(_ components: [Component]) -> some Snippets::Snippet where Output == Component.Output, Component : Snippets::Snippet { + @inlinable public static func buildArray(_ components: [Component]) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { _SequenceMany(components) } - @inlinable public static func buildExpression(_ component: any Snippets::Snippet) -> some Snippets::Snippet { + @inlinable public static func buildExpression(_ component: any Snippets.Snippet) -> some Snippets.Snippet { AnySnippet(component) } - @inlinable public static func buildExpression(_ component: Component?) -> some Snippets::Snippet where Output == Component.Output, Component : Snippets::Snippet { + @inlinable public static func buildExpression(_ component: Component?) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { _Optional(component) } - @inlinable public static func buildExpression(_ expression: Output) -> some Snippets::Snippet { + @inlinable public static func buildExpression(_ expression: Output) -> some Snippets.Snippet { expression.makeSnippet() } - @inlinable public static func buildExpression(_ expression: some Snippet) -> some Snippets::Snippet { + @inlinable public static func buildExpression(_ expression: some Snippet) -> some Snippets.Snippet { expression } - @inlinable public static func buildExpression(_ expression: [some Snippet]) -> some Snippets::Snippet { + @inlinable public static func buildExpression(_ expression: [some Snippet]) -> some Snippets.Snippet { buildArray(expression) } - @inlinable public static func buildExpression(_ expression: [Output.SnippetRepresentation]) -> some Snippets::Snippet where Output == S.SnippetRepresentation.Output, S : Snippets::SnippetRepresentable { + @inlinable public static func buildExpression(_ expression: [Output.SnippetRepresentation]) -> some Snippets.Snippet where Output == S.SnippetRepresentation.Output, S : Snippets.SnippetRepresentable { buildArray(expression) } - @inlinable public static func buildExpression(_ expression: S) -> some Snippets::Snippet where Output == S.SnippetRepresentation.Output, S : Snippets::SnippetRepresentable { + @inlinable public static func buildExpression(_ expression: S) -> some Snippets.Snippet where Output == S.SnippetRepresentation.Output, S : Snippets.SnippetRepresentable { expression.makeSnippet() } - @inlinable public static func buildFinalResult(_ component: Component) -> some Snippets::Snippet where Output == Component.Output, Component : Snippets::Snippet { + @inlinable public static func buildFinalResult(_ component: Component) -> some Snippets.Snippet where Output == Component.Output, Component : Snippets.Snippet { component } - public enum _Conditional : Snippets::Snippet where Output == First.Output, First : Snippets::Snippet, Second : Snippets::Snippet, First.Output == Second.Output { + public enum _Conditional : Snippets.Snippet where Output == First.Output, First : Snippets.Snippet, Second : Snippets.Snippet, First.Output == Second.Output { case first(First) case second(Second) @inlinable public func render() -> Output { @@ -429,11 +429,11 @@ extension Swift::Never : Snippets::SnippetRepresentableLiteral { return second.render() } } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation + public typealias Content = Swift.Never.SnippetRepresentation public typealias Output = Output - public typealias SnippetRepresentation = Snippets::SnippetBuilder.Snippets::_Conditional + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Conditional } - public enum _Optional : Snippets::Snippet where Output == Contents.Output, Contents : Snippets::Snippet { + public enum _Optional : Snippets.Snippet where Output == Contents.Output, Contents : Snippets.Snippet { case some(Contents) case none public init(_ content: Contents?) @@ -446,11 +446,11 @@ extension Swift::Never : Snippets::SnippetRepresentableLiteral { return Snippets.Const.empty.render() } } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation + public typealias Content = Swift.Never.SnippetRepresentation public typealias Output = Output - public typealias SnippetRepresentation = Snippets::SnippetBuilder.Snippets::_Optional + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Optional } - public struct _Sequence : Snippets::Snippet where Output == A.Output, A : Snippets::Snippet, B : Snippets::Snippet, A.Output == B.Output { + public struct _Sequence : Snippets.Snippet where Output == A.Output, A : Snippets.Snippet, B : Snippets.Snippet, A.Output == B.Output { @usableFromInline internal let a: A @usableFromInline @@ -461,11 +461,11 @@ extension Swift::Never : Snippets::SnippetRepresentableLiteral { collect(renderOutputs(for: self)) } } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation + public typealias Content = Swift.Never.SnippetRepresentation public typealias Output = Output - public typealias SnippetRepresentation = Snippets::SnippetBuilder.Snippets::_Sequence + public typealias SnippetRepresentation = Snippets.SnippetBuilder._Sequence } - public struct _SequenceMany : Snippets::Snippet where Output == Element.Output, Element : Snippets::Snippet { + public struct _SequenceMany : Snippets.Snippet where Output == Element.Output, Element : Snippets.Snippet { @usableFromInline internal let elements: [Element] public init(_ elements: [Element]) @@ -474,55 +474,55 @@ extension Swift::Never : Snippets::SnippetRepresentableLiteral { collect(renderOutputs(for: self)) } } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation + public typealias Content = Swift.Never.SnippetRepresentation public typealias Output = Output - public typealias SnippetRepresentation = Snippets::SnippetBuilder.Snippets::_SequenceMany + public typealias SnippetRepresentation = Snippets.SnippetBuilder._SequenceMany } } @usableFromInline internal func renderOutputs(for snippet: some Snippet) -> [Output] -public struct AnySnippet : Snippets::Snippet where Output : Snippets::SnippetRepresentableLiteral { +public struct AnySnippet : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral { @usableFromInline - internal let underlying: any Snippets::Snippet - public init(_ underlying: any Snippets::Snippet) - @inlinable public init(@Snippets::SnippetBuilder content: () -> some Snippet) { + internal let underlying: any Snippets.Snippet + public init(_ underlying: any Snippets.Snippet) + @inlinable public init(@Snippets.SnippetBuilder content: () -> some Snippet) { self.init(content()) } - @_disfavoredOverload public init(_ representable: R) where Output == R.SnippetRepresentation.Output, R : Snippets::SnippetRepresentable + @_disfavoredOverload public init(_ representable: R) where Output == R.SnippetRepresentation.Output, R : Snippets.SnippetRepresentable @inlinable public func render() -> Output { underlying.render() } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation - public typealias SnippetRepresentation = Snippets::AnySnippet + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.AnySnippet } -extension Snippets::Snippet { - @inlinable public func eraseToAnySnippet() -> Snippets::AnySnippet { +extension Snippets.Snippet { + @inlinable public func eraseToAnySnippet() -> Snippets.AnySnippet { AnySnippet(self) } } -extension Snippets::Snippets { - public struct Append : Snippets::Snippet where Output == Source.Output, Source : Snippets::Snippet, Contents : Snippets::Snippet, Source.Output == Contents.Output { +extension Snippets.Snippets { + public struct Append : Snippets.Snippet where Output == Source.Output, Source : Snippets.Snippet, Contents : Snippets.Snippet, Source.Output == Contents.Output { @usableFromInline internal let source: Source @usableFromInline internal let contents: Contents - public init(to source: Source, @Snippets::SnippetBuilder content: () -> Contents) + public init(to source: Source, @Snippets.SnippetBuilder content: () -> Contents) public func render() -> Output - public typealias Content = Swift::Never.Snippets::SnippetRepresentation - public typealias SnippetRepresentation = Snippets::Snippets.Snippets::Append + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Append } } -extension Snippets::Snippet { - @inlinable public func withPrefix(_ prefix: some Snippet) -> some Snippets::Snippet { +extension Snippets.Snippet { + @inlinable public func withPrefix(_ prefix: some Snippet) -> some Snippets.Snippet { Snippets.Append(to: prefix) { self } } - @inlinable public func withSuffix(_ suffix: some Snippet) -> some Snippets::Snippet { + @inlinable public func withSuffix(_ suffix: some Snippet) -> some Snippets.Snippet { Snippets.Append(to: self) { suffix } } } -extension Snippets::SnippetExpressibleByLiteral { +extension Snippets.SnippetExpressibleByLiteral { @inlinable public func prefixed(with prefix: Self) -> Self { .init(snippetLiteral: Snippets.Append(to: prefix) { self }.render()) } @@ -530,23 +530,23 @@ extension Snippets::SnippetExpressibleByLiteral { .init(snippetLiteral: Snippets.Append(to: self) { suffix }.render()) } } -extension Snippets::Snippets { - public struct Bracket : Snippets::Snippet where Output == Target.Output, Target : Snippets::Snippet { - public struct Brackets : Swift::Sendable { +extension Snippets.Snippets { + public struct Bracket : Snippets.Snippet where Output == Target.Output, Target : Snippets.Snippet { + public struct Brackets : Swift.Sendable { @usableFromInline - internal let leading: Snippets::Snippets.Snippets::Const + internal let leading: Snippets.Snippets.Const @usableFromInline - internal let trailing: Snippets::Snippets.Snippets::Const - public init(leading: Snippets::Snippets.Snippets::Const, trailing: Snippets::Snippets.Snippets::Const) - public init(_ bracket: Snippets::Snippets.Snippets::Const) + internal let trailing: Snippets.Snippets.Const + public init(leading: Snippets.Snippets.Const, trailing: Snippets.Snippets.Const) + public init(_ bracket: Snippets.Snippets.Const) } @usableFromInline internal let target: Target @usableFromInline - internal let brackets: Snippets::Snippets.Snippets::Bracket.Snippets::Brackets - public init(in brackets: Snippets::Snippets.Snippets::Bracket.Snippets::Brackets, @Snippets::SnippetBuilder target: () -> Target) - public init(_ target: Target, in brackets: Snippets::Snippets.Snippets::Bracket.Snippets::Brackets) - @inlinable public var content: some Snippets::Snippet { + internal let brackets: Snippets.Snippets.Bracket.Brackets + public init(in brackets: Snippets.Snippets.Bracket.Brackets, @Snippets.SnippetBuilder target: () -> Target) + public init(_ target: Target, in brackets: Snippets.Snippets.Bracket.Brackets) + @inlinable public var content: some Snippets.Snippet { get { Join { brackets.leading @@ -556,21 +556,21 @@ extension Snippets::Snippets { } } public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO7BracketV7contentQrvp", 0) __ - public typealias SnippetRepresentation = Snippets::Snippets.Snippets::Bracket + public typealias SnippetRepresentation = Snippets.Snippets.Bracket } } -extension Snippets::Snippets.Snippets::Bracket.Snippets::Brackets { - public func withInner(_ brackets: Snippets::Snippets.Snippets::Bracket.Snippets::Brackets) -> Snippets::Snippets.Snippets::Bracket.Snippets::Brackets - public func withOuter(_ brackets: Snippets::Snippets.Snippets::Bracket.Snippets::Brackets) -> Snippets::Snippets.Snippets::Bracket.Snippets::Brackets +extension Snippets.Snippets.Bracket.Brackets { + public func withInner(_ brackets: Snippets.Snippets.Bracket.Brackets) -> Snippets.Snippets.Bracket.Brackets + public func withOuter(_ brackets: Snippets.Snippets.Bracket.Brackets) -> Snippets.Snippets.Bracket.Brackets } -extension Snippets::Snippets.Snippets::Bracket.Snippets::Brackets where Output : Snippets::SnippetRepresentableString { - @inlinable public static func backticks(_ count: Swift::Int = 1) -> Snippets::Snippets.Snippets::Bracket.Snippets::Brackets { +extension Snippets.Snippets.Bracket.Brackets where Output : Snippets.SnippetRepresentableString { + @inlinable public static func backticks(_ count: Swift.Int = 1) -> Snippets.Snippets.Bracket.Brackets { .init(.backticks(count)) } - @inlinable public static func quotes(_ count: Swift::Int = 1) -> Snippets::Snippets.Snippets::Bracket.Snippets::Brackets { + @inlinable public static func quotes(_ count: Swift.Int = 1) -> Snippets.Snippets.Bracket.Brackets { .init(.quotes(count)) } - @inlinable public static var brackets: Snippets::Snippets.Snippets::Bracket.Snippets::Brackets { + @inlinable public static var brackets: Snippets.Snippets.Bracket.Brackets { get { return .init( leading: .leftBracket, @@ -578,7 +578,7 @@ extension Snippets::Snippets.Snippets::Bracket.Snippets::Brackets where Output : ) } } - @inlinable public static var braces: Snippets::Snippets.Snippets::Bracket.Snippets::Brackets { + @inlinable public static var braces: Snippets.Snippets.Bracket.Brackets { get { return .init( leading: .leftBrace, @@ -586,7 +586,7 @@ extension Snippets::Snippets.Snippets::Bracket.Snippets::Brackets where Output : ) } } - @inlinable public static var parenthesis: Snippets::Snippets.Snippets::Bracket.Snippets::Brackets { + @inlinable public static var parenthesis: Snippets.Snippets.Bracket.Brackets { get { return .init( leading: .leftParenthesis, @@ -594,7 +594,7 @@ extension Snippets::Snippets.Snippets::Bracket.Snippets::Brackets where Output : ) } } - @inlinable public static var diamond: Snippets::Snippets.Snippets::Bracket.Snippets::Brackets { + @inlinable public static var diamond: Snippets.Snippets.Bracket.Brackets { get { return .init( leading: .lessThan, @@ -602,7 +602,7 @@ extension Snippets::Snippets.Snippets::Bracket.Snippets::Brackets where Output : ) } } - @inlinable public static var newlines: Snippets::Snippets.Snippets::Bracket.Snippets::Brackets { + @inlinable public static var newlines: Snippets.Snippets.Bracket.Brackets { get { return .init( leading: .newline, @@ -611,8 +611,8 @@ extension Snippets::Snippets.Snippets::Bracket.Snippets::Brackets where Output : } } } -extension Snippets::Snippets { - public struct Const : Snippets::SnippetExpressibleByLiteral where Output : Snippets::SnippetRepresentableLiteral { +extension Snippets.Snippets { + public struct Const : Snippets.SnippetExpressibleByLiteral where Output : Snippets.SnippetRepresentableLiteral { @usableFromInline internal let literal: Output.SnippetRepresentation public init(_ literal: Output.SnippetRepresentation) @@ -626,96 +626,96 @@ extension Snippets::Snippets { self.init(Output.SnippetRepresentation().render()) } @inlinable public func render() -> Output { literal.render() } - public static func repeating(_ output: Output, count: Swift::Int) -> Snippets::Snippets.Snippets::Const - public static func repeating(_ literal: Snippets::Snippets.Snippets::Const, count: Swift::Int) -> Snippets::Snippets.Snippets::Const - public typealias Content = Swift::Never.Snippets::SnippetRepresentation + public static func repeating(_ output: Output, count: Swift.Int) -> Snippets.Snippets.Const + public static func repeating(_ literal: Snippets.Snippets.Const, count: Swift.Int) -> Snippets.Snippets.Const + public typealias Content = Swift.Never.SnippetRepresentation public typealias SnippetLiteralType = Output - public typealias SnippetRepresentation = Snippets::Snippets.Snippets::Const + public typealias SnippetRepresentation = Snippets.Snippets.Const } } -extension Snippets::Snippets.Snippets::Const { - @inlinable public static var empty: Snippets::Snippets.Snippets::Const { +extension Snippets.Snippets.Const { + @inlinable public static var empty: Snippets.Snippets.Const { get { .init() } } } -extension Snippets::Snippets.Snippets::Const : Swift::ExpressibleByStringLiteral, Swift::ExpressibleByUnicodeScalarLiteral, Swift::ExpressibleByExtendedGraphemeClusterLiteral where Output : Swift::ExpressibleByStringLiteral { +extension Snippets.Snippets.Const : Swift.ExpressibleByStringLiteral, Swift.ExpressibleByUnicodeScalarLiteral, Swift.ExpressibleByExtendedGraphemeClusterLiteral where Output : Swift.ExpressibleByStringLiteral { } -extension Snippets::Snippets.Snippets::Const : Swift::Encodable where Output : Swift::Encodable { - public func encode(to encoder: any Swift::Encoder) throws +extension Snippets.Snippets.Const : Swift.Encodable where Output : Swift.Encodable { + public func encode(to encoder: any Swift.Encoder) throws } -extension Snippets::Snippets.Snippets::Const : Swift::Decodable where Output : Swift::Decodable { - public init(from decoder: any Swift::Decoder) throws +extension Snippets.Snippets.Const : Swift.Decodable where Output : Swift.Decodable { + public init(from decoder: any Swift.Decoder) throws } -extension Snippets::Snippets { - public struct ForEach : Snippets::Snippet where Output == ElementSnippet.Output, Element : Swift::Sendable, ElementSnippet : Snippets::Snippet { +extension Snippets.Snippets { + public struct ForEach : Snippets.Snippet where Output == ElementSnippet.Output, Element : Swift.Sendable, ElementSnippet : Snippets.Snippet { @usableFromInline internal let elements: [ElementSnippet] - public init(_ sequence: S, @Snippets::SnippetBuilder content: (Element) -> ElementSnippet) where Element == S.Element, S : Swift::Sequence - @inlinable public var content: some Snippets::Snippet { + public init(_ sequence: S, @Snippets.SnippetBuilder content: (Element) -> ElementSnippet) where Element == S.Element, S : Swift.Sequence + @inlinable public var content: some Snippets.Snippet { get { elements } } public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO7ForEachV7contentQrvp", 0) __ - public typealias SnippetRepresentation = Snippets::Snippets.Snippets::ForEach + public typealias SnippetRepresentation = Snippets.Snippets.ForEach } } -extension Snippets::Snippets { - public struct Group : Snippets::Snippet where Output == Contents.Output, Contents : Snippets::Snippet { +extension Snippets.Snippets { + public struct Group : Snippets.Snippet where Output == Contents.Output, Contents : Snippets.Snippet { @usableFromInline internal let contents: Contents - public init(@Snippets::SnippetBuilder content: () -> Contents) - public var content: some Snippets::Snippet { + public init(@Snippets.SnippetBuilder content: () -> Contents) + public var content: some Snippets.Snippet { get } public typealias Content = @_opaqueReturnTypeOf("$s8SnippetsAAO5GroupV7contentQrvp", 0) __ - public typealias SnippetRepresentation = Snippets::Snippets.Snippets::Group + public typealias SnippetRepresentation = Snippets.Snippets.Group } } -extension Snippets::Snippets { - public struct Inline : Snippets::Snippet where Output : Snippets::SnippetRepresentableLiteral { +extension Snippets.Snippets { + public struct Inline : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral { @usableFromInline internal let output: @Sendable () -> Output public init(render: @escaping @Sendable () -> Output) @inlinable public func render() -> Output { output() } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation - public typealias SnippetRepresentation = Snippets::Snippets.Snippets::Inline + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Inline } } -extension Snippets::Snippets { - public struct Join : Snippets::Snippet where Output == Separator.Output, Separator : Snippets::Snippet, Contents : Snippets::Snippet, Separator.Output == Contents.Output { +extension Snippets.Snippets { + public struct Join : Snippets.Snippet where Output == Separator.Output, Separator : Snippets.Snippet, Contents : Snippets.Snippet, Separator.Output == Contents.Output { @usableFromInline internal let separator: Separator @usableFromInline internal let contents: Contents - public init(_ separator: Separator, @Snippets::SnippetBuilder content: () -> Contents) + public init(_ separator: Separator, @Snippets.SnippetBuilder content: () -> Contents) public func render() -> Output - public typealias Content = Swift::Never.Snippets::SnippetRepresentation - public typealias SnippetRepresentation = Snippets::Snippets.Snippets::Join + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Join } } -extension Snippets::Snippets.Snippets::Join where Separator == Output.SnippetRepresentation { - @inlinable public init(_ separator: Output, @Snippets::SnippetBuilder content: () -> Contents) { +extension Snippets.Snippets.Join where Separator == Output.SnippetRepresentation { + @inlinable public init(_ separator: Output, @Snippets.SnippetBuilder content: () -> Contents) { self.init( separator.makeSnippet(), content: content ) } - @_disfavoredOverload @inlinable public init(_ separator: Separator = .init(), @Snippets::SnippetBuilder content: () -> Contents) { + @_disfavoredOverload @inlinable public init(_ separator: Separator = .init(), @Snippets.SnippetBuilder content: () -> Contents) { self.init( separator, content: content ) } } -extension Snippets::Snippets { - public struct Map : Snippets::Snippet where Output : Snippets::SnippetRepresentableLiteral, Input : Snippets::Snippet { +extension Snippets.Snippets { + public struct Map : Snippets.Snippet where Output : Snippets.SnippetRepresentableLiteral, Input : Snippets.Snippet { @usableFromInline internal let input: Input @usableFromInline internal let transform: @Sendable (Input.Output) -> Output public init(_ input: Input, transform: @escaping @Sendable (Input.Output) -> Output) - @inlinable public init(@Snippets::SnippetBuilder input: () -> Input, transform: @escaping @Sendable (Input.Output) -> Output) { + @inlinable public init(@Snippets.SnippetBuilder input: () -> Input, transform: @escaping @Sendable (Input.Output) -> Output) { self.init( input(), transform: transform @@ -724,24 +724,24 @@ extension Snippets::Snippets { @inlinable public func render() -> Output { transform(input.render()) } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation - public typealias SnippetRepresentation = Snippets::Snippets.Snippets::Map + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.Map } } -extension Snippets::Snippet { - @inlinable public func map(_ transform: @escaping @Sendable (Self.Output) -> T) -> some Snippets::Snippet where T : Snippets::SnippetRepresentableLiteral { +extension Snippets.Snippet { + @inlinable public func map(_ transform: @escaping @Sendable (Self.Output) -> T) -> some Snippets.Snippet where T : Snippets.SnippetRepresentableLiteral { Snippets.Map(self, transform: transform) } } -extension Snippets::Snippets { - public struct FlatMap : Snippets::Snippet where Output == Result.Output, Result : Snippets::Snippet, Input : Snippets::Snippet { +extension Snippets.Snippets { + public struct FlatMap : Snippets.Snippet where Output == Result.Output, Result : Snippets.Snippet, Input : Snippets.Snippet { @usableFromInline internal let input: Input @usableFromInline internal let transform: @Sendable (Input.Output) -> Result - public init(_ input: Input, @Snippets::SnippetBuilder transform: @escaping @Sendable (Input.Output) -> Result) - @inlinable public init(@Snippets::SnippetBuilder input: () -> Input, @Snippets::SnippetBuilder transform: @escaping @Sendable (Input.Output) -> Result) { + public init(_ input: Input, @Snippets.SnippetBuilder transform: @escaping @Sendable (Input.Output) -> Result) + @inlinable public init(@Snippets.SnippetBuilder input: () -> Input, @Snippets.SnippetBuilder transform: @escaping @Sendable (Input.Output) -> Result) { self.init( input(), transform: transform @@ -750,22 +750,22 @@ extension Snippets::Snippets { @inlinable public func render() -> Output { transform(input.render()).render() } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation - public typealias SnippetRepresentation = Snippets::Snippets.Snippets::FlatMap + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.FlatMap } } -extension Snippets::Snippet { - @inlinable public func flatMap(@Snippets::SnippetBuilder _ transform: @escaping @Sendable (Self.Output) -> T) -> some Snippets::Snippet where T : Snippets::Snippet { +extension Snippets.Snippet { + @inlinable public func flatMap(@Snippets.SnippetBuilder _ transform: @escaping @Sendable (Self.Output) -> T) -> some Snippets.Snippet where T : Snippets.Snippet { Snippets.FlatMap(self, transform: transform) } } -extension Snippets::Snippets { - public struct SkipEmpty : Snippets::Snippet where Output : Swift::Collection, Output == Contents.Output, Contents : Snippets::Snippet { +extension Snippets.Snippets { + public struct SkipEmpty : Snippets.Snippet where Output : Swift.Collection, Output == Contents.Output, Contents : Snippets.Snippet { @usableFromInline internal let contents: Contents public init(_ contents: Contents) - public init(@Snippets::SnippetBuilder content: () -> Contents) + public init(@Snippets.SnippetBuilder content: () -> Contents) @inlinable public func render() -> Output { withNextOutputPreprocessor( uncheckedSendableAction { $0.filter { !$0.isEmpty } } @@ -773,25 +773,25 @@ extension Snippets::Snippets { contents.render() } } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation - public typealias SnippetRepresentation = Snippets::Snippets.Snippets::SkipEmpty + public typealias Content = Swift.Never.SnippetRepresentation + public typealias SnippetRepresentation = Snippets.Snippets.SkipEmpty } } -extension Snippets::Snippets.Snippets::SkipEmpty : Snippets::SnippetExpressibleByLiteral where Contents == Output.SnippetRepresentation { +extension Snippets.Snippets.SkipEmpty : Snippets.SnippetExpressibleByLiteral where Contents == Output.SnippetRepresentation { public init(snippetLiteral: Output) public init() public typealias SnippetLiteralType = Output } -extension Snippets::Snippet where Self.Output : Swift::Collection { - @inlinable public func skipEmpty() -> some Snippets::Snippet { +extension Snippets.Snippet where Self.Output : Swift.Collection { + @inlinable public func skipEmpty() -> some Snippets.Snippet { Snippets.SkipEmpty(self) } } -extension Snippets::Snippets { - public struct UnsafeSendable : Snippets::SnippetExpressibleByLiteral where Output : Snippets::SnippetRepresentableLiteral { +extension Snippets.Snippets { + public struct UnsafeSendable : Snippets.SnippetExpressibleByLiteral where Output : Snippets.SnippetRepresentableLiteral { @usableFromInline - internal let underlying: Snippets::Snippets.Snippets::UnsafeSendable.Snippets::Underlying + internal let underlying: Snippets.Snippets.UnsafeSendable.Underlying public init(_ literal: Output) @inlinable public init(snippetLiteral: Output) { self.init(snippetLiteral) @@ -802,18 +802,18 @@ extension Snippets::Snippets { public init(render: @escaping () -> Output) @inlinable public func render() -> Output { underlying.render() } @usableFromInline - internal enum Underlying : Snippets::Snippet { - case const(Snippets::Snippets.Snippets::UnsafeSendable.Snippets::Const) - case inline(Snippets::Snippets.Snippets::UnsafeSendable.Snippets::Inline) + internal enum Underlying : Snippets.Snippet { + case const(Snippets.Snippets.UnsafeSendable.Const) + case inline(Snippets.Snippets.UnsafeSendable.Inline) @usableFromInline internal func render() -> Output @usableFromInline - internal typealias Content = Swift::Never.Snippets::SnippetRepresentation + internal typealias Content = Swift.Never.SnippetRepresentation @usableFromInline - internal typealias SnippetRepresentation = Snippets::Snippets.Snippets::UnsafeSendable.Snippets::Underlying + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Underlying } @usableFromInline - internal struct Const : Snippets::SnippetExpressibleByLiteral { + internal struct Const : Snippets.SnippetExpressibleByLiteral { @usableFromInline nonisolated(unsafe) internal let output: Output @usableFromInline @@ -823,14 +823,14 @@ extension Snippets::Snippets { @usableFromInline internal func render() -> Output @usableFromInline - internal typealias Content = Swift::Never.Snippets::SnippetRepresentation + internal typealias Content = Swift.Never.SnippetRepresentation @usableFromInline internal typealias SnippetLiteralType = Output @usableFromInline - internal typealias SnippetRepresentation = Snippets::Snippets.Snippets::UnsafeSendable.Snippets::Const + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Const } @usableFromInline - internal struct Inline : Snippets::Snippet { + internal struct Inline : Snippets.Snippet { @usableFromInline nonisolated(unsafe) internal let output: () -> Output @usableFromInline @@ -838,31 +838,31 @@ extension Snippets::Snippets { @usableFromInline internal func render() -> Output @usableFromInline - internal typealias Content = Swift::Never.Snippets::SnippetRepresentation + internal typealias Content = Swift.Never.SnippetRepresentation @usableFromInline - internal typealias SnippetRepresentation = Snippets::Snippets.Snippets::UnsafeSendable.Snippets::Inline + internal typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable.Inline } - public typealias Content = Swift::Never.Snippets::SnippetRepresentation + public typealias Content = Swift.Never.SnippetRepresentation public typealias SnippetLiteralType = Output - public typealias SnippetRepresentation = Snippets::Snippets.Snippets::UnsafeSendable + public typealias SnippetRepresentation = Snippets.Snippets.UnsafeSendable } } public protocol SnippetRepresentable { - associatedtype SnippetRepresentation : Snippets::Snippet + associatedtype SnippetRepresentation : Snippets.Snippet func makeSnippet() -> Self.SnippetRepresentation } -extension Snippets::SnippetRepresentable where Self : Snippets::SnippetRepresentableLiteral { +extension Snippets.SnippetRepresentable where Self : Snippets.SnippetRepresentableLiteral { public func makeSnippet() -> Self.SnippetRepresentation } -public protocol _StaticSnippetOutputCollector : Snippets::Snippet { +public protocol _StaticSnippetOutputCollector : Snippets.Snippet { static func _collect(_ elements: [Self.Output]) -> Self.Output } -public protocol SnippetRepresentableLiteral : Snippets::SnippetRepresentable where Self == Self.SnippetRepresentation.Output, Self.SnippetRepresentation : Snippets::SnippetExpressibleByLiteral, Self.SnippetRepresentation : Snippets::_StaticSnippetOutputCollector { +public protocol SnippetRepresentableLiteral : Snippets.SnippetRepresentable where Self == Self.SnippetRepresentation.Output, Self.SnippetRepresentation : Snippets.SnippetExpressibleByLiteral, Self.SnippetRepresentation : Snippets._StaticSnippetOutputCollector { } -public protocol SnippetRepresentableString : Snippets::SnippetRepresentableLiteral, Swift::StringProtocol { +public protocol SnippetRepresentableString : Snippets.SnippetRepresentableLiteral, Swift.StringProtocol { } -extension Snippets::SnippetRepresentable { - @inlinable public static func snippet(@Snippets::SnippetBuilder content: () -> some Snippet) -> Self { +extension Snippets.SnippetRepresentable { + @inlinable public static func snippet(@Snippets.SnippetBuilder content: () -> some Snippet) -> Self { return .snippet(content()) } @inlinable public static func snippet(_ snippet: some Snippet) -> Self {