From 79bb6533ecb60cea40ff743b9651833b833eebde Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 25 Apr 2019 19:45:44 +0200 Subject: Respect import boundary in normalization --- dhall/src/normalize.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dhall') diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs index 35a6b23..2222f18 100644 --- a/dhall/src/normalize.rs +++ b/dhall/src/normalize.rs @@ -639,7 +639,9 @@ fn normalize_whnf(ctx: NormalizationContext, expr: InputSubExpr) -> WHNF { ExprF::Annot(x, _) => normalize_whnf(ctx, x.clone()), ExprF::Note(_, e) => normalize_whnf(ctx, e.clone()), // TODO: wasteful to retraverse everything - ExprF::Embed(e) => normalize_whnf(ctx, e.0.embed_absurd()), + ExprF::Embed(e) => { + normalize_whnf(NormalizationContext::new(), e.0.embed_absurd()) + } ExprF::Let(x, _, r, b) => { let r = normalize_whnf(ctx.clone(), r.clone()); normalize_whnf(ctx.insert(x, r), b.clone()) -- cgit v1.2.3