[−][src]Enum minitt::ast::GenericTelescope
Generic definition for two kinds of telescopes.
Value
can be specialized with Value
or NormalExpression
.
Implementing Eq
because of NormalExpression
Variants
$()$, Empty telescope.
UpDec(Rc<Self>, Declaration)
$\rho, p=D$,
In Mini-TT, checked declarations are put here. However, it's not possible to store a
recursive declaration as an Expression
(which is a member of Declaration
) here.
The problem is quite complicated and can be reproduced by checking out 0.1.5 revision and
type-check this code (Type
was U
and Sum
was sum
at that time):
rec nat : U = sum { Zero 1 | Suc nat }; -- Inductive definition of nat let one : nat = Zero 0; let two : nat = Suc one; -- Unresolved reference
$\rho, p=v$, Usually a local variable, introduced in your telescope
Implementations
impl GenericTelescope<Value>
[src]
pub fn resolve(&self, name: &str) -> Result<Value, String>
[src]
$$
\textnormal{If} \ x \ \textnormal{is\ in}\ p, \\
\begin{alignedat}{2}
& (\rho, p=v)(x) &&= \textsf{proj}^p_x(v) \\
& (\rho, p:A=M)(x) &&= \textsf{proj}^p_x(⟦ M ⟧ \rho) \\
& (\rho, \textsf{rec}\ p:A=M)(x) &&=
\textsf{proj}^p_x(⟦ M ⟧ (\rho, \textsf{rec}\ p:A=M))
\end{alignedat} \\
\textnormal{If} \ x \ \textnormal{is\ not\ in}\ p, \\
\begin{alignedat}{2}
& (\rho, p=v)(x) &&= \rho(x) \\
& (\rho, D)(x) &&= \rho(x) \\
\end{alignedat}
$$
getRho
in Mini-TT.
Trait Implementations
impl<Value: Clone> Clone for GenericTelescope<Value>
[src]
fn clone(&self) -> GenericTelescope<Value>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Value: Debug + Clone> Debug for GenericTelescope<Value>
[src]
impl<Value: Clone + Display> Display for GenericTelescope<Value>
[src]
Actually it's for NeutralTelescope
impl<Value: Eq + Clone> Eq for GenericTelescope<Value>
[src]
impl<Value: PartialEq + Clone> PartialEq<GenericTelescope<Value>> for GenericTelescope<Value>
[src]
fn eq(&self, other: &GenericTelescope<Value>) -> bool
[src]
fn ne(&self, other: &GenericTelescope<Value>) -> bool
[src]
impl<'_> ReadBack for &'_ GenericTelescope<Value>
[src]
type NormalForm = NormalTelescope
Corresponding normal form type for the read-backable structures.
This is needed because Rust does not support Higher-Kinded Types :( Read more
fn read_back(self, index: u32) -> Self::NormalForm
[src]
$$
\begin{alignedat}{2}
& \textsf{R}_i (\rho,p=v) &&= \textsf{R}_i\ \rho,p=\textsf{R}_i\ v \\
& \textsf{R}_i (\rho,D) &&= \textsf{R}_i\ \rho,D \\
& \textsf{R}_i () &&= ()
\end{alignedat}
$$
rbRho
in Mini-TT.
fn read_back_please(self) -> Self::NormalForm
[src]
fn normal(
index: u32,
me: Self,
other: Self
) -> (Self::NormalForm, Self::NormalForm)
[src]
index: u32,
me: Self,
other: Self
) -> (Self::NormalForm, Self::NormalForm)
impl<Value: Clone> StructuralEq for GenericTelescope<Value>
[src]
impl<Value: Clone> StructuralPartialEq for GenericTelescope<Value>
[src]
Auto Trait Implementations
impl<Value> !RefUnwindSafe for GenericTelescope<Value>
impl<Value> !Send for GenericTelescope<Value>
impl<Value> !Sync for GenericTelescope<Value>
impl<Value> Unpin for GenericTelescope<Value> where
Value: Unpin,
Value: Unpin,
impl<Value> !UnwindSafe for GenericTelescope<Value>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,