[commit: ghc] master: Kill unused foldModuleEnv (7de776c)
git at git.haskell.org
git at git.haskell.org
Mon Jun 13 11:53:20 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/7de776cfe7825fca6a71fe6b3854c3c86bf9ca12/ghc
>---------------------------------------------------------------
commit 7de776cfe7825fca6a71fe6b3854c3c86bf9ca12
Author: Bartosz Nitka <niteria at gmail.com>
Date: Mon Jun 13 04:53:43 2016 -0700
Kill unused foldModuleEnv
With the current implementation, it's nondeterministic
because Ord Module is nondeterministic.
>---------------------------------------------------------------
7de776cfe7825fca6a71fe6b3854c3c86bf9ca12
compiler/basicTypes/Module.hs | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/compiler/basicTypes/Module.hs b/compiler/basicTypes/Module.hs
index a80df19..74b15bc 100644
--- a/compiler/basicTypes/Module.hs
+++ b/compiler/basicTypes/Module.hs
@@ -69,7 +69,7 @@ module Module
lookupWithDefaultModuleEnv, mapModuleEnv, mkModuleEnv, emptyModuleEnv,
moduleEnvKeys, moduleEnvElts, moduleEnvToList,
unitModuleEnv, isEmptyModuleEnv,
- foldModuleEnv, extendModuleEnvWith, filterModuleEnv,
+ extendModuleEnvWith, filterModuleEnv,
-- * ModuleName mappings
ModuleNameEnv, DModuleNameEnv,
@@ -578,9 +578,6 @@ unitModuleEnv m x = ModuleEnv (Map.singleton m x)
isEmptyModuleEnv :: ModuleEnv a -> Bool
isEmptyModuleEnv (ModuleEnv e) = Map.null e
-foldModuleEnv :: (a -> b -> b) -> b -> ModuleEnv a -> b
-foldModuleEnv f x (ModuleEnv e) = Map.foldRightWithKey (\_ v -> f v) x e
-
-- | A set of 'Module's
type ModuleSet = Set Module
More information about the ghc-commits
mailing list