summaryrefslogtreecommitdiff
path: root/dhall/src/typecheck.rs
diff options
context:
space:
mode:
authorNadrieril2019-04-30 01:50:49 +0200
committerNadrieril2019-04-30 01:50:49 +0200
commit8e8a446e1b2ca85633f0368aefc5f8e31196c7c8 (patch)
treebde648df6866478f6c6558a6db5b8d29284ebbe7 /dhall/src/typecheck.rs
parent6bb8e618f66df4a955d800d49b3b6863aabd5b41 (diff)
Store thunks behind Rc<RefCell<_>> to ensure minimal computation
Diffstat (limited to '')
-rw-r--r--dhall/src/typecheck.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/dhall/src/typecheck.rs b/dhall/src/typecheck.rs
index 38da955..d924f41 100644
--- a/dhall/src/typecheck.rs
+++ b/dhall/src/typecheck.rs
@@ -152,10 +152,7 @@ impl TypeThunk {
TypeThunk::Type(t) => Ok(t),
TypeThunk::Thunk(th) => {
// TODO: rule out statically
- mktype(
- ctx,
- th.normalize_whnf().normalize_to_expr().embed_absurd(),
- )
+ mktype(ctx, th.as_whnf().normalize_to_expr().embed_absurd())
}
}
}