Enum malk_core::TermKind [] [src]

pub enum TermKind {
    Omega,
    Level,
    LevelZero,
    LevelSucc {
        pred: Term,
    },
    LevelMax {
        a: Term,
        b: Term,
    },
    Type {
        level: Term,
    },
    Var(usize),
    FuncType {
        arg_type: Term,
        res_type: Term,
    },
    FuncTerm {
        body: Term,
    },
    FuncApp {
        func: Term,
        arg: Term,
        arg_type: Term,
        res_type: Term,
    },
    UnitType,
    UnitTerm,
    PairType {
        head_type: Term,
        tail_type: Term,
    },
    PairTerm {
        head: Term,
        tail: Term,
    },
    PairElim {
        pair: Term,
        res: Term,
        head_type: Term,
        tail_type: Term,
    },
    NeverType,
    NeverElim {
        never: Term,
    },
    EitherType {
        left_type: Term,
        right_type: Term,
    },
    EitherLeft {
        val: Term,
    },
    EitherRight {
        val: Term,
    },
    EitherElim {
        arg: Term,
        arg_type: Term,
        res_type: Term,
        on_left: Term,
        on_right: Term,
    },
    IdentType {
        term_type: Term,
        a: Term,
        b: Term,
    },
    IdentTerm,
    IdentElim {
        term_type: Term,
        a: Term,
        b: Term,
        path: Term,
        context: Term,
        proof: Term,
    },
    RecType {
        rec_type: Term,
    },
    RecTerm {
        rec_term: Term,
    },
    WorldType,
    WorldTerm,
    WorldElim {
        intrinsic: &'static str,
        world_in: Term,
        arg: Term,
        expr: Term,
    },
    UmType,
    UmTerm {
        val: u64,
    },
    UmSucc {
        pred: Term,
    },
    UmElim {
        arg: Term,
        res_type: Term,
        on_zero: Term,
        on_succ: Term,
    },
}

The different kinds of term that can appear in the AST.

Variants

The type of all types, and levels, which does not itself have a type.

The type of universe levels.

Universe level zero.

Universe level (pred + 1).

Fields of LevelSucc

Universe level max(a, b)

Fields of LevelMax

The type of types, indexed by levels.

Fields of Type

A variable.

The type of functions. (ie pi types)

Fields of FuncType

Functions.

Fields of FuncTerm

Function application.

Fields of FuncApp

The unit type.

The unit term.

A dependent pair type (ie. sigma type)

Fields of PairType

A pair term.

Fields of PairTerm

Dependent pair elimination.

Fields of PairElim

The canonical empty type, (ie. bottom).

Never type elimintator

Fields of NeverElim

Disjoint union, sum type.

Fields of EitherType

Inject left.

Fields of EitherLeft

Inject right.

Fields of EitherRight

Case match on a sum type.

Fields of EitherElim

The type of identifications (a == b)

Fields of IdentType

Reflexivity,

J-elimination for identities.

Fields of IdentElim

A recursive type. rec_type is under a context where Var(0) refers back to the type.

Fields of RecType

A recursive term. Used to mark rec_term as a member of a recursive type.

Fields of RecTerm

The type for interacting with the outside world through intrinsics.

The term used to represent a fully-normalised world ready to perform IO on.

Performs an intrinsic call.

Fields of WorldElim

The name of the intrinsic

The world argument.

The argument type that the intrinsic expects.

The result of the expression. Evaluated with the intrinsic result at Var(1) and another World at Var(0).

Unsigned, memory-sized integers.

An intger literal.

Fields of UmTerm

An integer literal equal to 1 + pred

Fields of UmSucc

Case match on a Um.

Fields of UmElim

Trait Implementations

impl Debug for TermKind
[src]

Formats the value using the given formatter.

impl Clone for TermKind
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for TermKind
[src]

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

This method tests for !=.