Pre: add ConjoiningClauses::bind_value.
This commit is contained in:
parent
13e27c83e2
commit
899e5d0971
1 changed files with 6 additions and 0 deletions
|
@ -330,6 +330,12 @@ impl ConjoiningClauses {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ConjoiningClauses {
|
impl ConjoiningClauses {
|
||||||
|
/// Be careful with this. It'll overwrite existing bindings.
|
||||||
|
pub fn bind_value(&mut self, var: &Variable, value: TypedValue) {
|
||||||
|
self.constrain_var_to_type(var.clone(), value.value_type());
|
||||||
|
self.value_bindings.insert(var.clone(), value);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn bound_value(&self, var: &Variable) -> Option<TypedValue> {
|
pub fn bound_value(&self, var: &Variable) -> Option<TypedValue> {
|
||||||
self.value_bindings.get(var).cloned()
|
self.value_bindings.get(var).cloned()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue