summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/GhcMake.hs6
-rw-r--r--compiler/main/HscMain.hs4
-rw-r--r--compiler/main/HscTypes.hs3
-rw-r--r--compiler/main/Packages.hs2
4 files changed, 8 insertions, 7 deletions
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index 46a49900d5..ba9e8cefdf 100644
--- a/compiler/main/GhcMake.hs
+++ b/compiler/main/GhcMake.hs
@@ -608,9 +608,9 @@ checkStability
-> ([ModuleName], -- stableObject
[ModuleName]) -- stableBCO
-checkStability hpt sccs all_home_mods = foldl checkSCC ([],[]) sccs
+checkStability hpt sccs all_home_mods = foldl' checkSCC ([],[]) sccs
where
- checkSCC (stable_obj, stable_bco) scc0
+ checkSCC (!stable_obj, !stable_bco) scc0
| stableObjects = (scc_mods ++ stable_obj, stable_bco)
| stableBCOs = (stable_obj, scc_mods ++ stable_bco)
| otherwise = (stable_obj, stable_bco)
@@ -1011,7 +1011,7 @@ parUpsweep_one mod home_mod_map comp_graph_loops lcl_dflags cleanup par_sem
, this_build_mod `notElem` loop ]
- let all_deps = foldl1 Set.union [textual_deps, int_loop_deps, ext_loop_deps]
+ let all_deps = foldl1' Set.union [textual_deps, int_loop_deps, ext_loop_deps]
-- All of the module's home-module dependencies.
let home_deps_with_idx =
diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs
index d778b1d5d7..355c60e740 100644
--- a/compiler/main/HscMain.hs
+++ b/compiler/main/HscMain.hs
@@ -209,8 +209,8 @@ allKnownKeyNames -- where templateHaskellNames are defined
all_names = knownKeyNames
++ templateHaskellNames
- namesEnv = foldl (\m n -> extendNameEnv_Acc (:) singleton m n n)
- emptyUFM all_names
+ namesEnv = foldl' (\m n -> extendNameEnv_Acc (:) singleton m n n)
+ emptyUFM all_names
badNamesEnv = filterNameEnv (\ns -> length ns > 1) namesEnv
badNamesPairs = nameEnvUniqueElts badNamesEnv
badNamesStrs = map pairToStr badNamesPairs
diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs
index 800958bd6f..c8bd6ba401 100644
--- a/compiler/main/HscTypes.hs
+++ b/compiler/main/HscTypes.hs
@@ -191,6 +191,7 @@ import Util
import GHC.Serialized ( Serialized )
import Foreign
+import Data.Foldable ( foldl' )
import Control.Monad ( guard, liftM, when, ap )
import Data.IORef
import Data.Time
@@ -1504,7 +1505,7 @@ icExtendGblRdrEnv env tythings
| is_sub_bndr thing
= env
| otherwise
- = foldl extendGlobalRdrEnv env1 (concatMap localGREsFromAvail avail)
+ = foldl' extendGlobalRdrEnv env1 (concatMap localGREsFromAvail avail)
where
env1 = shadowNames env (concatMap availNames avail)
avail = tyThingAvailInfo thing
diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs
index 2655c451d8..96729f50ed 100644
--- a/compiler/main/Packages.hs
+++ b/compiler/main/Packages.hs
@@ -305,7 +305,7 @@ searchPackageId dflags pid = filter ((pid ==) . sourcePackageId)
extendPackageConfigMap
:: PackageConfigMap -> [PackageConfig] -> PackageConfigMap
extendPackageConfigMap pkg_map new_pkgs
- = foldl add pkg_map new_pkgs
+ = foldl' add pkg_map new_pkgs
where add pkg_map p = addToUFM pkg_map (packageConfigId p) p
-- | Looks up the package with the given id in the package state, panicing if it is