summaryrefslogtreecommitdiff
path: root/compiler/utils/FastStringEnv.hs
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2016-05-24 02:56:59 -0700
committerBartosz Nitka <niteria@gmail.com>2016-05-24 04:33:21 -0700
commit4c6e69d58a300d6ef440d326a3fd29b58b284fa1 (patch)
tree6653f56c150c3aa988a96c50359d53f27f2edb01 /compiler/utils/FastStringEnv.hs
parent8f7d01632cd79957fe42ea37103ca9b91a1c54f5 (diff)
downloadhaskell-4c6e69d58a300d6ef440d326a3fd29b58b284fa1.tar.gz
Document some benign nondeterminism
I've changed the functions to their nonDet equivalents and explained why they're OK there. This allowed me to remove foldNameSet, foldVarEnv, foldVarEnv_Directly, foldVarSet and foldUFM_Directly. Test Plan: ./validate, there should be no change in behavior Reviewers: simonpj, simonmar, austin, goldfire, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2244 GHC Trac Issues: #4012
Diffstat (limited to 'compiler/utils/FastStringEnv.hs')
-rw-r--r--compiler/utils/FastStringEnv.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/utils/FastStringEnv.hs b/compiler/utils/FastStringEnv.hs
index 02ee0292b9..fea627e6ca 100644
--- a/compiler/utils/FastStringEnv.hs
+++ b/compiler/utils/FastStringEnv.hs
@@ -12,7 +12,7 @@ module FastStringEnv (
-- ** Manipulating these environments
mkFsEnv,
- emptyFsEnv, unitFsEnv, fsEnvElts, fsEnvUniqueElts,
+ emptyFsEnv, unitFsEnv, fsEnvElts,
extendFsEnv_C, extendFsEnv_Acc, extendFsEnv,
extendFsEnvList, extendFsEnvList_C,
filterFsEnv,
@@ -21,7 +21,6 @@ module FastStringEnv (
elemFsEnv, mapFsEnv,
) where
-import Unique
import UniqFM
import Maybes
import FastString
@@ -32,7 +31,6 @@ type FastStringEnv a = UniqFM a -- Domain is FastString
emptyFsEnv :: FastStringEnv a
mkFsEnv :: [(FastString,a)] -> FastStringEnv a
fsEnvElts :: FastStringEnv a -> [a]
-fsEnvUniqueElts :: FastStringEnv a -> [(Unique, a)]
alterFsEnv :: (Maybe a-> Maybe a) -> FastStringEnv a -> FastString -> FastStringEnv a
extendFsEnv_C :: (a->a->a) -> FastStringEnv a -> FastString -> a -> FastStringEnv a
extendFsEnv_Acc :: (a->b->b) -> (a->b) -> FastStringEnv b -> FastString -> a -> FastStringEnv b
@@ -63,7 +61,6 @@ plusFsEnv x y = plusUFM x y
plusFsEnv_C f x y = plusUFM_C f x y
extendFsEnv_C f x y z = addToUFM_C f x y z
mapFsEnv f x = mapUFM f x
-fsEnvUniqueElts x = ufmToList x
extendFsEnv_Acc x y z a b = addToUFM_Acc x y z a b
extendFsEnvList_C x y z = addListToUFM_C x y z
delFromFsEnv x y = delFromUFM x y