summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2019-04-25 19:45:44 +0200
committerNadrieril2019-04-25 19:45:44 +0200
commit79bb6533ecb60cea40ff743b9651833b833eebde (patch)
tree6658c6f37757d0fe80281f259c22466c02b5b76f /dhall
parent429ebf996efec32ecac7f14ad5d688dce506a4ce (diff)
Respect import boundary in normalization
Diffstat (limited to 'dhall')
-rw-r--r--dhall/src/normalize.rs4
1 files changed, 3 insertions, 1 deletions
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())