@@ -18,7 +18,7 @@ Portability : portable
18
18
lookups, and deletion. A 'HashSet' makes no guarantees as to the order of its
19
19
elements.
20
20
21
- If you are storing sets of @ Int@ s consider using the @ Data.IntSet@ from the
21
+ If you are storing sets of "Data. Int" s consider using " Data.IntSet" from the
22
22
<https://hackage.haskell.org/package/containers containers> package.
23
23
24
24
42
42
Add a new entry to the set:
43
43
44
44
>>> let moreDataStructures = HashSet.insert "Trie" dataStructures
45
- >>> HashSet.member \ "Trie\ " moreDataStructures
45
+ >>> HashSet.member "Trie" moreDataStructures
46
46
> True
47
47
48
48
Remove the @\"Graph\"@ entry from the set of data structures.
@@ -60,11 +60,11 @@ fromList ["Map","HashSet","Graph","HashMap","Set","Sequence"]
60
60
61
61
=== Using custom data with HashSet
62
62
63
- To create a @HashSet@ of your custom type, the type must have instances for 'Eq'
64
- and ' Hashable' . The ' Hashable' typeclass is defined in the
63
+ To create a @HashSet@ of your custom type, the type must have instances for "Data.Eq"
64
+ and "Data. Hashable" . The @ Hashable@ typeclass is defined in the
65
65
<https://hackage.haskell.org/package/hashable hashable> package, see the
66
66
documentation for information on how to make your type an instance of
67
- ' Hashable' .
67
+ "Data. Hashable" .
68
68
69
69
We'll start by setting up our custom data type:
70
70
@@ -84,7 +84,7 @@ fromList [Person {name = "Simon", likesDogs = True},Person {name = "Lana", likes
84
84
== Performance
85
85
86
86
The implementation is based on /hash array mapped tries/. A
87
- 'HashSet' is often faster than other ' Ord' -based set types,
87
+ 'HashSet' is often faster than other "Data. Ord" -based set types,
88
88
especially when value comparisons are expensive, as in the case of
89
89
strings.
90
90
0 commit comments