ArrowType
public struct ArrowType : TypeProtocol
extension ArrowType: CallableType
extension ArrowType: CustomStringConvertible
A type expressed with an arrow.
-
The effect of the arrow’s call operator.
Declaration
Swift
public let receiverEffect: AccessEffect -
The environment of the arrow.
Declaration
Swift
public let environment: AnyType -
The input labels and types of the arrow.
Declaration
Swift
public let inputs: [CallableTypeParameter] -
The output type of the arrow.
Declaration
Swift
public let output: AnyType -
Declaration
Swift
public let flags: ValueFlags -
Creates an instance with the given properties.
Declaration
Swift
public init( receiverEffect: AccessEffect = .let, environment: AnyType = .void, inputs: [CallableTypeParameter], output: AnyType ) -
-
Given an initializer type
t, creates the corresponding constructor type.Requires
tis an initializer type of the form[](self: set A, B...) -> Void.Declaration
Swift
public init(constructorFormOf t: ArrowType) -
Given an constructor type
t, creates the corresponding initializer type.Requires
tis a constructor type of the form[](A...) -> B.Declaration
Swift
public init(initializerFormOf t: ArrowType) -
Returns a thin type accepting
self‘s environment as parameters.Declaration
Swift
public var lifted: ArrowType { get } -
selfsans environment.Declaration
Swift
public var strippingEnvironment: ArrowType { get } -
selftransformed as the type of a member ofreceiver, which is existential.Declaration
Swift
public func asMember(of receiver: ExistentialType) -> AnyType -
Accesses the individual elements of the lambda’s environment.
Declaration
Swift
public var captures: [TupleType.Element] { get } -
Undocumented
-
Declaration
Swift
public func transformParts<M>( mutating m: inout M, _ transformer: (inout M, AnyType) -> TypeTransformAction ) -> Self -
Declaration
Swift
public var isArrow: Bool { get } -
Declaration
Swift
public var description: String { get }
View on GitHub