diff options
author | Fintan Halpenny | 2019-09-06 12:04:28 +0200 |
---|---|---|
committer | Fintan Halpenny | 2019-09-06 12:04:28 +0200 |
commit | 52c91e08db68e05f760ebfd465b84fe4107731df (patch) | |
tree | 9f17524482d5861f7bcda66d2c2de363ecf5fdc5 /dhall/src/phase/normalize.rs | |
parent | 4edaf0814868e604eed5cfd594ea3f448ca90678 (diff) | |
parent | 7d84b5eb6fdd82fe24139452e2427bfb8128f123 (diff) |
Merge remote-tracking branch 'origin/fintan/canonicalize' into fintan/canonicalize
Diffstat (limited to '')
-rw-r--r-- | dhall/src/phase/normalize.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dhall/src/phase/normalize.rs b/dhall/src/phase/normalize.rs index 3f6e99c..0992f74 100644 --- a/dhall/src/phase/normalize.rs +++ b/dhall/src/phase/normalize.rs @@ -290,7 +290,7 @@ pub(crate) fn apply_builtin( ) } }, - (ListFold, [_, l, _, cons, nil, r..]) => match &*l.as_whnf() { + (ListFold, [_, l, _, cons, nil, r @ ..]) => match &*l.as_whnf() { EmptyListLit(_) => Ret::ValueWithRemainingArgs(r, nil.clone()), NEListLit(xs) => { let mut v = nil.clone(); @@ -326,7 +326,8 @@ pub(crate) fn apply_builtin( ) } }, - (OptionalFold, [_, v, _, just, nothing, r..]) => match &*v.as_whnf() { + (OptionalFold, [_, v, _, just, nothing, r @ ..]) => match &*v.as_whnf() + { EmptyOptionalLit(_) => { Ret::ValueWithRemainingArgs(r, nothing.clone()) } @@ -356,7 +357,7 @@ pub(crate) fn apply_builtin( ), ), }, - (NaturalFold, [n, t, succ, zero, r..]) => match &*n.as_whnf() { + (NaturalFold, [n, t, succ, zero, r @ ..]) => match &*n.as_whnf() { NaturalLit(0) => Ret::ValueWithRemainingArgs(r, zero.clone()), NaturalLit(n) => { let fold = Value::from_builtin(NaturalFold) |