Skip to content

Commit 1e91479

Browse files
authored
Reorganize Map and IntMap Haddocks. (#519)
- Move "Construction" section to the top - Include fromList functions in "construction" section - Remove "operators" section, you don't go "looking for operators", you go "looking for functionality" which may be available as an operator. - Move most common query operations (lookup and friends) to the top - Move Insertion and Deletion sections below Construction. [ci skip]
1 parent 8f33ccb commit 1e91479

File tree

4 files changed

+141
-109
lines changed

4 files changed

+141
-109
lines changed

Data/IntMap/Lazy.hs

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -74,32 +74,29 @@ module Data.IntMap.Lazy (
7474
IntMap(..), Key -- instance Eq,Show
7575
#endif
7676

77-
-- * Operators
78-
, (!), (!?), (\\)
79-
80-
-- * Query
81-
, IM.null
82-
, size
83-
, member
84-
, notMember
85-
, IM.lookup
86-
, findWithDefault
87-
, lookupLT
88-
, lookupGT
89-
, lookupLE
90-
, lookupGE
91-
9277
-- * Construction
9378
, empty
9479
, singleton
80+
, fromSet
81+
82+
-- ** From Unordered Lists
83+
, fromList
84+
, fromListWith
85+
, fromListWithKey
86+
87+
-- ** From Ascending Lists
88+
, fromAscList
89+
, fromAscListWith
90+
, fromAscListWithKey
91+
, fromDistinctAscList
9592

96-
-- ** Insertion
93+
-- * Insertion
9794
, insert
9895
, insertWith
9996
, insertWithKey
10097
, insertLookupWithKey
10198

102-
-- ** Delete\/Update
99+
-- * Deletion\/Update
103100
, delete
104101
, adjust
105102
, adjustWithKey
@@ -109,6 +106,23 @@ module Data.IntMap.Lazy (
109106
, alter
110107
, alterF
111108

109+
-- * Query
110+
-- ** Lookup
111+
, IM.lookup
112+
, (!?)
113+
, (!)
114+
, findWithDefault
115+
, member
116+
, notMember
117+
, lookupLT
118+
, lookupGT
119+
, lookupLE
120+
, lookupGE
121+
122+
-- ** Size
123+
, IM.null
124+
, size
125+
112126
-- * Combine
113127

114128
-- ** Union
@@ -120,6 +134,7 @@ module Data.IntMap.Lazy (
120134

121135
-- ** Difference
122136
, difference
137+
, (\\)
123138
, differenceWith
124139
, differenceWithKey
125140

@@ -161,21 +176,13 @@ module Data.IntMap.Lazy (
161176
, keys
162177
, assocs
163178
, keysSet
164-
, fromSet
165179

166180
-- ** Lists
167181
, toList
168-
, fromList
169-
, fromListWith
170-
, fromListWithKey
171182

172183
-- ** Ordered lists
173184
, toAscList
174185
, toDescList
175-
, fromAscList
176-
, fromAscListWith
177-
, fromAscListWithKey
178-
, fromDistinctAscList
179186

180187
-- * Filter
181188
, IM.filter

Data/IntMap/Strict.hs

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -93,32 +93,29 @@ module Data.IntMap.Strict (
9393
IntMap(..), Key -- instance Eq,Show
9494
#endif
9595

96-
-- * Operators
97-
, (!), (!?), (\\)
98-
99-
-- * Query
100-
, null
101-
, size
102-
, member
103-
, notMember
104-
, lookup
105-
, findWithDefault
106-
, lookupLT
107-
, lookupGT
108-
, lookupLE
109-
, lookupGE
110-
11196
-- * Construction
11297
, empty
11398
, singleton
99+
, fromSet
100+
101+
-- ** From Unordered Lists
102+
, fromList
103+
, fromListWith
104+
, fromListWithKey
105+
106+
-- ** From Ascending Lists
107+
, fromAscList
108+
, fromAscListWith
109+
, fromAscListWithKey
110+
, fromDistinctAscList
114111

115-
-- ** Insertion
112+
-- * Insertion
116113
, insert
117114
, insertWith
118115
, insertWithKey
119116
, insertLookupWithKey
120117

121-
-- ** Delete\/Update
118+
-- * Deletion\/Update
122119
, delete
123120
, adjust
124121
, adjustWithKey
@@ -128,6 +125,23 @@ module Data.IntMap.Strict (
128125
, alter
129126
, alterF
130127

128+
-- * Query
129+
-- ** Lookup
130+
, lookup
131+
, (!?)
132+
, (!)
133+
, findWithDefault
134+
, member
135+
, notMember
136+
, lookupLT
137+
, lookupGT
138+
, lookupLE
139+
, lookupGE
140+
141+
-- ** Size
142+
, null
143+
, size
144+
131145
-- * Combine
132146

133147
-- ** Union
@@ -139,6 +153,7 @@ module Data.IntMap.Strict (
139153

140154
-- ** Difference
141155
, difference
156+
, (\\)
142157
, differenceWith
143158
, differenceWithKey
144159

@@ -180,21 +195,13 @@ module Data.IntMap.Strict (
180195
, keys
181196
, assocs
182197
, keysSet
183-
, fromSet
184198

185199
-- ** Lists
186200
, toList
187-
, fromList
188-
, fromListWith
189-
, fromListWithKey
190201

191-
-- ** Ordered lists
202+
-- ** Ordered lists
192203
, toAscList
193204
, toDescList
194-
, fromAscList
195-
, fromAscListWith
196-
, fromAscListWithKey
197-
, fromDistinctAscList
198205

199206
-- * Filter
200207
, filter

Data/Map/Lazy.hs

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -88,32 +88,35 @@ module Data.Map.Lazy (
8888
-- * Map type
8989
Map -- instance Eq,Show,Read
9090

91-
-- * Operators
92-
, (!), (!?), (\\)
93-
94-
-- * Query
95-
, null
96-
, size
97-
, member
98-
, notMember
99-
, lookup
100-
, findWithDefault
101-
, lookupLT
102-
, lookupGT
103-
, lookupLE
104-
, lookupGE
105-
10691
-- * Construction
10792
, empty
10893
, singleton
94+
, fromSet
10995

110-
-- ** Insertion
96+
-- ** From Unordered Lists
97+
, fromList
98+
, fromListWith
99+
, fromListWithKey
100+
101+
-- ** From Ascending Lists
102+
, fromAscList
103+
, fromAscListWith
104+
, fromAscListWithKey
105+
, fromDistinctAscList
106+
107+
-- ** From Descending Lists
108+
, fromDescList
109+
, fromDescListWith
110+
, fromDescListWithKey
111+
, fromDistinctDescList
112+
113+
-- * Insertion
111114
, insert
112115
, insertWith
113116
, insertWithKey
114117
, insertLookupWithKey
115118

116-
-- ** Delete\/Update
119+
-- * Deletion\/Update
117120
, delete
118121
, adjust
119122
, adjustWithKey
@@ -123,6 +126,23 @@ module Data.Map.Lazy (
123126
, alter
124127
, alterF
125128

129+
-- * Query
130+
-- ** Lookup
131+
, lookup
132+
, (!?)
133+
, (!)
134+
, findWithDefault
135+
, member
136+
, notMember
137+
, lookupLT
138+
, lookupGT
139+
, lookupLE
140+
, lookupGE
141+
142+
-- ** Size
143+
, null
144+
, size
145+
126146
-- * Combine
127147

128148
-- ** Union
@@ -134,6 +154,7 @@ module Data.Map.Lazy (
134154

135155
-- ** Difference
136156
, difference
157+
, (\\)
137158
, differenceWith
138159
, differenceWithKey
139160

@@ -180,25 +201,13 @@ module Data.Map.Lazy (
180201
, keys
181202
, assocs
182203
, keysSet
183-
, fromSet
184204

185205
-- ** Lists
186206
, toList
187-
, fromList
188-
, fromListWith
189-
, fromListWithKey
190207

191208
-- ** Ordered lists
192209
, toAscList
193210
, toDescList
194-
, fromAscList
195-
, fromAscListWith
196-
, fromAscListWithKey
197-
, fromDistinctAscList
198-
, fromDescList
199-
, fromDescListWith
200-
, fromDescListWithKey
201-
, fromDistinctDescList
202211

203212
-- * Filter
204213
, filter

0 commit comments

Comments
 (0)