diff options
Diffstat (limited to 'dhall/src/semantics/core/var.rs')
-rw-r--r-- | dhall/src/semantics/core/var.rs | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/dhall/src/semantics/core/var.rs b/dhall/src/semantics/core/var.rs index 3458489..264b81d 100644 --- a/dhall/src/semantics/core/var.rs +++ b/dhall/src/semantics/core/var.rs @@ -1,16 +1,4 @@ -use crate::syntax::{Label, V}; - -/// Stores an alpha-normalized variable. -#[derive(Clone, Copy, Eq)] -pub struct AlphaVar { - alpha: V<()>, -} -// TODO: temporary hopefully -impl std::cmp::PartialEq for AlphaVar { - fn eq(&self, _other: &Self) -> bool { - true - } -} +use crate::syntax::Label; // Exactly like a Label, but equality returns always true. // This is so that ValueKind equality is exactly alpha-equivalence. @@ -19,18 +7,6 @@ pub struct Binder { name: Label, } -impl AlphaVar { - pub(crate) fn new(alpha: V<()>) -> Self { - AlphaVar { alpha } - } - pub(crate) fn default() -> Self { - AlphaVar { alpha: V((), 0) } - } - pub(crate) fn idx(&self) -> usize { - self.alpha.idx() - } -} - impl Binder { pub(crate) fn new(name: Label) -> Self { Binder { name } @@ -47,12 +23,6 @@ impl std::cmp::PartialEq for Binder { } } -impl std::fmt::Debug for AlphaVar { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "AlphaVar({})", self.alpha.1) - } -} - impl std::fmt::Debug for Binder { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "Binder({})", &self.name) |