[commit: ghc] master: Remove varEnvElts (1b058d4)

git at git.haskell.org git at git.haskell.org
Tue Jul 5 16:48:20 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1b058d4a0f4b12bf15d186409cfff8a2b93fd3a9/ghc

>---------------------------------------------------------------

commit 1b058d4a0f4b12bf15d186409cfff8a2b93fd3a9
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Tue Jul 5 09:50:02 2016 -0700

    Remove varEnvElts
    
    varEnvElts can introduce unnecessary nondeterminism
    and we can finally remove it, so that no one will use
    it by accident. If someone wants to use varEnvElts they
    should either use DVarEnv or use nonDetEltsUFM and document
    why it doesn't introduce nondeterminism.
    
    GHC Trac: #4012


>---------------------------------------------------------------

1b058d4a0f4b12bf15d186409cfff8a2b93fd3a9
 compiler/basicTypes/VarEnv.hs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/compiler/basicTypes/VarEnv.hs b/compiler/basicTypes/VarEnv.hs
index 626b5cd..92b6cc7 100644
--- a/compiler/basicTypes/VarEnv.hs
+++ b/compiler/basicTypes/VarEnv.hs
@@ -9,7 +9,7 @@ module VarEnv (
 
         -- ** Manipulating these environments
         emptyVarEnv, unitVarEnv, mkVarEnv, mkVarEnv_Directly,
-        elemVarEnv, varEnvElts,
+        elemVarEnv,
         extendVarEnv, extendVarEnv_C, extendVarEnv_Acc, extendVarEnv_Directly,
         extendVarEnvList,
         plusVarEnv, plusVarEnv_C, plusVarEnv_CD, alterVarEnv,
@@ -437,7 +437,6 @@ plusVarEnv_C      :: (a -> a -> a) -> VarEnv a -> VarEnv a -> VarEnv a
 plusVarEnv_CD     :: (a -> a -> a) -> VarEnv a -> a -> VarEnv a -> a -> VarEnv a
 mapVarEnv         :: (a -> b) -> VarEnv a -> VarEnv b
 modifyVarEnv      :: (a -> a) -> VarEnv a -> Var -> VarEnv a
-varEnvElts        :: VarEnv a -> [a]
 
 isEmptyVarEnv     :: VarEnv a -> Bool
 lookupVarEnv      :: VarEnv a -> Var -> Maybe a
@@ -469,7 +468,6 @@ mapVarEnv        = mapUFM
 mkVarEnv         = listToUFM
 mkVarEnv_Directly= listToUFM_Directly
 emptyVarEnv      = emptyUFM
-varEnvElts       = eltsUFM
 unitVarEnv       = unitUFM
 isEmptyVarEnv    = isNullUFM
 lookupVarEnv_Directly = lookupUFM_Directly



More information about the ghc-commits mailing list