From 897a59a5c0a08985ddccf00a4961cc2d080324e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= <omeragacan@gmail.com>
Date: Sun, 7 Jul 2019 09:13:13 +0300
Subject: [PATCH] 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.
---
 compiler/coreSyn/CoreLint.hs | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index 91760c282b6a..a84f2fe02932 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 }
-- 
GitLab