summaryrefslogtreecommitdiff
path: root/compiler/rename/RnNames.lhs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-11-28 17:35:44 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2014-11-28 17:36:15 +0000
commit7460dafae3709218af651cb8bc47b5f03d4c25c7 (patch)
tree55eacd9c3fbaf7d48fc80190f376f0c55bbf1ad1 /compiler/rename/RnNames.lhs
parent171101beca39befde191baff5027c417bcc709ee (diff)
downloadhaskell-7460dafae3709218af651cb8bc47b5f03d4c25c7.tar.gz
Rename some of the functions in NameSet, to make the uniform with VarSet etc
For ages NameSet has used different names, eg. addOneToNameSet rather than extendNameSet nameSetToList rather than nameSetElems etc. Other set-like modules use uniform naming conventions. This patch makes NameSet follow suit. No change in behaviour; this is just renaming. I'm doing this just before the fork so that merging is easier.
Diffstat (limited to 'compiler/rename/RnNames.lhs')
-rw-r--r--compiler/rename/RnNames.lhs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs
index eaa629af76..dab2cce8a1 100644
--- a/compiler/rename/RnNames.lhs
+++ b/compiler/rename/RnNames.lhs
@@ -518,7 +518,7 @@ getLocalNonValBinders fixity_env
; val_avails <- mapM new_simple val_bndrs
; let avails = nti_avails ++ val_avails
- new_bndrs = availsToNameSet avails `unionNameSets`
+ new_bndrs = availsToNameSet avails `unionNameSet`
availsToNameSet tc_avails
; traceRn (text "getLocalNonValBinders 2" <+> ppr avails)
; envs <- extendGlobalRdrEnvRn avails fixity_env
@@ -1390,7 +1390,7 @@ findImportUsage imports rdr_env rdrs
import_usage = foldr (extendImportMap rdr_env) Map.empty rdrs
unused_decl decl@(L loc (ImportDecl { ideclHiding = imps }))
- = (decl, nubAvails used_avails, nameSetToList unused_imps)
+ = (decl, nubAvails used_avails, nameSetElems unused_imps)
where
used_avails = Map.lookup (srcSpanEnd loc) import_usage `orElse` []
-- srcSpanEnd: see Note [The ImportMap]
@@ -1413,11 +1413,11 @@ findImportUsage imports rdr_env rdrs
add_unused_name n acc
| n `elemNameSet` used_names = acc
- | otherwise = acc `addOneToNameSet` n
+ | otherwise = acc `extendNameSet` n
add_unused_all n acc
| n `elemNameSet` used_names = acc
| n `elemNameSet` used_parents = acc
- | otherwise = acc `addOneToNameSet` n
+ | otherwise = acc `extendNameSet` n
add_unused_with p ns acc
| all (`elemNameSet` acc1) ns = add_unused_name p acc1
| otherwise = acc1