summaryrefslogtreecommitdiff
path: root/dhall/src/semantics/nze
diff options
context:
space:
mode:
authorNadrieril2020-02-09 11:23:59 +0000
committerNadrieril2020-02-09 20:13:23 +0000
commit27031b3739ff9f2043e64130a4c5699d0f9233e8 (patch)
treed645b3db409d9cb477ad73e80d419c7bfd717976 /dhall/src/semantics/nze
parent5870a46d5ab5810901198f03ed461d5c3bb5aa8a (diff)
Add Hir as untyped alternative to TyExpr
Diffstat (limited to 'dhall/src/semantics/nze')
-rw-r--r--dhall/src/semantics/nze/normalize.rs4
-rw-r--r--dhall/src/semantics/nze/value.rs10
2 files changed, 7 insertions, 7 deletions
diff --git a/dhall/src/semantics/nze/normalize.rs b/dhall/src/semantics/nze/normalize.rs
index c660fce..b5949f5 100644
--- a/dhall/src/semantics/nze/normalize.rs
+++ b/dhall/src/semantics/nze/normalize.rs
@@ -3,8 +3,8 @@ use std::collections::HashMap;
use crate::semantics::NzEnv;
use crate::semantics::{
- Binder, BuiltinClosure, Closure, TextLit, TyExpr, TyExprKind, Value,
- ValueKind,
+ Binder, BuiltinClosure, Closure, Hir, HirKind, TextLit, TyExpr, TyExprKind,
+ Value, ValueKind,
};
use crate::syntax::{BinOp, Builtin, ExprKind, InterpolatedTextContents};
use crate::Normalized;
diff --git a/dhall/src/semantics/nze/value.rs b/dhall/src/semantics/nze/value.rs
index 47c50a4..d4213bc 100644
--- a/dhall/src/semantics/nze/value.rs
+++ b/dhall/src/semantics/nze/value.rs
@@ -5,8 +5,8 @@ use crate::error::{TypeError, TypeMessage};
use crate::semantics::nze::lazy;
use crate::semantics::{
apply_any, normalize_one_layer, normalize_tyexpr_whnf, squash_textlit,
- type_with, Binder, BuiltinClosure, NzEnv, NzVar, TyEnv, TyExpr, TyExprKind,
- VarEnv,
+ type_with, Binder, BuiltinClosure, Hir, NzEnv, NzVar, TyEnv, TyExpr,
+ TyExprKind, VarEnv,
};
use crate::syntax::{
BinOp, Builtin, Const, ExprKind, Integer, InterpolatedTextContents, Label,
@@ -461,19 +461,19 @@ impl ValueKind {
}
impl Thunk {
- pub fn new(env: &NzEnv, body: TyExpr) -> Self {
+ fn new(env: &NzEnv, body: TyExpr) -> Self {
Thunk::Thunk {
env: env.clone(),
body,
}
}
- pub fn from_partial_expr(
+ fn from_partial_expr(
env: NzEnv,
expr: ExprKind<Value, Normalized>,
) -> Self {
Thunk::PartialExpr { env, expr }
}
- pub fn eval(self) -> ValueKind {
+ fn eval(self) -> ValueKind {
match self {
Thunk::Thunk { env, body } => normalize_tyexpr_whnf(&body, &env),
Thunk::PartialExpr { env, expr } => normalize_one_layer(expr, &env),