diff options
author | Nadrieril | 2019-08-04 13:00:56 +0200 |
---|---|---|
committer | Nadrieril | 2019-08-06 21:40:24 +0200 |
commit | 696efe66336a268054c475fab9fe6505bdfc7b60 (patch) | |
tree | 353f9c5edd080e22455dba775fcfc5c6afc0f1fa /dhall | |
parent | 278cd9be7d93bc1eeecde05c964da5b097668016 (diff) |
Add some new tests and implement import alternatives
Diffstat (limited to 'dhall')
-rw-r--r-- | dhall/src/error/mod.rs | 2 | ||||
-rw-r--r-- | dhall/src/phase/resolve.rs | 4 | ||||
-rw-r--r-- | dhall/src/phase/typecheck.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/dhall/src/error/mod.rs b/dhall/src/error/mod.rs index aed6ccd..a0ee30a 100644 --- a/dhall/src/error/mod.rs +++ b/dhall/src/error/mod.rs @@ -86,7 +86,7 @@ pub(crate) enum TypeMessage { RecordTypeMergeRequiresRecordType(Type), RecordTypeMismatch(Type, Type, Type, Type), UnionTypeDuplicateField, - Unimplemented, + // Unimplemented, } impl TypeError { diff --git a/dhall/src/phase/resolve.rs b/dhall/src/phase/resolve.rs index f1329aa..0609694 100644 --- a/dhall/src/phase/resolve.rs +++ b/dhall/src/phase/resolve.rs @@ -86,7 +86,7 @@ fn do_resolve_expr( } } }; - let expr = expr.traverse_embed(resolve)?; + let expr = expr.traverse_resolve(resolve)?; Ok(Resolved(expr)) } @@ -100,7 +100,7 @@ pub fn skip_resolve_expr( let resolve = |import: &Import| -> Result<Normalized, ImportError> { Err(ImportError::UnexpectedImport(import.clone())) }; - let expr = expr.traverse_embed(resolve)?; + let expr = expr.traverse_resolve(resolve)?; Ok(Resolved(expr)) } diff --git a/dhall/src/phase/typecheck.rs b/dhall/src/phase/typecheck.rs index 8551503..753d25e 100644 --- a/dhall/src/phase/typecheck.rs +++ b/dhall/src/phase/typecheck.rs @@ -823,7 +823,7 @@ fn type_last_layer( RightBiasedRecordMerge => unreachable!(), RecursiveRecordMerge => unreachable!(), RecursiveRecordTypeMerge => unreachable!(), - _ => return Err(mkerr(Unimplemented)), + ImportAlt => unreachable!("There should remain no import alternatives in a resolved expression"), })?; ensure_equal!( |