summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2016-08-22 23:18:02 -0400
committerBen Gamari <ben@smart-cactus.org>2016-10-13 22:57:25 -0400
commit3991da46102191b0258cbac9c4e00b7771a9b721 (patch)
tree93ecf29659f227b11ee40cbe8521129ae4ba4f3e /compiler
parent34d933d6a821edf5abfcbee76d9325362fc28a13 (diff)
downloadhaskell-3991da46102191b0258cbac9c4e00b7771a9b721.tar.gz
MkIface: Turn a foldr into a foldl'
There is no reason why this should be a foldr considering we are building a map.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/iface/MkIface.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs
index 12980e4524..1a191dbb45 100644
--- a/compiler/iface/MkIface.hs
+++ b/compiler/iface/MkIface.hs
@@ -467,8 +467,8 @@ addFingerprints hsc_env mb_old_fingerprint iface0 new_decls
-- e.g. a reference to a constructor must be turned into a reference
-- to the TyCon for the purposes of calculating dependencies.
parent_map :: OccEnv OccName
- parent_map = foldr extend emptyOccEnv new_decls
- where extend d env =
+ parent_map = foldl' extend emptyOccEnv new_decls
+ where extend env d =
extendOccEnvList env [ (b,n) | b <- ifaceDeclImplicitBndrs d ]
where n = getOccName d