[commit: ghc] wip/spj-tc-branch3: Add elemDVarEnv (3c14858)

git at git.haskell.org git at git.haskell.org
Thu Nov 24 09:12:35 UTC 2016


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

On branch  : wip/spj-tc-branch3
Link       : http://ghc.haskell.org/trac/ghc/changeset/3c14858d2b741179964816c6bf664e15ab58c9b8/ghc

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

commit 3c14858d2b741179964816c6bf664e15ab58c9b8
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Nov 23 09:05:33 2016 +0000

    Add elemDVarEnv
    
    I need this in a later patch


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

3c14858d2b741179964816c6bf664e15ab58c9b8
 compiler/basicTypes/VarEnv.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/compiler/basicTypes/VarEnv.hs b/compiler/basicTypes/VarEnv.hs
index 146a2fc..dcb64a9 100644
--- a/compiler/basicTypes/VarEnv.hs
+++ b/compiler/basicTypes/VarEnv.hs
@@ -32,7 +32,7 @@ module VarEnv (
         dVarEnvElts,
         extendDVarEnv, extendDVarEnv_C,
         extendDVarEnvList,
-        lookupDVarEnv,
+        lookupDVarEnv, elemDVarEnv,
         isEmptyDVarEnv, foldDVarEnv,
         mapDVarEnv,
         modifyDVarEnv,
@@ -571,6 +571,9 @@ delDVarEnvList = delListFromUDFM
 isEmptyDVarEnv :: DVarEnv a -> Bool
 isEmptyDVarEnv = isNullUDFM
 
+elemDVarEnv :: Var -> DVarEnv a -> Bool
+elemDVarEnv = elemUDFM
+
 extendDVarEnv_C :: (a -> a -> a) -> DVarEnv a -> Var -> a -> DVarEnv a
 extendDVarEnv_C = addToUDFM_C
 



More information about the ghc-commits mailing list