diff options
-rw-r--r-- | compiler/GHC/ByteCode/InfoTable.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Cmm/ContFlowOpt.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Cmm/DebugBlock.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Cmm/Graph.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Cmm/Sink.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Cmm/Utils.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/CmmToAsm.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/CmmToAsm/Dwarf.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/CmmToAsm/Reg/Graph.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/CmmToAsm/Reg/Liveness.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Core/FVs.hs | 10 | ||||
-rw-r--r-- | compiler/GHC/Core/Opt/FloatOut.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Core/Opt/OccurAnal.hs | 8 | ||||
-rw-r--r-- | compiler/GHC/Core/Opt/Pipeline.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Core/Opt/SetLevels.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Core/Type.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Core/UsageEnv.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/CoreToStg.hs | 2 |
19 files changed, 33 insertions, 33 deletions
diff --git a/compiler/GHC/ByteCode/InfoTable.hs b/compiler/GHC/ByteCode/InfoTable.hs index 4a11ee4b56..84b97a85ba 100644 --- a/compiler/GHC/ByteCode/InfoTable.hs +++ b/compiler/GHC/ByteCode/InfoTable.hs @@ -37,7 +37,7 @@ import GHC.Utils.Panic -- Make info tables for the data decls in this module mkITbls :: Interp -> Profile -> [TyCon] -> IO ItblEnv mkITbls interp profile tcs = - foldr plusNameEnv emptyNameEnv <$> + foldr plusNameEnv emptyNameEnv <$> -- mapM mkITbl (filter isDataTyCon tcs) where mkITbl :: TyCon -> IO ItblEnv diff --git a/compiler/GHC/Cmm/ContFlowOpt.hs b/compiler/GHC/Cmm/ContFlowOpt.hs index 350f94c818..2fc6def08c 100644 --- a/compiler/GHC/Cmm/ContFlowOpt.hs +++ b/compiler/GHC/Cmm/ContFlowOpt.hs @@ -255,7 +255,7 @@ blockConcat splitting_procs g@CmmGraph { g_entry = entry_id } , shortcut_map , if oldSuccs == newSuccs then backEdges - else foldr incPreds (foldr decPreds backEdges oldSuccs) newSuccs ) + else foldr incPreds (foldr decPreds backEdges oldSuccs) newSuccs ) -- -- Otherwise don't do anything | otherwise @@ -417,9 +417,9 @@ mkCmmCondBranch p t f l = -- Build a map from a block to its set of predecessors. predMap :: [CmmBlock] -> LabelMap Int -predMap blocks = foldr add_preds mapEmpty blocks +predMap blocks = foldr add_preds mapEmpty blocks -- where - add_preds block env = foldr add env (successors block) + add_preds block env = foldr add env (successors block) -- where add lbl env = mapInsertWith (+) lbl 1 env -- Removing unreachable blocks diff --git a/compiler/GHC/Cmm/DebugBlock.hs b/compiler/GHC/Cmm/DebugBlock.hs index 06c1f9aace..a365356d61 100644 --- a/compiler/GHC/Cmm/DebugBlock.hs +++ b/compiler/GHC/Cmm/DebugBlock.hs @@ -209,7 +209,7 @@ cmmDebugGen modLoc decls = map (blocksForScope Nothing) topScopes -- control flow order (so ticks have a chance to be sorted in the -- right order). blockContexts :: RawCmmGroup -> Map.Map CmmTickScope [BlockContext] -blockContexts decls = Map.map reverse $ foldr walkProc Map.empty decls +blockContexts decls = Map.map reverse $ foldr walkProc Map.empty decls -- where walkProc :: RawCmmDecl -> Map.Map CmmTickScope [BlockContext] -> Map.Map CmmTickScope [BlockContext] diff --git a/compiler/GHC/Cmm/Graph.hs b/compiler/GHC/Cmm/Graph.hs index d59658e2af..7affd4aab5 100644 --- a/compiler/GHC/Cmm/Graph.hs +++ b/compiler/GHC/Cmm/Graph.hs @@ -78,7 +78,7 @@ flattenCmmAGraph id (stmts_t, tscope) = CmmGraph { g_entry = id, g_graph = GMany NothingO body NothingO } where - body = foldr addBlock emptyBody $ flatten id stmts_t tscope [] + body = foldr addBlock emptyBody $ flatten id stmts_t tscope [] -- -- -- flatten: given an entry label and a CmmAGraph, make a list of blocks. diff --git a/compiler/GHC/Cmm/Sink.hs b/compiler/GHC/Cmm/Sink.hs index 84f9317f21..78ee79520c 100644 --- a/compiler/GHC/Cmm/Sink.hs +++ b/compiler/GHC/Cmm/Sink.hs @@ -846,7 +846,7 @@ memConflicts _ _ = True exprMem :: Platform -> CmmExpr -> AbsMem exprMem platform (CmmLoad addr w _) = bothMems (loadAddr platform addr (typeWidth w)) (exprMem platform addr) -exprMem platform (CmmMachOp _ es) = foldr bothMems NoMem (map (exprMem platform) es) +exprMem platform (CmmMachOp _ es) = foldr bothMems NoMem (map (exprMem platform) es) -- exprMem _ _ = NoMem loadAddr :: Platform -> CmmExpr -> Width -> AbsMem diff --git a/compiler/GHC/Cmm/Utils.hs b/compiler/GHC/Cmm/Utils.hs index 2060be5bda..17b3902673 100644 --- a/compiler/GHC/Cmm/Utils.hs +++ b/compiler/GHC/Cmm/Utils.hs @@ -576,7 +576,7 @@ toBlockListEntryFirstFalseFallthrough g ofBlockList :: BlockId -> [CmmBlock] -> CmmGraph ofBlockList entry blocks = CmmGraph { g_entry = entry , g_graph = GMany NothingO body NothingO } - where body = foldr addBlock emptyBody blocks + where body = foldr addBlock emptyBody blocks -- bodyToBlockList :: Body CmmNode -> [CmmBlock] bodyToBlockList body = mapElems body diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs index 29ec7559f6..ef7e1ecc1c 100644 --- a/compiler/GHC/CmmToAsm.hs +++ b/compiler/GHC/CmmToAsm.hs @@ -511,7 +511,7 @@ cmmNativeGen logger modLoc ncgImpl us fileIds dbgMap cmm count then do -- the regs usable for allocation let (alloc_regs :: UniqFM RegClass (UniqSet RealReg)) - = foldr (\r -> plusUFM_C unionUniqSets + = foldr (\r -> plusUFM_C unionUniqSets -- $ unitUFM (targetClassOfRealReg platform r) (unitUniqSet r)) emptyUFM $ allocatableRegs ncgImpl diff --git a/compiler/GHC/CmmToAsm/Dwarf.hs b/compiler/GHC/CmmToAsm/Dwarf.hs index 503aca0b3e..10720aef7d 100644 --- a/compiler/GHC/CmmToAsm/Dwarf.hs +++ b/compiler/GHC/CmmToAsm/Dwarf.hs @@ -130,7 +130,7 @@ compileUnitFooter platform unitU = -- Note [Splitting DebugBlocks] for details. debugSplitProcs :: [DebugBlock] -> [DebugBlock] debugSplitProcs b = concat $ H.mapElems $ mergeMaps $ map (split Nothing) b - where mergeMaps = foldr (H.mapUnionWithKey (const (++))) H.mapEmpty + where mergeMaps = foldr (H.mapUnionWithKey (const (++))) H.mapEmpty -- split :: Maybe DebugBlock -> DebugBlock -> H.LabelMap [DebugBlock] split parent blk = H.mapInsert prc [blk'] nested where prc = dblProcedure blk diff --git a/compiler/GHC/CmmToAsm/Reg/Graph.hs b/compiler/GHC/CmmToAsm/Reg/Graph.hs index 9cbe12caee..9a2fb94e49 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph.hs @@ -319,7 +319,7 @@ buildGraph code -- Add the reg-reg conflicts to the graph. let conflictBag = unionManyBags conflictList let graph_conflict - = foldr graphAddConflictSet Color.initGraph conflictBag + = foldr graphAddConflictSet Color.initGraph conflictBag -- -- Add the coalescences edges to the graph. let moveBag @@ -327,7 +327,7 @@ buildGraph code (unionManyBags moveList) let graph_coalesce - = foldr graphAddCoalesce graph_conflict moveBag + = foldr graphAddCoalesce graph_conflict moveBag -- return graph_coalesce @@ -345,7 +345,7 @@ graphAddConflictSet set graph graph1 = Color.addConflicts virtuals classOfVirtualReg graph - graph2 = foldr (\(r1, r2) -> Color.addExclusion r1 classOfVirtualReg r2) + graph2 = foldr (\(r1, r2) -> Color.addExclusion r1 classOfVirtualReg r2) -- graph1 [ (vr, rr) | RegVirtual vr <- nonDetEltsUniqSet set diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs b/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs index 60757544be..6ff10eb56c 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs @@ -215,7 +215,7 @@ cleanForward platform blockId assoc acc (li : instrs) -- Writing to a reg changes its value. | LiveInstr instr _ <- li , RU _ written <- regUsageOfInstr platform instr - = let assoc' = foldr delAssoc assoc (map SReg $ nub written) + = let assoc' = foldr delAssoc assoc (map SReg $ nub written) -- in cleanForward platform blockId assoc' (li : acc) instrs diff --git a/compiler/GHC/CmmToAsm/Reg/Liveness.hs b/compiler/GHC/CmmToAsm/Reg/Liveness.hs index ad8190270f..710fc9f013 100644 --- a/compiler/GHC/CmmToAsm/Reg/Liveness.hs +++ b/compiler/GHC/CmmToAsm/Reg/Liveness.hs @@ -492,7 +492,7 @@ slurpReloadCoalesce live getSlotMap blockId = do map <- get let slotMaps = fromMaybe [] (lookupUFM map blockId) - return $ foldr mergeSlotMaps emptyUFM slotMaps + return $ foldr mergeSlotMaps emptyUFM slotMaps -- mergeSlotMaps :: SlotMap Reg -> SlotMap Reg -> SlotMap Reg mergeSlotMaps map1 map2 diff --git a/compiler/GHC/Core/FVs.hs b/compiler/GHC/Core/FVs.hs index e4663ad075..7281ae05c6 100644 --- a/compiler/GHC/Core/FVs.hs +++ b/compiler/GHC/Core/FVs.hs @@ -329,7 +329,7 @@ exprOrphNames e -- | Finds the free /external/ names of several expressions: see 'exprOrphNames' for details exprsOrphNames :: [CoreExpr] -> NameSet -exprsOrphNames es = foldr (unionNameSet . exprOrphNames) emptyNameSet es +exprsOrphNames es = foldr (unionNameSet . exprOrphNames) emptyNameSet es -- {- ********************************************************************** @@ -367,7 +367,7 @@ orphNamesOfType (CastTy ty co) = orphNamesOfType ty `unionNameSet` orphNam orphNamesOfType (CoercionTy co) = orphNamesOfCo co orphNamesOfThings :: (a -> NameSet) -> [a] -> NameSet -orphNamesOfThings f = foldr (unionNameSet . f) emptyNameSet +orphNamesOfThings f = foldr (unionNameSet . f) emptyNameSet -- orphNamesOfTypes :: [Type] -> NameSet orphNamesOfTypes = orphNamesOfThings orphNamesOfType @@ -417,7 +417,7 @@ orphNamesOfAxiom axiom orphNamesOfCoAxBranches :: Branches br -> NameSet orphNamesOfCoAxBranches - = foldr (unionNameSet . orphNamesOfCoAxBranch) emptyNameSet . fromBranches + = foldr (unionNameSet . orphNamesOfCoAxBranch) emptyNameSet . fromBranches -- orphNamesOfCoAxBranch :: CoAxBranch -> NameSet orphNamesOfCoAxBranch (CoAxBranch { cab_lhs = lhs, cab_rhs = rhs }) @@ -578,7 +578,7 @@ unionFVss :: [DVarSet] -> DVarSet unionFVss = unionDVarSets delBindersFV :: [Var] -> DVarSet -> DVarSet -delBindersFV bs fvs = foldr delBinderFV fvs bs +delBindersFV bs fvs = foldr delBinderFV fvs bs -- delBinderFV :: Var -> DVarSet -> DVarSet -- This way round, so we can do it multiple times using foldr @@ -705,7 +705,7 @@ freeVarsBind (Rec binds) body_fvs where (binders, rhss) = unzip binds rhss2 = map freeVars rhss - rhs_body_fvs = foldr (unionFVs . freeVarsOf) body_fvs rhss2 + rhs_body_fvs = foldr (unionFVs . freeVarsOf) body_fvs rhss2 -- binders_fvs = fvDVarSet $ mapUnionFV bndrRuleAndUnfoldingFVs binders -- See Note [The FVAnn invariant] all_fvs = rhs_body_fvs `unionFVs` binders_fvs diff --git a/compiler/GHC/Core/Opt/FloatOut.hs b/compiler/GHC/Core/Opt/FloatOut.hs index 362cab0056..bc800e5f6d 100644 --- a/compiler/GHC/Core/Opt/FloatOut.hs +++ b/compiler/GHC/Core/Opt/FloatOut.hs @@ -446,7 +446,7 @@ floatExpr (Let bind body) FloatMe dest_lvl -> case (floatBind bind) of { (fsb, bind_floats, binds') -> case (floatExpr body) of { (fse, body_floats, body') -> - let new_bind_floats = foldr plusFloats emptyFloats + let new_bind_floats = foldr plusFloats emptyFloats -- (map (unitLetFloat dest_lvl) binds') in ( add_stats fsb fse , bind_floats `plusFloats` new_bind_floats @@ -639,10 +639,10 @@ addTopFloatPairs float_bag prs add (Rec prs1) prs2 = prs1 ++ prs2 flattenMajor :: MajorEnv -> Bag FloatBind -flattenMajor = M.foldr (unionBags . flattenMinor) emptyBag +flattenMajor = M.foldr (unionBags . flattenMinor) emptyBag -- flattenMinor :: MinorEnv -> Bag FloatBind -flattenMinor = M.foldr unionBags emptyBag +flattenMinor = M.foldr unionBags emptyBag -- emptyFloats :: FloatBinds emptyFloats = FB emptyBag emptyBag M.empty diff --git a/compiler/GHC/Core/Opt/OccurAnal.hs b/compiler/GHC/Core/Opt/OccurAnal.hs index a4218df867..6235581f9b 100644 --- a/compiler/GHC/Core/Opt/OccurAnal.hs +++ b/compiler/GHC/Core/Opt/OccurAnal.hs @@ -117,7 +117,7 @@ occurAnalysePgm this_mod active_unf active_rule imp_rules binds -- We treat such RULES as extra rules for 'f' -- See Note [Preventing loops due to imported functions rules] imp_rule_edges :: ImpRuleEdges - imp_rule_edges = foldr (plusVarEnv_C (++)) emptyVarEnv + imp_rule_edges = foldr (plusVarEnv_C (++)) emptyVarEnv -- [ mapVarEnv (const [(act,rhs_fvs)]) $ getUniqSet $ exprsFreeIds args `delVarSetList` bndrs | Rule { ru_act = act, ru_bndrs = bndrs @@ -160,14 +160,14 @@ impRulesScopeUsage :: [(Activation,VarSet)] -> UsageDetails -- Variable mentioned in RHS of an IMP-RULE for the bndr, -- whether active or not impRulesScopeUsage imp_rules_info - = foldr add emptyDetails imp_rules_info + = foldr add emptyDetails imp_rules_info -- where add (_,vs) usage = addManyOccs usage vs impRulesActiveFvs :: (Activation -> Bool) -> VarSet -> [(Activation,VarSet)] -> VarSet impRulesActiveFvs is_active bndr_set vs - = foldr add emptyVarSet vs `intersectVarSet` bndr_set + = foldr add emptyVarSet vs `intersectVarSet` bndr_set -- where add (act,vs) acc | is_active act = vs `unionVarSet` acc | otherwise = acc @@ -792,7 +792,7 @@ occAnalNonRecBind !env lvl imp_rule_edges bndr rhs body_usage -- that g is (since the RULE might turn g into h), so -- we make g mention h. - rule_uds = foldr add_rule_uds imp_rule_uds rules_w_uds + rule_uds = foldr add_rule_uds imp_rule_uds rules_w_uds -- add_rule_uds (_, l, r) uds = l `andUDs` r `andUDs` uds ---------- diff --git a/compiler/GHC/Core/Opt/Pipeline.hs b/compiler/GHC/Core/Opt/Pipeline.hs index b8ac982021..1bb15b159f 100644 --- a/compiler/GHC/Core/Opt/Pipeline.hs +++ b/compiler/GHC/Core/Opt/Pipeline.hs @@ -790,7 +790,7 @@ simplifyPgmIO cfg@(CoreDoSimplifyOpts max_iterations mode) where -- Remember the counts_so_far are reversed totalise :: [SimplCount] -> SimplCount - totalise = foldr (\c acc -> acc `plusSimplCount` c) + totalise = foldr (\c acc -> acc `plusSimplCount` c) -- (zeroSimplCount dflags) ------------------- diff --git a/compiler/GHC/Core/Opt/SetLevels.hs b/compiler/GHC/Core/Opt/SetLevels.hs index a8a99ba42f..2c8f48fe99 100644 --- a/compiler/GHC/Core/Opt/SetLevels.hs +++ b/compiler/GHC/Core/Opt/SetLevels.hs @@ -1255,7 +1255,7 @@ lvlBind env (AnnRec pairs) `delDVarSetList` bndrs - ty_fvs = foldr (unionVarSet . tyCoVarsOfType . idType) emptyVarSet bndrs + ty_fvs = foldr (unionVarSet . tyCoVarsOfType . idType) emptyVarSet bndrs -- dest_lvl = destLevel env bind_fvs ty_fvs is_fun is_bot is_join abs_vars = abstractVars dest_lvl env bind_fvs diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs index 166a56cabb..08143651f4 100644 --- a/compiler/GHC/Core/Type.hs +++ b/compiler/GHC/Core/Type.hs @@ -3472,8 +3472,8 @@ tyConsOfType ty -- this last case can happen from the tyConsOfType used from -- checkTauTvUpdate - go_s tys = foldr (unionUniqSets . go) emptyUniqSet tys - go_cos cos = foldr (unionUniqSets . go_co) emptyUniqSet cos + go_s tys = foldr (unionUniqSets . go) emptyUniqSet tys -- + go_cos cos = foldr (unionUniqSets . go_co) emptyUniqSet cos -- go_tc tc = unitUniqSet tc go_ax ax = go_tc $ coAxiomTyCon ax diff --git a/compiler/GHC/Core/UsageEnv.hs b/compiler/GHC/Core/UsageEnv.hs index b8a6dd1468..9c50d79772 100644 --- a/compiler/GHC/Core/UsageEnv.hs +++ b/compiler/GHC/Core/UsageEnv.hs @@ -84,7 +84,7 @@ supUE (UsageEnv e1 b1) (UsageEnv e2 b2) = UsageEnv (plusNameEnv_CD2 combineUsage -- Note: If you are changing this logic, check 'mkMultSup' in Multiplicity as well. supUEs :: [UsageEnv] -> UsageEnv -supUEs = foldr supUE bottomUE +supUEs = foldr supUE bottomUE -- deleteUE :: NamedThing n => UsageEnv -> n -> UsageEnv diff --git a/compiler/GHC/CoreToStg.hs b/compiler/GHC/CoreToStg.hs index 5ba4decd4f..37adbc84ee 100644 --- a/compiler/GHC/CoreToStg.hs +++ b/compiler/GHC/CoreToStg.hs @@ -565,7 +565,7 @@ coreToStgApp f args ticks = do _other -> StgApp f args' add_tick !t !e = StgTick t e - tapp = foldr add_tick app (map (coreToStgTick res_ty) ticks ++ ticks') + tapp = foldr add_tick app (map (coreToStgTick res_ty) ticks ++ ticks') -- -- Forcing these fixes a leak in the code generator, noticed while -- profiling for trac #4367 |