[−][src]Struct kontroli::Signature
Map from symbols to their associated types and rewrite rules.
Furthermore, set whether convertibility should be checked modulo eta.
Fields
types: HashMap<Sym, Tm, FnvBuildHasher>
rules: HashMap<Sym, Vec<Rule<String, Application<Sym, Pat>, Tm>>, FnvBuildHasher>
eta: bool
Implementations
impl<Sym: Clone + Eq + Hash, Pat: Clone, Tm: Clone> Signature<Sym, Pat, Tm>
[src]
pub fn new() -> Self
[src]
Construct an empty signature without eta modularity.
let sig = Signature::new(); assert!(sig.eta == false);
pub fn add_rule(
&mut self,
rule: Rule<String, Application<Sym, Pat>, Tm>
) -> Result<(), Error>
[src]
&mut self,
rule: Rule<String, Application<Sym, Pat>, Tm>
) -> Result<(), Error>
Add a rewrite rule to an existing symbol.
pub fn add_rules<I>(&mut self, rules: I) -> Result<(), Error> where
I: Iterator<Item = Rule<String, Application<Sym, Pat>, Tm>>,
[src]
I: Iterator<Item = Rule<String, Application<Sym, Pat>, Tm>>,
Add several rewrite rules.
pub fn insert(&mut self, sym: Sym, typing: Typing<Tm>) -> Result<(), Error>
[src]
Introduce a new symbol with given typing.
Trait Implementations
impl<Sym: Clone, Pat: Clone, Tm: Clone> Clone for Signature<Sym, Pat, Tm>
[src]
impl<Sym, Pat, Tm> Default for Signature<Sym, Pat, Tm>
[src]
Auto Trait Implementations
impl<Sym, Pat, Tm> RefUnwindSafe for Signature<Sym, Pat, Tm> where
Pat: RefUnwindSafe,
Sym: RefUnwindSafe,
Tm: RefUnwindSafe,
Pat: RefUnwindSafe,
Sym: RefUnwindSafe,
Tm: RefUnwindSafe,
impl<Sym, Pat, Tm> Send for Signature<Sym, Pat, Tm> where
Pat: Send + Sync,
Sym: Send + Sync,
Tm: Send + Sync,
Pat: Send + Sync,
Sym: Send + Sync,
Tm: Send + Sync,
impl<Sym, Pat, Tm> Sync for Signature<Sym, Pat, Tm> where
Pat: Send + Sync,
Sym: Send + Sync,
Tm: Send + Sync,
Pat: Send + Sync,
Sym: Send + Sync,
Tm: Send + Sync,
impl<Sym, Pat, Tm> Unpin for Signature<Sym, Pat, Tm> where
Pat: Unpin,
Sym: Unpin,
Tm: Unpin,
Pat: Unpin,
Sym: Unpin,
Tm: Unpin,
impl<Sym, Pat, Tm> UnwindSafe for Signature<Sym, Pat, Tm> where
Pat: RefUnwindSafe + UnwindSafe,
Sym: RefUnwindSafe + UnwindSafe,
Tm: RefUnwindSafe + UnwindSafe,
Pat: RefUnwindSafe + UnwindSafe,
Sym: RefUnwindSafe + UnwindSafe,
Tm: RefUnwindSafe + UnwindSafe,
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> Same<T> for T
type Output = T
Should always be Self
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, 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>,