This page requires javascript to work

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

pub struct TCS {
    pub env: Gamma,
    pub local_env: Gamma,
    pub gamma: Gamma,
    pub local_gamma: Gamma,
    pub meta_context: MetaContext<Val>,
}

Type-checking state.

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: MetaContext<Val>

Meta variable context. Always global.

Methods

impl TCS[src]

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 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]

fn unify_closure(self, a: &Closure, b: &Closure) -> TCM[src]

fn unify_case_split(self, a: &CaseSplit, b: &CaseSplit) -> TCM[src]

pub(crate) fn unify_variants(
    self,
    kind: VarRec,
    subset: &Variants,
    superset: &Variants
) -> 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 subtype(self, sub: &Val, sup: &Val) -> TCM[src]

Trait Implementations

impl Default for TCS[src]

impl Clone for TCS[src]

impl Debug for TCS[src]

Auto Trait Implementations

impl Send for TCS

impl Unpin for TCS

impl Sync for TCS

impl UnwindSafe for TCS

impl RefUnwindSafe for TCS

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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]