[Git][ghc/ghc][wip/T16806] Remove some unused definitions

Simon Jakobi gitlab at gitlab.haskell.org
Tue Apr 7 14:56:25 UTC 2020



Simon Jakobi pushed to branch wip/T16806 at Glasgow Haskell Compiler / GHC


Commits:
f933fd20 by Simon Jakobi at 2020-04-07T16:55:26+02:00
Remove some unused definitions

- - - - -


3 changed files:

- compiler/GHC/Types/Name/Occurrence.hs
- compiler/GHC/Types/Unique/DFM.hs
- compiler/GHC/Types/Var/Env.hs


Changes:

=====================================
compiler/GHC/Types/Name/Occurrence.hs
=====================================
@@ -90,7 +90,7 @@ module GHC.Types.Name.Occurrence (
         OccSet, emptyOccSet, unitOccSet, mkOccSet, extendOccSet,
         extendOccSetList,
         unionOccSets, unionManyOccSets, minusOccSet, elemOccSet,
-        isEmptyOccSet, intersectOccSet, intersectsOccSet, disjointOccSet,
+        isEmptyOccSet, intersectOccSet,
         filterOccSet,
 
         -- * Tidying up
@@ -452,8 +452,6 @@ minusOccSet       :: OccSet -> OccSet -> OccSet
 elemOccSet        :: OccName -> OccSet -> Bool
 isEmptyOccSet     :: OccSet -> Bool
 intersectOccSet   :: OccSet -> OccSet -> OccSet
-disjointOccSet    :: OccSet -> OccSet -> Bool
-intersectsOccSet  :: OccSet -> OccSet -> Bool
 filterOccSet      :: (OccName -> Bool) -> OccSet -> OccSet
 
 emptyOccSet       = emptyUniqSet
@@ -467,8 +465,6 @@ minusOccSet       = minusUniqSet
 elemOccSet        = elementOfUniqSet
 isEmptyOccSet     = isEmptyUniqSet
 intersectOccSet   = intersectUniqSets
-disjointOccSet    = disjointUniqSets
-intersectsOccSet s1 s2 = not (s1 `disjointOccSet` s2)
 filterOccSet      = filterUniqSet
 
 {-


=====================================
compiler/GHC/Types/Unique/DFM.hs
=====================================
@@ -45,7 +45,6 @@ module GHC.Types.Unique.DFM (
         isNullUDFM,
         sizeUDFM,
         intersectUDFM, udfmIntersectUFM,
-        intersectsUDFM,
         disjointUDFM, disjointUdfmUfm,
         equalKeysUDFM,
         minusUDFM,
@@ -318,9 +317,6 @@ udfmIntersectUFM (UDFM x i) y = UDFM (M.intersection x (ufmToIntMap y)) i
   -- M.intersection is left biased, that means the result will only have
   -- a subset of elements from the left set, so `i` is a good upper bound.
 
-intersectsUDFM :: UniqDFM elt -> UniqDFM elt -> Bool
-intersectsUDFM x y = not (x `disjointUDFM` y)
-
 disjointUDFM :: UniqDFM elt -> UniqDFM elt -> Bool
 disjointUDFM (UDFM x _i) (UDFM y _j) = M.disjoint x y
 


=====================================
compiler/GHC/Types/Var/Env.hs
=====================================
@@ -15,7 +15,7 @@ module GHC.Types.Var.Env (
         plusVarEnv, plusVarEnv_C, plusVarEnv_CD, plusMaybeVarEnv_C,
         plusVarEnvList, alterVarEnv,
         delVarEnvList, delVarEnv, delVarEnv_Directly,
-        minusVarEnv, intersectsVarEnv,
+        minusVarEnv,
         lookupVarEnv, lookupVarEnv_NF, lookupWithDefaultVarEnv,
         mapVarEnv, zipVarEnv,
         modifyVarEnv, modifyVarEnv_Directly,
@@ -476,7 +476,6 @@ restrictVarEnv    :: VarEnv a -> VarSet -> VarEnv a
 delVarEnvList     :: VarEnv a -> [Var] -> VarEnv a
 delVarEnv         :: VarEnv a -> Var -> VarEnv a
 minusVarEnv       :: VarEnv a -> VarEnv b -> VarEnv a
-intersectsVarEnv  :: VarEnv a -> VarEnv a -> Bool
 plusVarEnv_C      :: (a -> a -> a) -> VarEnv a -> VarEnv a -> VarEnv a
 plusVarEnv_CD     :: (a -> a -> a) -> VarEnv a -> a -> VarEnv a -> a -> VarEnv a
 plusMaybeVarEnv_C :: (a -> a -> Maybe a) -> VarEnv a -> VarEnv a -> VarEnv a
@@ -507,7 +506,6 @@ plusMaybeVarEnv_C = plusMaybeUFM_C
 delVarEnvList    = delListFromUFM
 delVarEnv        = delFromUFM
 minusVarEnv      = minusUFM
-intersectsVarEnv e1 e2 = not (e1 `disjointUFM` e2)
 plusVarEnv       = plusUFM
 plusVarEnvList   = plusUFMList
 lookupVarEnv     = lookupUFM



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f933fd200d76d6169f2aef9ba383d6e3d2ce0c55

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f933fd200d76d6169f2aef9ba383d6e3d2ce0c55
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200407/ee32fa1c/attachment-0001.html>


More information about the ghc-commits mailing list