diff options
author | Nadrieril | 2020-01-28 19:34:11 +0000 |
---|---|---|
committer | Nadrieril | 2020-01-28 19:34:11 +0000 |
commit | 084e81956e99bc759012be7c171f4095c2e59d22 (patch) | |
tree | e20dcd8df063eec31f2feb6ef1638469f4ee11af /dhall/src/semantics/nze | |
parent | 8ced62a2cdde95c4d67298289756c12f53656df0 (diff) |
Thread env through nztion to fix Foo/build closures
Diffstat (limited to 'dhall/src/semantics/nze')
-rw-r--r-- | dhall/src/semantics/nze/nzexpr.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dhall/src/semantics/nze/nzexpr.rs b/dhall/src/semantics/nze/nzexpr.rs index 6559082..92ba8fd 100644 --- a/dhall/src/semantics/nze/nzexpr.rs +++ b/dhall/src/semantics/nze/nzexpr.rs @@ -141,6 +141,11 @@ impl NameEnv { pub fn new() -> Self { NameEnv { names: Vec::new() } } + pub fn from_binders(names: impl Iterator<Item = Binder>) -> Self { + NameEnv { + names: names.collect(), + } + } pub fn as_quoteenv(&self) -> QuoteEnv { QuoteEnv { size: self.names.len(), |