summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2023-01-24 06:33:29 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-02-04 04:13:34 -0500
commit7612dc713d5a1f108cfd6eb731435b090fbb8809 (patch)
tree9b1db77ecc3f966edf7572b38c0652dc082ecd18 /compiler/GHC/Iface
parent25537dfda4ae59bc0321b229ca9ff924ef64d1fa (diff)
downloadhaskell-7612dc713d5a1f108cfd6eb731435b090fbb8809.tar.gz
Minor refactor
* Introduce refactorDupsOn f = refactorDups (comparing f) * Make mkBigTupleCase and coreCaseTuple monadic. Every call to those functions was preceded by calling newUniqueSupply. * Use mkUserLocalOrCoVar, which is equivalent to combining mkLocalIdOrCoVar with mkInternalName.
Diffstat (limited to 'compiler/GHC/Iface')
-rw-r--r--compiler/GHC/Iface/Env.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Iface/Env.hs b/compiler/GHC/Iface/Env.hs
index eeef41ecc1..a67fdfe334 100644
--- a/compiler/GHC/Iface/Env.hs
+++ b/compiler/GHC/Iface/Env.hs
@@ -262,9 +262,9 @@ newIfaceName occ
newIfaceNames :: [OccName] -> IfL [Name]
newIfaceNames occs
- = do { uniqs <- newUniqueSupply
+ = do { uniqs <- getUniquesM
; return [ mkInternalName uniq occ noSrcSpan
- | (occ,uniq) <- occs `zip` uniqsFromSupply uniqs] }
+ | (occ,uniq) <- occs `zip` uniqs] }
trace_if :: Logger -> SDoc -> IO ()
{-# INLINE trace_if #-}