summaryrefslogtreecommitdiff
path: root/dhall/src/semantics/tck/tir.rs
diff options
context:
space:
mode:
authorNadrieril2020-02-17 18:12:44 +0000
committerNadrieril2020-02-17 18:12:44 +0000
commit2f65c02a995f6b6d4c755197fc074782f6bb100d (patch)
treeebe6373d5344b90f1a3e77b1a772e1ccadc6be81 /dhall/src/semantics/tck/tir.rs
parent73571249f9bcf8efe84708a4a9f8665af62e44f0 (diff)
Rename TyExpr to Tir
Diffstat (limited to '')
-rw-r--r--dhall/src/semantics/tck/tir.rs (renamed from dhall/src/semantics/tck/tyexpr.rs)13
1 files changed, 7 insertions, 6 deletions
diff --git a/dhall/src/semantics/tck/tyexpr.rs b/dhall/src/semantics/tck/tir.rs
index f6591ba..800d1b7 100644
--- a/dhall/src/semantics/tck/tyexpr.rs
+++ b/dhall/src/semantics/tck/tir.rs
@@ -15,8 +15,9 @@ pub(crate) struct Type {
}
/// A hir expression plus its inferred type.
+/// Stands for "Typed intermediate representation"
#[derive(Debug, Clone)]
-pub(crate) struct TyExpr {
+pub(crate) struct Tir {
hir: Hir,
ty: Type,
}
@@ -105,9 +106,9 @@ impl Type {
}
}
-impl TyExpr {
+impl Tir {
pub fn from_hir(hir: &Hir, ty: Type) -> Self {
- TyExpr {
+ Tir {
hir: hir.clone(),
ty,
}
@@ -134,7 +135,7 @@ impl TyExpr {
self.as_hir().to_expr_tyenv(env)
}
- /// Eval the TyExpr. It will actually get evaluated only as needed on demand.
+ /// Eval the Tir. It will actually get evaluated only as needed on demand.
pub fn eval(&self, env: impl Into<NzEnv>) -> Value {
self.as_hir().eval(env.into())
}
@@ -172,12 +173,12 @@ impl TyExpr {
.to_universe(),
))
}
- /// Eval a closed TyExpr (i.e. without free variables). It will actually get evaluated only as
+ /// Eval a closed Tir (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 TyExpr fully and recursively;
+ /// Eval a closed Tir fully and recursively;
pub fn rec_eval_closed_expr(&self) -> Value {
let val = self.eval_closed_expr();
val.normalize();