summaryrefslogtreecommitdiff
path: root/dhall/src/semantics/tck
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dhall/src/semantics/tck/env.rs2
-rw-r--r--dhall/src/semantics/tck/tyexpr.rs5
2 files changed, 4 insertions, 3 deletions
diff --git a/dhall/src/semantics/tck/env.rs b/dhall/src/semantics/tck/env.rs
index d4cc37d..812ca7a 100644
--- a/dhall/src/semantics/tck/env.rs
+++ b/dhall/src/semantics/tck/env.rs
@@ -118,7 +118,7 @@ impl TyEnv {
}
pub fn lookup(&self, var: &V) -> Option<(TyExprKind, Type)> {
let var = self.names.unlabel_var(var)?;
- let ty = self.items.lookup_val(&var).get_type().unwrap();
+ let ty = self.items.lookup_ty(&var);
Some((TyExprKind::Var(var), ty))
}
}
diff --git a/dhall/src/semantics/tck/tyexpr.rs b/dhall/src/semantics/tck/tyexpr.rs
index 4b88048..1a048f9 100644
--- a/dhall/src/semantics/tck/tyexpr.rs
+++ b/dhall/src/semantics/tck/tyexpr.rs
@@ -1,5 +1,4 @@
use crate::error::{TypeError, TypeMessage};
-use crate::semantics::normalize_tyexpr_whnf;
use crate::semantics::{rc, NameEnv, NzEnv, TyEnv, Value};
use crate::syntax::{ExprKind, Span, V};
use crate::Normalized;
@@ -83,7 +82,9 @@ impl TyExpr {
}
/// Eval a closed TyExpr fully and recursively;
pub fn rec_eval_closed_expr(&self) -> Value {
- normalize_tyexpr_whnf(self, &NzEnv::new())
+ let mut val = self.eval_closed_expr();
+ val.normalize_mut();
+ val
}
}