summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadrieril2020-02-16 19:15:29 +0000
committerNadrieril2020-02-16 19:49:44 +0000
commit80722b6da21a79cc2f00b2944244b28a04c5e169 (patch)
treedbf37bba7b8297d590160ceda5b845b8fff343d2
parent130de8cea49c848a06174c61c747d9414a5c71b7 (diff)
Oops, leftover #![allow(dead_code)]
-rw-r--r--dhall/src/semantics/hir.rs18
1 files changed, 1 insertions, 17 deletions
diff --git a/dhall/src/semantics/hir.rs b/dhall/src/semantics/hir.rs
index d0a8a96..b5db66f 100644
--- a/dhall/src/semantics/hir.rs
+++ b/dhall/src/semantics/hir.rs
@@ -1,6 +1,5 @@
-#![allow(dead_code)]
use crate::error::TypeError;
-use crate::semantics::{type_with, NameEnv, NzEnv, TyEnv, TyExpr, Type, Value};
+use crate::semantics::{type_with, NameEnv, NzEnv, TyEnv, TyExpr, Value};
use crate::syntax::{Expr, ExprKind, Span, V};
use crate::{NormalizedExpr, ToExprOptions};
@@ -79,21 +78,6 @@ impl Hir {
pub fn eval(&self, env: impl Into<NzEnv>) -> Value {
Value::new_thunk(env.into(), self.clone())
}
- /// Evaluate to a Type.
- pub fn eval_to_type(&self, env: impl Into<NzEnv>) -> Type {
- self.eval(env).into()
- }
- /// Eval a closed Hir (i.e. without free variables). It will actually get evaluated only as
- /// needed on demand.
- pub fn eval_closed_expr(&self) -> Value {
- self.eval(&NzEnv::new())
- }
- /// Eval a closed Hir fully and recursively (TODO: ish, need to fix under lambdas)
- pub fn rec_eval_closed_expr(&self) -> Value {
- let val = self.eval_closed_expr();
- val.normalize();
- val
- }
}
fn hir_to_expr(