feat: partial func (WIP)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use tracing::{event, span, Level};
|
||||
use derive_more::Unwrap;
|
||||
use ecow::EcoString;
|
||||
use hashbrown::{HashMap, HashSet};
|
||||
@@ -170,14 +171,14 @@ impl DowngradeContext {
|
||||
|
||||
pub fn new_dep(&mut self, this: Index, dep: Dep) -> Result<()> {
|
||||
#[cfg(debug_assertions)]
|
||||
println!("{this:?} => {dep:?}");
|
||||
event!(Level::DEBUG, "{this:?} => {dep:?}");
|
||||
match this {
|
||||
Index::Thunk(idx) => {
|
||||
if dep == Dep::Thunk(idx) && !matches!(self.thunks[idx].0, Ir::List(_)) {
|
||||
/* if dep == Dep::Thunk(idx) && !matches!(self.thunks[idx].0, Ir::List(_)) {
|
||||
return Err(Error::DowngradeError(
|
||||
"infinite recursion encountered".into(),
|
||||
));
|
||||
}
|
||||
} */
|
||||
self.thunk_deps[idx].insert(dep.unwrap_thunk())
|
||||
}
|
||||
Index::Func(idx) => self.func_deps[idx].insert(dep),
|
||||
|
||||
Reference in New Issue
Block a user