diff options
Diffstat (limited to '')
-rw-r--r-- | dhall/src/semantics/core/var.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/dhall/src/semantics/core/var.rs b/dhall/src/semantics/core/var.rs index b336c66..0aa86d5 100644 --- a/dhall/src/semantics/core/var.rs +++ b/dhall/src/semantics/core/var.rs @@ -1,7 +1,7 @@ use crate::syntax::{Label, V}; /// Stores an alpha-normalized variable. -#[derive(Clone, Eq)] +#[derive(Clone, Copy, PartialEq, Eq)] pub struct AlphaVar { alpha: V<()>, } @@ -36,28 +36,12 @@ impl Binder { pub(crate) fn new(name: Label) -> Self { Binder { name } } - pub(crate) fn to_label_maybe_alpha(&self, alpha: bool) -> Label { - if alpha { - "_".into() - } else { - self.to_label() - } - } pub(crate) fn to_label(&self) -> Label { self.clone().into() } - pub(crate) fn name(&self) -> &Label { - &self.name - } } /// Equality up to alpha-equivalence -impl std::cmp::PartialEq for AlphaVar { - fn eq(&self, other: &Self) -> bool { - self.alpha == other.alpha - } -} -/// Equality up to alpha-equivalence impl std::cmp::PartialEq for Binder { fn eq(&self, _other: &Self) -> bool { true |