summaryrefslogtreecommitdiff
path: root/dhall/src/phase/resolve.rs
diff options
context:
space:
mode:
authorNadrieril Feneanar2019-08-07 23:12:47 +0200
committerGitHub2019-08-07 23:12:47 +0200
commit674fbdc33c788156f76d263b044dccc48c810870 (patch)
tree725eaa49a4f2236d44470279296969b66ba0bbc8 /dhall/src/phase/resolve.rs
parent8ec422f2319360f986950fcb9aae4bcf65a9c1e2 (diff)
parente81ab9a553bf82f20fa0b0344926258176a21dac (diff)
Merge pull request #95 from Nadrieril/catchup-spec
A lot more catching up on the spec
Diffstat (limited to 'dhall/src/phase/resolve.rs')
-rw-r--r--dhall/src/phase/resolve.rs19
1 files changed, 15 insertions, 4 deletions
diff --git a/dhall/src/phase/resolve.rs b/dhall/src/phase/resolve.rs
index c4d7e5f..abcee7e 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))
}
@@ -110,24 +110,35 @@ mod spec_tests {
macro_rules! import_success {
($name:ident, $path:expr) => {
- make_spec_test!(Import, Success, $name, &("success/".to_owned() + $path));
+ make_spec_test!(Import, Success, $name, &("../dhall-lang/tests/import/success/".to_owned() + $path));
};
}
// macro_rules! import_failure {
// ($name:ident, $path:expr) => {
- // make_spec_test!(Import, Failure, $name, &("failure/".to_owned() + $path));
+ // make_spec_test!(Import, Failure, $name, &("../dhall-lang/tests/import/failure/".to_owned() + $path));
// };
// }
// import_success!(success_alternativeEnvNatural, "alternativeEnvNatural");
// import_success!(success_alternativeEnvSimple, "alternativeEnvSimple");
+ // import_success!(success_alternativeHashMismatch, "alternativeHashMismatch");
// import_success!(success_alternativeNatural, "alternativeNatural");
+ // import_success!(success_alternativeParseError, "alternativeParseError");
+ // import_success!(success_alternativeTypeError, "alternativeTypeError");
+ // import_success!(success_asLocation, "asLocation");
// import_success!(success_asText, "asText");
+ // import_success!(success_customHeaders, "customHeaders");
import_success!(success_fieldOrder, "fieldOrder");
+ // note: this one needs special setup with env variables
+ // import_success!(success_hashFromCache, "hashFromCache");
+ // import_success!(success_headerForwarding, "headerForwarding");
+ // import_success!(success_nestedHash, "nestedHash");
+ // import_success!(success_noHeaderForwarding, "noHeaderForwarding");
// import_failure!(failure_alternativeEnv, "alternativeEnv");
// import_failure!(failure_alternativeEnvMissing, "alternativeEnvMissing");
// import_failure!(failure_cycle, "cycle");
+ // import_failure!(failure_hashMismatch, "hashMismatch");
// import_failure!(failure_missing, "missing");
// import_failure!(failure_referentiallyInsane, "referentiallyInsane");
}