Skip to content

Commit

Permalink
Make as_context less generic as it is only used for Expr Indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cypher1 committed May 14, 2024
1 parent 2e07302 commit 06cf402
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions llamada/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,6 @@ pub trait Expr: Sized {
value
}

fn as_context<'a, U>(&'a self, val: &'a U) -> WithContext<'a, Self, U> {
WithContext::new(
BoundExpr {
expr: self,
bind_depth: 0,
},
val,
)
}

fn to_church(&mut self, i: u32) -> Self::Index {
let startv = self.add(Term::Var(1));
let mut curr = startv;
Expand Down Expand Up @@ -295,6 +285,16 @@ pub trait Expr: Sized {
let root = &self.get(root);
visitor.on_term(self, root, meta)
}

fn as_context<'a>(&'a self, val: &'a Self::Index) -> WithContext<'a, Self, Self::Index> {
WithContext::new(
BoundExpr {
expr: self,
bind_depth: 0,
},
val,
)
}
}

struct NameIndex {
Expand Down

0 comments on commit 06cf402

Please sign in to comment.