diff options
author | Ben Gamari <ben@smart-cactus.org> | 2016-05-10 11:57:02 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-05-12 15:16:07 +0200 |
commit | ba46dd060f959e3c96a74c1546946c3f8bf84dd0 (patch) | |
tree | faa22032f485d0222bb102645971dd82e76236c2 /compiler/coreSyn/CoreUtils.hs | |
parent | e996e85f003e783fc8f9af0da653cdd0058d9646 (diff) | |
download | haskell-wip/foldl.tar.gz |
Use strict foldlswip/foldl
Diffstat (limited to 'compiler/coreSyn/CoreUtils.hs')
-rw-r--r-- | compiler/coreSyn/CoreUtils.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs index 887c313f71..cc1d4c7e0f 100644 --- a/compiler/coreSyn/CoreUtils.hs +++ b/compiler/coreSyn/CoreUtils.hs @@ -964,8 +964,8 @@ exprIsWorkFree e = go 0 e go _ (Type {}) = True go _ (Coercion {}) = True go n (Cast e _) = go n e - go n (Case scrut _ _ alts) = foldl (&&) (exprIsWorkFree scrut) - [ go n rhs | (_,_,rhs) <- alts ] + go n (Case scrut _ _ alts) = exprIsWorkFree scrut + && and [ go n rhs | (_,_,rhs) <- alts ] -- See Note [Case expressions are work-free] go _ (Let {}) = False go n (Var v) = isCheapApp v n |