Solution
struct Solution : Sendable
extension Solution: CustomStringConvertible
A solution returned by a constraint solver.
-
The score of a solution.
See moreDeclaration
Swift
struct Score : Comparable, Sendable -
The type and term substitutions made by the solver.
Declaration
Swift
private(set) var substitutions: SubstitutionMap { get } -
The name binding assumptions made by the solver.
Declaration
Swift
private(set) var bindings: BindingMap { get } -
A map from call expression to its operands after desugaring and implicit resolution.
Declaration
Swift
private(set) var callOperands: [CallID : [ArgumentResolutionResult]] { get } -
The penalties of the solution.
Declaration
Swift
private(set) var penalties: Int { get } -
The diagnostics of the errors associated with the solution.
Declaration
Swift
private(set) var diagnostics: DiagnosticSet { get } -
The constraints that could not be solved.
Declaration
Swift
private(set) var stale: [Constraint] { get } -
Creates an empty solution.
Declaration
Swift
init() -
Creates an instance with the given properties.
Declaration
Swift
init( substitutions: SubstitutionMap, bindings: [NameExpr.ID: DeclReference], callOperands: [CallID: [ArgumentResolutionResult]], penalties: Int, diagnostics: DiagnosticSet, stale: [Constraint] ) -
trueiff the solution has no error.Declaration
Swift
var isSound: Bool { get } -
The score of the solution.
Declaration
Swift
var score: Score { get } -
Incorporates
dintoself.Declaration
Swift
mutating func incorporate(_ d: Diagnostic) -
Removes the type and binding assumptions that aren’t in
otherand incorporate the penalties and diagnostics ofotherintoself.Declaration
Swift
mutating func formIntersection(_ other: `Self`) -
Declaration
Swift
public var description: String { get }
View on GitHub