summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2019-05-07 16:18:16 +0200
committerNadrieril2019-05-07 16:18:16 +0200
commit1a97f8957539e9192bdb9176a8eafd4da101a857 (patch)
tree2b96f480502a517104e9ffe0adc4f546d77f8039 /dhall
parent5b4887f7ea3262bd0e280be4bb889fd67f708edf (diff)
Small mistake
Diffstat (limited to '')
-rw-r--r--dhall/src/core/value.rs2
-rw-r--r--dhall/src/phase/normalize.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/dhall/src/core/value.rs b/dhall/src/core/value.rs
index 354c360..28fcb3e 100644
--- a/dhall/src/core/value.rs
+++ b/dhall/src/core/value.rs
@@ -40,7 +40,7 @@ pub(crate) struct AlphaLabel(Label);
#[derive(Debug, Clone, PartialEq, Eq)]
pub(crate) enum Value {
/// Closures
- Lam(AlphaLabel, Thunk, Thunk),
+ Lam(AlphaLabel, TypeThunk, Thunk),
Pi(AlphaLabel, TypeThunk, TypeThunk),
// Invariant: the evaluation must not be able to progress further.
AppliedBuiltin(Builtin, Vec<Thunk>),
diff --git a/dhall/src/phase/normalize.rs b/dhall/src/phase/normalize.rs
index a48c299..5dfcfb6 100644
--- a/dhall/src/phase/normalize.rs
+++ b/dhall/src/phase/normalize.rs
@@ -339,7 +339,9 @@ pub(crate) fn normalize_one_layer(expr: ExprF<Thunk, Label, X>) -> Value {
ExprF::Embed(_) => unreachable!(),
ExprF::Var(_) => unreachable!(),
ExprF::Annot(x, _) => RetThunk(x),
- ExprF::Lam(x, t, e) => RetValue(Lam(x.into(), t, e)),
+ ExprF::Lam(x, t, e) => {
+ RetValue(Lam(x.into(), TypeThunk::from_thunk(t), e))
+ }
ExprF::Pi(x, t, e) => RetValue(Pi(
x.into(),
TypeThunk::from_thunk(t),