[commit: ghc] master: Add filterVarEnv (2c6b201)

git at git.haskell.org git at git.haskell.org
Wed Nov 6 09:42:54 UTC 2013


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/2c6b20103f1c4a4c243c5858cba4c3730668d4ab/ghc

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

commit 2c6b20103f1c4a4c243c5858cba4c3730668d4ab
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Nov 5 12:17:57 2013 +0000

    Add filterVarEnv


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

2c6b20103f1c4a4c243c5858cba4c3730668d4ab
 compiler/basicTypes/VarEnv.lhs |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/basicTypes/VarEnv.lhs b/compiler/basicTypes/VarEnv.lhs
index 9f88d0b..2d01673 100644
--- a/compiler/basicTypes/VarEnv.lhs
+++ b/compiler/basicTypes/VarEnv.lhs
@@ -27,7 +27,7 @@ module VarEnv (
 	modifyVarEnv, modifyVarEnv_Directly,
 	isEmptyVarEnv, foldVarEnv, 
 	elemVarEnvByKey, lookupVarEnv_Directly,
-	filterVarEnv_Directly, restrictVarEnv, 
+	filterVarEnv, filterVarEnv_Directly, restrictVarEnv, 
         partitionVarEnv,
 
 	-- * The InScopeSet type
@@ -399,6 +399,7 @@ varEnvKeys	  :: VarEnv a -> [Unique]
 		  
 isEmptyVarEnv	  :: VarEnv a -> Bool
 lookupVarEnv	  :: VarEnv a -> Var -> Maybe a
+filterVarEnv      :: (a -> Bool) -> VarEnv a -> VarEnv a
 lookupVarEnv_NF   :: VarEnv a -> Var -> a
 lookupWithDefaultVarEnv :: VarEnv a -> a -> Var -> a
 elemVarEnv	  :: Var -> VarEnv a -> Bool
@@ -421,6 +422,7 @@ minusVarEnv      = minusUFM
 intersectsVarEnv e1 e2 = not (isEmptyVarEnv (e1 `intersectUFM` e2))
 plusVarEnv	 = plusUFM
 lookupVarEnv	 = lookupUFM
+filterVarEnv     = filterUFM
 lookupWithDefaultVarEnv = lookupWithDefaultUFM
 mapVarEnv	 = mapUFM
 mkVarEnv	 = listToUFM



More information about the ghc-commits mailing list