[Git][ghc/ghc][wip/T22404] Wibble

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Thu Jul 27 08:56:27 UTC 2023



Simon Peyton Jones pushed to branch wip/T22404 at Glasgow Haskell Compiler / GHC


Commits:
0233775d by Simon Peyton Jones at 2023-07-27T09:56:17+01:00
Wibble

- - - - -


1 changed file:

- compiler/GHC/Core/Opt/OccurAnal.hs


Changes:

=====================================
compiler/GHC/Core/Opt/OccurAnal.hs
=====================================
@@ -2936,7 +2936,9 @@ isRhsEnv (OccEnv { occ_encl = cxt }) = case cxt of
 addInScopeList :: OccEnv -> [Var]
                -> (OccEnv -> WithUsageDetails a) -> WithUsageDetails a
 {-# INLINE addInScopeList #-}
-addInScopeList env bndrs = addInScope env bndrs
+addInScopeList env bndrs thing_inside
+ | null bndrs = thing_inside env
+ | otherwise  = addInScope env bndrs thing_inside
 
 addInScopeOne :: OccEnv -> Id
                -> (OccEnv -> WithUsageDetails a) -> WithUsageDetails a
@@ -2955,7 +2957,7 @@ addInScope env bndrs thing_inside
   , WUD uds res <- thing_inside env
   = WUD (delBndrsFromUDs bndrs uds) res
 
-  | otherwise
+addInScope env bndrs thing_inside
   = WUD uds' res
   where
     bndr_set           = mkVarSet bndrs



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0233775d7b07fe8bcd7ffd8b92d492b96e9b0e90
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/20230727/73d3ec51/attachment-0001.html>


More information about the ghc-commits mailing list