Struct kailua_types::ty::TySeq [] [src]

pub struct TySeq {
    pub head: Vec<Ty>,
    pub tail: Option<Ty>,
}

A sequence of value types.

Fields

The "head" types, a list of finite types at the beginning of the sequence.

The optional "tail" type. If present, it repeats indefinitely after "head".

This is implicitly nilable, because the actual value represented by the sequence is never infinite, so there should be a nil somewhere. Since we don't know where it ends, the tail should be implicitly unioned with nil in all practical sense.

We may implicitly put the nil here if it's missing, but the absence of the tail type makes a few important differences in checking. For example, function arguments are a sequence, and excess parameters to non-variadic arguments should be forbidden even if those excess parameters are always nil. This is only possible when we have a separate way to mark a missing tail.

Methods

impl TySeq
[src]

impl TySeq
[src]

Trait Implementations

impl Clone for TySeq
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for TySeq
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> From<T<'a>> for TySeq
[src]

Performs the conversion.

impl From<Ty> for TySeq
[src]

Performs the conversion.

impl Dummy for TySeq
[src]

Generates a dummy value.

impl Union for TySeq
[src]

A type of the resulting type.

Calculates a union type of self and other, explicitly or implicitly. Read more

impl Lattice for TySeq
[src]

Asserts that self is a consistent subtype of other under the type context.

Asserts that self is a consistent type equal to other under the type context.

impl Display for TySeq
[src]

impl Debug for TySeq
[src]

Formats the value using the given formatter.