projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add deriving Data to Complex
[ghc-base.git]
/
Data
/
IntSet.hs
diff --git
a/Data/IntSet.hs
b/Data/IntSet.hs
index
9053098
..
36cac36
100644
(file)
--- a/
Data/IntSet.hs
+++ b/
Data/IntSet.hs
@@
-10,10
+10,11
@@
--
-- An efficient implementation of integer sets.
--
--
-- An efficient implementation of integer sets.
--
--- This module is intended to be imported @qualified@, to avoid name
--- clashes with "Prelude" functions. eg.
+-- Since many function names (but not the type name) clash with
+-- "Prelude" names, this module is usually imported @qualified@, e.g.
--
--
--- > import Data.IntSet as Set
+-- > import Data.IntSet (IntSet)
+-- > import qualified Data.IntSet as IntSet
--
-- The implementation is based on /big-endian patricia trees/. This data
-- structure performs especially well on binary operations like 'union'
--
-- The implementation is based on /big-endian patricia trees/. This data
-- structure performs especially well on binary operations like 'union'
@@
-212,7
+213,7
@@
member x t
-- | /O(log n)/. Is the element not in the set?
notMember :: Int -> IntSet -> Bool
-- | /O(log n)/. Is the element not in the set?
notMember :: Int -> IntSet -> Bool
-notMember k = not $ member k
+notMember k = not . member k
-- 'lookup' is used by 'intersection' for left-biasing
lookup :: Int -> IntSet -> Maybe Int
-- 'lookup' is used by 'intersection' for left-biasing
lookup :: Int -> IntSet -> Maybe Int