From 8e8a446e1b2ca85633f0368aefc5f8e31196c7c8 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 30 Apr 2019 01:50:49 +0200 Subject: Store thunks behind Rc> to ensure minimal computation --- dhall/src/typecheck.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'dhall/src/typecheck.rs') 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()) } } } -- cgit v1.2.3