From 7dd2d64073b662acccb39601591c754279385308 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 30 Jan 2020 11:24:48 +0000 Subject: No need for the current env to tck Foo/build closures --- dhall/src/semantics/builtins.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'dhall/src/semantics/builtins.rs') diff --git a/dhall/src/semantics/builtins.rs b/dhall/src/semantics/builtins.rs index 2efa266..0b105c7 100644 --- a/dhall/src/semantics/builtins.rs +++ b/dhall/src/semantics/builtins.rs @@ -224,11 +224,7 @@ pub(crate) fn apply_builtin( Value(Value), DoneAsIs, } - let make_closure = |e| { - type_with(&env.to_alpha_tyenv(), &e) - .unwrap() - .normalize_whnf(&env) - }; + let make_closure = |e| typecheck(&e).unwrap().normalize_whnf(&env); let ret = match (b, args.as_slice()) { (OptionalNone, [t]) => Ret::ValueKind(EmptyOptionalLit(t.clone())), -- cgit v1.2.3