summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
Diffstat (limited to 'dhall')
-rw-r--r--dhall/build.rs12
-rw-r--r--dhall/src/normalize.rs14
2 files changed, 22 insertions, 4 deletions
diff --git a/dhall/build.rs b/dhall/build.rs
index cc62a97..f7a31c0 100644
--- a/dhall/build.rs
+++ b/dhall/build.rs
@@ -36,12 +36,20 @@ fn main() -> std::io::Result<()> {
if name == "largeExpression" {
continue;
}
- writeln!(file, r#"make_spec_test!(ParserSuccess, spec_parser_success_{}, "{}");"#, name, path)?;
+ writeln!(
+ file,
+ r#"make_spec_test!(ParserSuccess, spec_parser_success_{}, "{}");"#,
+ name, path
+ )?;
}
for path in dhall_files_in_dir(&tests_dir.join("parser/failure/")) {
let name = path.replace("/", "_");
- writeln!(file, r#"make_spec_test!(ParserFailure, spec_parser_failure_{}, "{}");"#, name, path)?;
+ writeln!(
+ file,
+ r#"make_spec_test!(ParserFailure, spec_parser_failure_{}, "{}");"#,
+ name, path
+ )?;
}
Ok(())
diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs
index 1bf4b6a..a3a2318 100644
--- a/dhall/src/normalize.rs
+++ b/dhall/src/normalize.rs
@@ -104,7 +104,12 @@ where
let a0 = Rc::clone(a0);
let a1 = shift(1, &V("a".into(), 0), &a0);
// TODO: use Embed to avoid reevaluating g
- break dhall_expr!(g (List a0) (λ(a : a0) -> λ(as : List a1) -> [ a ] # as) ([] : List a0));
+ break dhall_expr!(
+ g
+ (List a0)
+ (λ(a : a0) -> λ(as : List a1) -> [ a ] # as)
+ ([] : List a0)
+ );
}
}
(OptionalBuild, _, [a0, g, ..]) => {
@@ -119,7 +124,12 @@ where
};
let a0 = Rc::clone(a0);
// TODO: use Embed to avoid reevaluating g
- break dhall_expr!((g (Optional a0)) (λ(x: a0) -> Some x) (None a0));
+ break dhall_expr!(
+ g
+ (Optional a0)
+ (λ(x: a0) -> Some x)
+ (None a0)
+ );
}
}
(ListFold, Some(EmptyListLit(_)), [_, _, _, _, nil, ..]) => {