summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/coreSyn/CoreUtils.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs
index dce7ef9aaf..3dfb52fcef 100644
--- a/compiler/coreSyn/CoreUtils.hs
+++ b/compiler/coreSyn/CoreUtils.hs
@@ -1130,8 +1130,8 @@ exprIsOk ok_app e
go _ (Type {}) = True
go _ (Coercion {}) = True
go n (Cast e _) = go n e
- go n (Case scrut _ _ alts) = foldl (&&) (ok scrut)
- [ go n rhs | (_,_,rhs) <- alts ]
+ go n (Case scrut _ _ alts) = ok scrut &&
+ and [ go n rhs | (_,_,rhs) <- alts ]
go n (Tick t e) | tickishCounts t = False
| otherwise = go n e
go n (Lam x e) | isRuntimeVar x = n==0 || go (n-1) e