diff options
Diffstat (limited to 'dhall/src/semantics/core/value.rs')
-rw-r--r-- | dhall/src/semantics/core/value.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dhall/src/semantics/core/value.rs b/dhall/src/semantics/core/value.rs index 3798053..3e3bfe1 100644 --- a/dhall/src/semantics/core/value.rs +++ b/dhall/src/semantics/core/value.rs @@ -10,7 +10,7 @@ use crate::semantics::phase::typecheck::{builtin_to_value, const_to_value}; use crate::semantics::phase::{ Normalized, NormalizedExpr, ToExprOptions, Typed, }; -use crate::semantics::{TyExpr, TyExprKind, Type}; +use crate::semantics::{TyExpr, TyExprKind}; use crate::syntax::{ BinOp, Builtin, Const, ExprKind, Integer, InterpolatedTextContents, Label, NaiveDouble, Natural, Span, @@ -235,6 +235,10 @@ impl Value { v.check_type(t); e.subst_shift(&AlphaVar::default(), &v) } + ValueKind::PiClosure { annot, closure, .. } => { + v.check_type(annot); + closure.apply(v.clone()) + } _ => unreachable!("Internal type error"), }; Value::from_kind_and_type_whnf( |