diff options
author | Nadrieril | 2020-12-07 17:48:20 +0000 |
---|---|---|
committer | Nadrieril | 2020-12-07 19:35:13 +0000 |
commit | 7a392b07166c089979e69d4c8a68da3298964c28 (patch) | |
tree | 3a861160e7d4b379904dbed891bb684de0ad26bc /dhall/src/semantics/nze | |
parent | f478bc16a3b8414770d84dd87f3e46b869d31750 (diff) |
Defer name errors to typechecking
We aren't supposed to inspect anything before alternatives are chosen
Diffstat (limited to 'dhall/src/semantics/nze')
-rw-r--r-- | dhall/src/semantics/nze/normalize.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/dhall/src/semantics/nze/normalize.rs b/dhall/src/semantics/nze/normalize.rs index d545750..0a09a80 100644 --- a/dhall/src/semantics/nze/normalize.rs +++ b/dhall/src/semantics/nze/normalize.rs @@ -154,6 +154,7 @@ pub fn normalize_one_layer<'cx>(expr: ExprKind<Nir<'cx>>) -> NirKind<'cx> { /// Normalize Hir into WHNF pub fn normalize_hir<'cx>(env: &NzEnv<'cx>, hir: &Hir<'cx>) -> NirKind<'cx> { match hir.kind() { + HirKind::MissingVar(..) => unreachable!("ruled out by typechecking"), HirKind::Var(var) => env.lookup_val(*var), HirKind::Import(import) => { let typed = env.cx()[import].unwrap_result(); |