summaryrefslogtreecommitdiff
path: root/dhall/src/semantics/nze/nzexpr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src/semantics/nze/nzexpr.rs')
-rw-r--r--dhall/src/semantics/nze/nzexpr.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/dhall/src/semantics/nze/nzexpr.rs b/dhall/src/semantics/nze/nzexpr.rs
index 3a5a1f9..1256ea0 100644
--- a/dhall/src/semantics/nze/nzexpr.rs
+++ b/dhall/src/semantics/nze/nzexpr.rs
@@ -82,10 +82,16 @@ pub(crate) struct QuoteEnv {
}
// Reverse-debruijn index: counts number of binders from the bottom of the stack.
-#[derive(Debug, Clone, Copy)]
+#[derive(Debug, Clone, Copy, Eq)]
pub(crate) struct NzVar {
idx: usize,
}
+// TODO: temporary hopefully
+impl std::cmp::PartialEq for NzVar {
+ fn eq(&self, _other: &Self) -> bool {
+ true
+ }
+}
impl TyEnv {
pub fn new() -> Self {
@@ -219,6 +225,12 @@ impl QuoteEnv {
}
}
+impl NzVar {
+ pub fn new(idx: usize) -> Self {
+ NzVar { idx }
+ }
+}
+
impl TyExpr {
pub fn new(kind: TyExprKind, ty: Option<Type>) -> Self {
TyExpr {