[Git][ghc/ghc][wip/simplifier-tweaks] Unused variable wibbles

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Tue Jan 23 14:36:16 UTC 2024



Simon Peyton Jones pushed to branch wip/simplifier-tweaks at Glasgow Haskell Compiler / GHC


Commits:
eaedf9a5 by Simon Peyton Jones at 2024-01-23T14:35:58+00:00
Unused variable wibbles

- - - - -


1 changed file:

- compiler/GHC/Core/Unfold.hs


Changes:

=====================================
compiler/GHC/Core/Unfold.hs
=====================================
@@ -41,10 +41,9 @@ import GHC.Core
 import GHC.Core.Utils
 import GHC.Core.DataCon
 import GHC.Core.Type
-import GHC.Core.FVs( exprsSomeFreeVars )
 
 import GHC.Types.Id
-import GHC.Types.Var.Set( mkVarSet, isEmptyVarSet, elemVarSet )
+import GHC.Types.Var.Set( mkVarSet, elemVarSet )
 import GHC.Types.Literal
 import GHC.Types.Id.Info
 import GHC.Types.RepType ( isZeroBitTy )
@@ -446,6 +445,9 @@ uncondInlineJoin bndrs body
   = if   isDataConId v
     then isEmptyVarSet (exprsSomeFreeVars is_free_id args)
     else True
+  where
+    bndr_set = mkVarSet bndrs
+    is_free_id v = not (v `elemVarSet` bndr_set)
 -}
   | (Var v, args) <- collectArgs body
   , all exprIsTrivial args
@@ -455,9 +457,6 @@ uncondInlineJoin bndrs body
   | otherwise
   = False
 
-  where
-    bndr_set = mkVarSet bndrs
-    is_free_id v = not (v `elemVarSet` bndr_set)
 
 sizeExpr :: UnfoldingOpts
          -> Int             -- Bomb out if it gets bigger than this



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eaedf9a55de5f487b9a21a8de5af37a55d0f65a6

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eaedf9a55de5f487b9a21a8de5af37a55d0f65a6
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240123/79658b2d/attachment-0001.html>


More information about the ghc-commits mailing list