Struct kailua_types::ty::Ty [] [src]

pub struct Ty { /* fields omitted */ }

A value type, which is also a sort of pointer (to handle recursively defined T).

The full value type consists of a non-nilable portion (T), the nil (Nil), an optional type tag (Tag) and an optional display name (DisplayName).

Methods

impl Ty
[src]

Methods from Deref<Target = T<'static>>

Coerces "implicit" types into "explicit" types.

This is the only possible way in Kailua for implicit coercions to happen, and does the following:

  • Removes implicit literal types from self, by replacing them with boolean, integer or string. This does not affect explicit literal types from Ty::from_kind. (This happens in the shallow way, as implicit types are incrementally constructed.)

This is used when new variable or field has been added without explicit types, or upper & exact bounds for type variables get updated (lower bounds do not).

Replaces type and row variables present in given type to their fresh copies.

Primarily used for function calls where all type variable and row variables are made fresh per each call, so that prior calls cannot affect constraints to later calls.

Trait Implementations

impl Clone for Ty
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Ty
[src]

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

This method tests for !=.

impl Dummy for Ty
[src]

Generates a dummy value.

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

Performs the conversion.

impl Deref for Ty
[src]

The resulting type after dereferencing

The method called to dereference a value

impl DerefMut for Ty
[src]

The method called to mutably dereference a value

impl<'a> Union<T<'a>> for Ty
[src]

A type of the resulting type.

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

impl<'a> Lattice<T<'a>> for Ty
[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 Union<Ty> for Ty
[src]

A type of the resulting type.

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

impl Lattice<Ty> for Ty
[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 Ty
[src]

impl Debug for Ty
[src]

Formats the value using the given formatter.