@@ -22,7 +22,7 @@ import qualified Data.HashMap.Strict as Map
2222import Data.HashSet (HashSet )
2323import qualified Data.HashSet as Set
2424import Data.Hashable (Hashable )
25- import Data.List (isSuffixOf )
25+ import Data.List (isSuffixOf , foldl' )
2626import Data.Text (Text , pack )
2727import Development.IDE.GHC.Compat
2828import Development.IDE.GHC.Orphans ()
@@ -32,8 +32,8 @@ import HieDb
3232
3333
3434data ExportsMap = ExportsMap
35- { getExportsMap :: HashMap IdentifierText (HashSet IdentInfo )
36- , getModuleExportsMap :: HashMap ModuleNameText (HashSet IdentInfo )
35+ { getExportsMap :: ! ( HashMap IdentifierText (HashSet IdentInfo ) )
36+ , getModuleExportsMap :: ! ( HashMap ModuleNameText (HashSet IdentInfo ) )
3737 }
3838 deriving (Show )
3939
@@ -134,13 +134,11 @@ createExportsMapMg modGuts = do
134134 concatMap (fmap (second Set. fromList) . unpackAvail getModuleName) (mg_exports mi)
135135
136136updateExportsMapMg :: [ModGuts ] -> ExportsMap -> ExportsMap
137- updateExportsMapMg modGuts old =
138- old' <> new
137+ updateExportsMapMg modGuts old = old' <> new
139138 where
140139 new = createExportsMapMg modGuts
141140 old' = deleteAll old (Map. keys $ getModuleExportsMap new)
142- deleteAll = foldr deleteEntriesForModule
143-
141+ deleteAll = foldl' (flip deleteEntriesForModule)
144142
145143createExportsMapTc :: [TcGblEnv ] -> ExportsMap
146144createExportsMapTc modIface = do
0 commit comments