summaryrefslogtreecommitdiff
path: root/dhall_normalize/src
diff options
context:
space:
mode:
Diffstat (limited to 'dhall_normalize/src')
-rw-r--r--dhall_normalize/src/normalize.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/dhall_normalize/src/normalize.rs b/dhall_normalize/src/normalize.rs
index 0e46ee0..fb8079a 100644
--- a/dhall_normalize/src/normalize.rs
+++ b/dhall_normalize/src/normalize.rs
@@ -153,9 +153,15 @@ where
BinOp(BoolOr, box BoolLit(x), box BoolLit(y)) => BoolLit(x || y),
BinOp(BoolEQ, box BoolLit(x), box BoolLit(y)) => BoolLit(x == y),
BinOp(BoolNE, box BoolLit(x), box BoolLit(y)) => BoolLit(x != y),
- BinOp(NaturalPlus, box NaturalLit(x), box NaturalLit(y)) => NaturalLit(x + y),
- BinOp(NaturalTimes, box NaturalLit(x), box NaturalLit(y)) => NaturalLit(x * y),
- BinOp(TextAppend, box TextLit(x), box TextLit(y)) => TextLit(x + &y),
+ BinOp(NaturalPlus, box NaturalLit(x), box NaturalLit(y)) => {
+ NaturalLit(x + y)
+ }
+ BinOp(NaturalTimes, box NaturalLit(x), box NaturalLit(y)) => {
+ NaturalLit(x * y)
+ }
+ BinOp(TextAppend, box TextLit(x), box TextLit(y)) => {
+ TextLit(x + &y)
+ }
BinOp(ListAppend, box ListLit(t1, xs), box ListLit(t2, ys)) => {
// Drop type annotation if the result is nonempty
let t = if xs.len() == 0 && ys.len() == 0 {