From 7612dc713d5a1f108cfd6eb731435b090fbb8809 Mon Sep 17 00:00:00 2001 From: Krzysztof Gogolewski Date: Tue, 24 Jan 2023 06:33:29 +0100 Subject: 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. --- compiler/GHC/Iface/Env.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/GHC/Iface') 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 #-} -- cgit v1.2.1