Struct kailua_types::ty::NoTypeContext [] [src]

pub struct NoTypeContext;

An implementation of TypeContext that raises an error for most methods.

Useful for ensuring that no operations involve type variables or row variables.

Trait Implementations

impl TypeContext for NoTypeContext
[src]

Generates a new, empty type report.

Returns the latest type variable generated, if any.

Generates a new fresh type variable.

Copies a type variable so that a new variable has the same constraints to the original but is no longer connected to the original. Read more

Asserts that the type variable has given upper bound.

Asserts that the type variable has given lower bound.

Asserts that the type variable has given tight bound.

Asserts that the first type variable is a subtype of the second.

Asserts that the first type variable is equal to the second.

Returns lower and upper bounds of given type variable as type flags.

Resolves a given type variable if there is a tight bound.

Generates a new fresh row variable.

Copies a row variable so that a new variable has the same fields to the original but is no longer connected to the original. Read more

Asserts that the first row variable is a subtype of the second. Read more

Asserts that the first row variable is equal to the second.

Asserts that the row variable contains given fields. If there is a matching field, the types should be equal to each other. Read more

Asserts that the row variable is no longer extensible.

Iterates over a list of field keys and corresponding types. The closure can stop the iteration by returning Err. The iteration order is unspecified but all keys will be unique (guaranteed by type system). Read more

Prints a type name for given nominal identifier to the formatter.

Prints a type name for given nominal set identifier to the formatter.

Returns true if given nominal instance type is a subtype of another nominal instance type.

Collects and returns a list of all known fields in the row variable.

Returns a pair of type flags that is an exact lower and upper bound for that type. Read more

Exactly resolves the type variable inside ty if possible. Read more