pub struct Eval {}Trait Implementations§
Source§impl<'t> Reifiable for Eval
impl<'t> Reifiable for Eval
Source§fn ty() -> Ast
fn ty() -> Ast
The Unseemly type that corresponds to to the
Reifiable type.
This leaves abstract the type parameters of Self; invoke like Self::<Irr,Irr>::ty().
e.g. ∀ A. Pair<A int>
TODO: rename to generic_tySource§fn ty_name() -> Name
fn ty_name() -> Name
A name for that type, so that recursive types are okay.
Ignore the type parameters of
Self; invoke like Self::<Irr,Irr>::ty_name().
e.g. WithIntegerfn concrete_arguments() -> Option<Vec<Ast>>
Source§fn ty_invocation() -> Ast
fn ty_invocation() -> Ast
How to refer to this type, given an environment in which
ty_name() is defined to be ty().
Parameters will be concrete.
e.g. WithInteger<Float>
(Types using this type will use this, rather than ty)
Don’t override this.Source§impl WalkMode for Eval
impl WalkMode for Eval
Source§type Negated = Destructure
type Negated = Destructure
The negated version of this walk
Source§type AsPositive = Eval
type AsPositive = Eval
If this walk is positive,
Self; otherwise Self::NegatedSource§type AsNegative = Destructure
type AsNegative = Destructure
If this walk is positive,
Self::Negated; otherwise Selftype Err = ()
type D = Positive<Eval>
fn name() -> &'static str
fn get_walk_rule(f: &Form) -> WalkRule<Eval>
Source§fn automatically_extend_env() -> bool
fn automatically_extend_env() -> bool
Should the walker extend the environment based on imports?
Only
QQ and Expand have this as false; it’s not 100% clear what’s special about them.
(This evolved over time; it used to be false for Eval, because of lambda).
It seems like the thing about those modes is
(a) they don’t look at variables, so their environments are irrelevant,
(b) SameAs switching to the negated mode and doing get_res doesn’t work.
But what unites those two factors?fn walk_var(n: Name, cnc: &LazyWalkReses<Eval>) -> Result<Value, ()>
Source§fn underspecified(_: Name) -> Value
fn underspecified(_: Name) -> Value
Make up a special
Elt that is currently “underspecified”,
but which can be “unified” with some other Elt.
If that happens, all copies of this Elt will act like that other one. Read moreSource§fn needs__splice_healing() -> bool
fn needs__splice_healing() -> bool
Do we ever need to treat certain forms as though they were repetitions?
Source§fn perform_splice_positive(
_: &Form,
_: &LazyWalkReses<Self>,
) -> Result<Option<(Vec<Assoc<Name, Self::Elt>>, Ast)>, Self::Err>
fn perform_splice_positive( _: &Form, _: &LazyWalkReses<Self>, ) -> Result<Option<(Vec<Assoc<Name, Self::Elt>>, Ast)>, Self::Err>
A little like
get_walk_rule always returning Custom for positive splicingSource§fn perform_splice_negative(
_: &Form,
_: &LazyWalkReses<Self>,
_context_elts: &dyn Fn() -> Vec<Ast>,
) -> Result<Option<(Vec<Assoc<Name, Self::Elt>>, Ast)>, Self::Err>
fn perform_splice_negative( _: &Form, _: &LazyWalkReses<Self>, _context_elts: &dyn Fn() -> Vec<Ast>, ) -> Result<Option<(Vec<Assoc<Name, Self::Elt>>, Ast)>, Self::Err>
A little like
get_walk_rule always returning Custom for negative splicingSource§fn walk_quasi_literally(
expected: Ast,
cnc: &LazyWalkReses<Self>,
) -> Result<<<Self as WalkMode>::D as Dir>::Out, <Self as WalkMode>::Err>
fn walk_quasi_literally( expected: Ast, cnc: &LazyWalkReses<Self>, ) -> Result<<<Self as WalkMode>::D as Dir>::Out, <Self as WalkMode>::Err>
Walk over the structure of a node, not its meaning.
This could be because we’re inside a syntax-quote,
or it could be that we are a form (like written-out types or a literal)
that acts like a literal.
Children are not necessarily walked quasiliterally
– maybe they’re an interpolation of some kind –
instead, the mode (=quotation depth) and form together decide what to do.
If the walk is negative, the result might be MatchFailure
fn out_as_elt(o: <Self::D as Dir>::Out) -> Self::Elt
fn out_as_env(o: <Self::D as Dir>::Out) -> Assoc<Name, Self::Elt>
fn env_as_out(e: Assoc<Name, Self::Elt>) -> <Self::D as Dir>::Out
fn walk_atom( n: Name, cnc: &LazyWalkReses<Self>, ) -> Result<<<Self as WalkMode>::D as Dir>::Out, <Self as WalkMode>::Err>
impl Copy for Eval
Auto Trait Implementations§
impl Freeze for Eval
impl RefUnwindSafe for Eval
impl Send for Eval
impl Sync for Eval
impl Unpin for Eval
impl UnwindSafe for Eval
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.