From ecff0ecd47bb38937fb43e60b8d78ea92e2af01c Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 21 Apr 2019 22:52:00 +0200 Subject: Prepare for interop between two contexts --- dhall/src/lib.rs | 1 + dhall/src/normalize.rs | 54 ++++++++++++++++++++++++++++++-------------- dhall/src/typecheck.rs | 61 +++++++++++++++++++++++++++++++++++++++++++------- dhall_core/src/core.rs | 34 +++++++++++++++++----------- 4 files changed, 112 insertions(+), 38 deletions(-) diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs index c85b962..3860890 100644 --- a/dhall/src/lib.rs +++ b/dhall/src/lib.rs @@ -4,6 +4,7 @@ #![feature(label_break_value)] #![feature(non_exhaustive)] #![feature(bind_by_move_pattern_guards)] +#![feature(try_trait)] #![cfg_attr(test, feature(custom_inner_attributes))] #![allow( clippy::type_complexity, diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs index 7aa8686..c17ed78 100644 --- a/dhall/src/normalize.rs +++ b/dhall/src/normalize.rs @@ -229,7 +229,21 @@ fn apply_builtin(b: Builtin, args: Vec) -> WHNF { #[derive(Debug, Clone)] enum EnvItem { Expr(WHNF), - Skip(usize), + Skip(V