summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2019-07-07 09:13:13 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-07-09 22:59:26 -0400
commit897a59a5c0a08985ddccf00a4961cc2d080324e8 (patch)
tree537cd4e6a64c0d0916a9fba032cc99c3e8bde468
parentd7423f1096b5415928ba1d1d621e066ef4e5b641 (diff)
downloadhaskell-897a59a5c0a08985ddccf00a4961cc2d080324e8.tar.gz
Minor refactoring in CoreSimpl
When `join_ids` is empty `extendVarSetList existing_joins join_ids` is already no-op, so no need to check whether `join_ids` is empty or not before extending the joins set.
-rw-r--r--compiler/coreSyn/CoreLint.hs3
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index 91760c282b..a84f2fe029 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -2281,9 +2281,6 @@ markAllJoinsBadIf False m = m
addGoodJoins :: [Var] -> LintM a -> LintM a
addGoodJoins vars thing_inside
- | null join_ids
- = thing_inside
- | otherwise
= LintM $ \ env errs -> unLintM thing_inside (add_joins env) errs
where
add_joins env = env { le_joins = le_joins env `extendVarSetList` join_ids }