Enum moniker::FreeVar [−][src]
A free variable
Variants
User(N)
Names originating from user input
Gen(GenId, Option<N>)
A generated id with an optional string that may have come from user input (for debugging purposes)
Methods
impl<N> FreeVar<N>
[src]
impl<N> FreeVar<N>
pub fn user<T: Into<N>>(ident: T) -> FreeVar<N>
[src]
pub fn user<T: Into<N>>(ident: T) -> FreeVar<N>
Create a name from a human-readable string
pub fn freshen(self) -> FreeVar<N>
[src]
pub fn freshen(self) -> FreeVar<N>
pub fn ident(&self) -> Option<&N>
[src]
pub fn ident(&self) -> Option<&N>
Trait Implementations
impl<N> PartialEq<FreeVar<N>> for Binder<N> where
N: PartialEq,
[src]
impl<N> PartialEq<FreeVar<N>> for Binder<N> where
N: PartialEq,
fn eq(&self, other: &FreeVar<N>) -> bool
[src]
fn eq(&self, other: &FreeVar<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<N: PartialEq> BoundTerm<N> for FreeVar<N>
[src]
impl<N: PartialEq> BoundTerm<N> for FreeVar<N>
fn term_eq(&self, other: &FreeVar<N>) -> bool
[src]
fn term_eq(&self, other: &FreeVar<N>) -> bool
Alpha equivalence in a term context
fn close_term(&mut self, _: ScopeState, _: &[Binder<N>])
[src]
fn close_term(&mut self, _: ScopeState, _: &[Binder<N>])
fn open_term(&mut self, _: ScopeState, _: &[Binder<N>])
[src]
fn open_term(&mut self, _: ScopeState, _: &[Binder<N>])
fn visit_vars(
&self,
_: &mut impl FnMut(&Var<N>)
)
[src]
fn visit_vars(
&self,
_: &mut impl FnMut(&Var<N>)
)
fn visit_mut_vars(
&mut self,
_: &mut impl FnMut(&mut Var<N>)
)
[src]
fn visit_mut_vars(
&mut self,
_: &mut impl FnMut(&mut Var<N>)
)
fn free_vars(&self) -> HashSet<FreeVar<N>> where
N: Eq + Hash + Clone,
[src]
fn free_vars(&self) -> HashSet<FreeVar<N>> where
N: Eq + Hash + Clone,
Returns the set of free variables in this term
impl<N: Debug> Debug for FreeVar<N>
[src]
impl<N: Debug> Debug for FreeVar<N>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<N: Clone> Clone for FreeVar<N>
[src]
impl<N: Clone> Clone for FreeVar<N>
fn clone(&self) -> FreeVar<N>
[src]
fn clone(&self) -> FreeVar<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<N> From<GenId> for FreeVar<N>
[src]
impl<N> From<GenId> for FreeVar<N>
impl<N> PartialEq for FreeVar<N> where
N: PartialEq,
[src]
impl<N> PartialEq for FreeVar<N> where
N: PartialEq,
fn eq(&self, other: &FreeVar<N>) -> bool
[src]
fn eq(&self, other: &FreeVar<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<N> Eq for FreeVar<N> where
N: Eq,
[src]
impl<N> Eq for FreeVar<N> where
N: Eq,
impl<N> Hash for FreeVar<N> where
N: Hash,
[src]
impl<N> Hash for FreeVar<N> where
N: Hash,
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<N: Display> Display for FreeVar<N>
[src]
impl<N: Display> Display for FreeVar<N>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<N> PartialEq<FreeVar<N>> for Var<N> where
N: PartialEq,
[src]
impl<N> PartialEq<FreeVar<N>> for Var<N> where
N: PartialEq,