[][src]Struct voile::check::monad::TCS

pub struct TCS {
    pub env: Gamma,
    pub local_env: Gamma,
    pub gamma: Gamma,
    pub local_gamma: Gamma,
    meta_context: Vec<MetaSolution>,
}

Fields

env: Gamma

Global value context.

local_env: Gamma

Local value context.

gamma: Gamma

Global typing context.

local_gamma: Gamma

Local typing context.

meta_context: Vec<MetaSolution>

Meta variable context. Always global.

Methods

impl TCS[src]

pub fn solve_meta(&mut self, meta_index: MI, solution: Val)[src]

Submit a solution to a meta variable to the context.

pub fn meta_solutions(&self) -> &[MetaSolution][src]

pub fn expand_with_fresh_meta(&mut self, meta_count: MI)[src]

Add many unsolved metas to the context.

pub fn fresh_meta(&mut self) -> Val[src]

Create a new valid but unsolved meta variable, used for generating fresh metas during elaboration.

pub fn take_meta(&mut self, meta_index: MI) -> Option<Val>[src]

pub fn local_type(&self, dbi: DBI) -> &ValInfo[src]

pub fn glob_type(&self, index: GI) -> &ValInfo[src]

pub fn local_val(&self, dbi: DBI) -> &ValInfo[src]

pub fn glob_val(&self, index: GI) -> &ValInfo[src]

pub fn local_is_type(&self, dbi: DBI) -> bool[src]

pub fn glob_is_type(&self, index: GI) -> bool[src]

pub fn pop_local(&mut self)[src]

pub fn glob_len(&self) -> usize[src]

pub fn local_len(&self) -> usize[src]

impl TCS[src]

So you can do some functional programming based on method call chains.

pub fn unify(self, a: &Val, b: &Val) -> TCM[src]

fn unify_neutral(self, a: &Neutral, b: &Neutral) -> TCM[src]

impl TCS[src]

pub fn check_decls(self, decls: Vec<AbsDecl>) -> TCM[src]

impl TCS[src]

So you can do some functional programming based on method call chains.

pub fn evaluate(self, abs: Abs) -> (ValInfo, Self)[src]

Should be invoked only during type-checking, produce uid-based terms (which can be further type-checked).

pub fn expand_global(self, expr: Val) -> (Val, TCS)[src]

impl TCS[src]

So you can do some functional programming based on method call chains.

pub fn check(self, expr: &Abs, expected_type: &Val) -> ValTCM[src]

pub fn infer(self, value: &Abs) -> ValTCM[src]

pub fn check_subtype(self, subtype: &Val, supertype: &Val) -> TCM[src]

pub fn check_type(self, expr: &Abs) -> ValTCM[src]

Trait Implementations

impl Clone for TCS[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for TCS[src]

impl Debug for TCS[src]

Auto Trait Implementations

impl Sync for TCS

impl Unpin for TCS

impl Send for TCS

impl UnwindSafe for TCS

impl RefUnwindSafe for TCS

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]