diff options
author | Nadrieril | 2020-12-07 14:32:06 +0000 |
---|---|---|
committer | Nadrieril | 2020-12-07 19:34:39 +0000 |
commit | c1fe26d45c831eec015ad5c015236fce1928613a (patch) | |
tree | bdba83d6854005d4de29fc38427967989367da6f /dhall/src/semantics/nze | |
parent | 8c5b3ff15f2125e9d731fc199e194e1993c36b37 (diff) |
Pass import results via the global context
Diffstat (limited to '')
-rw-r--r-- | dhall/src/semantics/nze/normalize.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dhall/src/semantics/nze/normalize.rs b/dhall/src/semantics/nze/normalize.rs index cce421d..d545750 100644 --- a/dhall/src/semantics/nze/normalize.rs +++ b/dhall/src/semantics/nze/normalize.rs @@ -155,7 +155,10 @@ pub fn normalize_one_layer<'cx>(expr: ExprKind<Nir<'cx>>) -> NirKind<'cx> { pub fn normalize_hir<'cx>(env: &NzEnv<'cx>, hir: &Hir<'cx>) -> NirKind<'cx> { match hir.kind() { HirKind::Var(var) => env.lookup_val(*var), - HirKind::Import(hir, _) => normalize_hir(env, hir), + HirKind::Import(import) => { + let typed = env.cx()[import].unwrap_result(); + normalize_hir(env, &typed.hir) + } HirKind::Expr(ExprKind::Lam(binder, annot, body)) => { let annot = annot.eval(env); NirKind::LamClosure { |