summaryrefslogtreecommitdiff
path: root/dhall/src/semantics/core/var.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src/semantics/core/var.rs')
-rw-r--r--dhall/src/semantics/core/var.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/dhall/src/semantics/core/var.rs b/dhall/src/semantics/core/var.rs
index 4245e40..d21fa80 100644
--- a/dhall/src/semantics/core/var.rs
+++ b/dhall/src/semantics/core/var.rs
@@ -65,13 +65,6 @@ pub(crate) trait Subst<S> {
}
impl AlphaVar {
- pub(crate) fn to_var(&self, alpha: bool) -> V<Label> {
- if alpha {
- V("_".into(), self.alpha.1)
- } else {
- self.normal.clone()
- }
- }
pub(crate) fn binder(&self) -> Binder {
Binder::new(self.normal.0.clone(), self.binder_uid)
}
@@ -81,6 +74,9 @@ impl Binder {
pub(crate) fn new(name: Label, uid: BinderUID) -> Self {
Binder { name, uid }
}
+ pub(crate) fn name(&self) -> &Label {
+ &self.name
+ }
pub(crate) fn same_binder(&self, other: &Binder) -> bool {
self.uid == other.uid
}