| 1 | |
|---|
| 2 | New patches: |
|---|
| 3 | |
|---|
| 4 | [Improved, fixed documentation for Data.Map, Data.IntMap. Added examples. |
|---|
| 5 | apa3a@yahoo.com**20071121162036] { |
|---|
| 6 | hunk ./Data/IntMap.hs 6 |
|---|
| 7 | +-- (c) Andriy Palamarchuk 2007 |
|---|
| 8 | hunk ./Data/IntMap.hs 34 |
|---|
| 9 | +-- Operation comments contain the operation time complexity in |
|---|
| 10 | +-- the Big-O notation <http://en.wikipedia.org/wiki/Big_O_notation>. |
|---|
| 11 | hunk ./Data/IntMap.hs 223 |
|---|
| 12 | +-- |
|---|
| 13 | +-- > fromList [(5,'a'), (3,'b')] ! 1 Error: element not in the map |
|---|
| 14 | +-- > fromList [(5,'a'), (3,'b')] ! 5 == 'a' |
|---|
| 15 | hunk ./Data/IntMap.hs 230 |
|---|
| 16 | --- | /O(n+m)/. See 'difference'. |
|---|
| 17 | +-- | Same as 'difference'. |
|---|
| 18 | hunk ./Data/IntMap.hs 278 |
|---|
| 19 | +-- |
|---|
| 20 | +-- > Data.IntMap.null (empty) == True |
|---|
| 21 | +-- > Data.IntMap.null (singleton 1 'a') == False |
|---|
| 22 | + |
|---|
| 23 | hunk ./Data/IntMap.hs 287 |
|---|
| 24 | +-- |
|---|
| 25 | +-- > size empty == 0 |
|---|
| 26 | +-- > size (singleton 1 'a') == 1 |
|---|
| 27 | +-- > size (fromList([(1,'a'), (2,'c'), (3,'b')])) == 3 |
|---|
| 28 | hunk ./Data/IntMap.hs 299 |
|---|
| 29 | +-- |
|---|
| 30 | +-- > member 5 (fromList [(5,'a'), (3,'b')]) == True |
|---|
| 31 | +-- > member 1 (fromList [(5,'a'), (3,'b')]) == False |
|---|
| 32 | + |
|---|
| 33 | hunk ./Data/IntMap.hs 310 |
|---|
| 34 | +-- |
|---|
| 35 | +-- > notMember 5 (fromList [(5,'a'), (3,'b')]) == False |
|---|
| 36 | +-- > notMember 1 (fromList [(5,'a'), (3,'b')]) == True |
|---|
| 37 | + |
|---|
| 38 | hunk ./Data/IntMap.hs 317 |
|---|
| 39 | --- | /O(min(n,W))/. Lookup the value at a key in the map. |
|---|
| 40 | +-- | /O(min(n,W))/. Lookup the value at a key in the map. See also 'Data.Map.lookup'. |
|---|
| 41 | hunk ./Data/IntMap.hs 348 |
|---|
| 42 | +-- |
|---|
| 43 | +-- > findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x' |
|---|
| 44 | +-- > findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a' |
|---|
| 45 | + |
|---|
| 46 | hunk ./Data/IntMap.hs 362 |
|---|
| 47 | +-- |
|---|
| 48 | +-- > empty == fromList [] |
|---|
| 49 | +-- > size empty == 0 |
|---|
| 50 | + |
|---|
| 51 | hunk ./Data/IntMap.hs 371 |
|---|
| 52 | +-- |
|---|
| 53 | +-- > singleton 1 'a' == fromList [(1, 'a')] |
|---|
| 54 | +-- > size (singleton 1 'a') == 1 |
|---|
| 55 | + |
|---|
| 56 | hunk ./Data/IntMap.hs 386 |
|---|
| 57 | +-- |
|---|
| 58 | +-- > insert 5 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'x')] |
|---|
| 59 | +-- > insert 7 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'a'), (7, 'x')] |
|---|
| 60 | +-- > insert 5 'x' empty == singleton 5 'x' |
|---|
| 61 | + |
|---|
| 62 | hunk ./Data/IntMap.hs 409 |
|---|
| 63 | +-- |
|---|
| 64 | +-- > insertWith (++) 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "xxxa")] |
|---|
| 65 | +-- > insertWith (++) 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")] |
|---|
| 66 | +-- > insertWith (++) 5 "xxx" empty == singleton 5 "xxx" |
|---|
| 67 | + |
|---|
| 68 | hunk ./Data/IntMap.hs 423 |
|---|
| 69 | +-- |
|---|
| 70 | +-- > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value |
|---|
| 71 | +-- > insertWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:xxx|a")] |
|---|
| 72 | +-- > insertWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")] |
|---|
| 73 | +-- > insertWithKey f 5 "xxx" empty == singleton 5 "xxx" |
|---|
| 74 | + |
|---|
| 75 | hunk ./Data/IntMap.hs 445 |
|---|
| 76 | +-- |
|---|
| 77 | +-- > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value |
|---|
| 78 | +-- > insertLookupWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "5:xxx|a")]) |
|---|
| 79 | +-- > insertLookupWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "xxx")]) |
|---|
| 80 | +-- > insertLookupWithKey f 5 "xxx" empty == (Nothing, singleton 5 "xxx") |
|---|
| 81 | +-- |
|---|
| 82 | +-- This is how to define @insertLookup@ using @insertLookupWithKey@: |
|---|
| 83 | +-- |
|---|
| 84 | +-- > let insertLookup kx x t = insertLookupWithKey (\_ a _ -> a) kx x t |
|---|
| 85 | +-- > insertLookup 5 "x" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "x")]) |
|---|
| 86 | +-- > insertLookup 7 "x" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "x")]) |
|---|
| 87 | + |
|---|
| 88 | hunk ./Data/IntMap.hs 476 |
|---|
| 89 | +-- |
|---|
| 90 | +-- > delete 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b" |
|---|
| 91 | +-- > delete 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] |
|---|
| 92 | +-- > delete 5 empty == empty |
|---|
| 93 | + |
|---|
| 94 | hunk ./Data/IntMap.hs 495 |
|---|
| 95 | +-- |
|---|
| 96 | +-- > adjust ("new " ++) 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")] |
|---|
| 97 | +-- > adjust ("new " ++) 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] |
|---|
| 98 | +-- > adjust ("new " ++) 7 empty == empty |
|---|
| 99 | + |
|---|
| 100 | hunk ./Data/IntMap.hs 506 |
|---|
| 101 | +-- |
|---|
| 102 | +-- > let f key x = (show key) ++ ":new " ++ x |
|---|
| 103 | +-- > adjustWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")] |
|---|
| 104 | +-- > adjustWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] |
|---|
| 105 | +-- > adjustWithKey f 7 empty == empty |
|---|
| 106 | + |
|---|
| 107 | hunk ./Data/IntMap.hs 519 |
|---|
| 108 | +-- |
|---|
| 109 | +-- > let f x = if x == "a" then Just "new a" else Nothing |
|---|
| 110 | +-- > update f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")] |
|---|
| 111 | +-- > update f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] |
|---|
| 112 | +-- > update f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 113 | + |
|---|
| 114 | hunk ./Data/IntMap.hs 532 |
|---|
| 115 | +-- |
|---|
| 116 | +-- > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing |
|---|
| 117 | +-- > updateWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")] |
|---|
| 118 | +-- > updateWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] |
|---|
| 119 | +-- > updateWithKey f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 120 | + |
|---|
| 121 | hunk ./Data/IntMap.hs 553 |
|---|
| 122 | +-- The function returns original value, if it is updated. |
|---|
| 123 | +-- This is different behavior than 'Data.Map.updateLookupWithKey'. |
|---|
| 124 | +-- Returns the original key value if the map entry is deleted. |
|---|
| 125 | +-- |
|---|
| 126 | +-- > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing |
|---|
| 127 | +-- > updateLookupWithKey f 5 (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "5:new a")]) |
|---|
| 128 | +-- > updateLookupWithKey f 7 (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a")]) |
|---|
| 129 | +-- > updateLookupWithKey f 3 (fromList [(5,"a"), (3,"b")]) == (Just "b", singleton 5 "a") |
|---|
| 130 | + |
|---|
| 131 | hunk ./Data/IntMap.hs 580 |
|---|
| 132 | --- In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@ |
|---|
| 133 | +-- In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@. |
|---|
| 134 | hunk ./Data/IntMap.hs 605 |
|---|
| 135 | +-- |
|---|
| 136 | +-- > unions [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])] |
|---|
| 137 | +-- > == fromList [(3, "b"), (5, "a"), (7, "C")] |
|---|
| 138 | +-- > unions [(fromList [(5, "A3"), (3, "B3")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "a"), (3, "b")])] |
|---|
| 139 | +-- > == fromList [(3, "B3"), (5, "A3"), (7, "C")] |
|---|
| 140 | + |
|---|
| 141 | hunk ./Data/IntMap.hs 615 |
|---|
| 142 | --- | The union of a list of maps, with a combining operation |
|---|
| 143 | +-- | The union of a list of maps, with a combining operation. |
|---|
| 144 | +-- |
|---|
| 145 | +-- > unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])] |
|---|
| 146 | +-- > == fromList [(3, "bB3"), (5, "aAA3"), (7, "C")] |
|---|
| 147 | + |
|---|
| 148 | hunk ./Data/IntMap.hs 624 |
|---|
| 149 | --- | /O(n+m)/. The (left-biased) union of two maps. |
|---|
| 150 | +-- | /O(n+m)/. The (left-biased) union of two maps. |
|---|
| 151 | hunk ./Data/IntMap.hs 627 |
|---|
| 152 | +-- |
|---|
| 153 | +-- > union (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "a"), (7, "C")] |
|---|
| 154 | + |
|---|
| 155 | hunk ./Data/IntMap.hs 650 |
|---|
| 156 | --- | /O(n+m)/. The union with a combining function. |
|---|
| 157 | +-- | /O(n+m)/. The union with a combining function. |
|---|
| 158 | +-- |
|---|
| 159 | +-- > unionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "aA"), (7, "C")] |
|---|
| 160 | + |
|---|
| 161 | hunk ./Data/IntMap.hs 658 |
|---|
| 162 | --- | /O(n+m)/. The union with a combining function. |
|---|
| 163 | +-- | /O(n+m)/. The union with a combining function. |
|---|
| 164 | +-- |
|---|
| 165 | +-- > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value |
|---|
| 166 | +-- > unionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "5:a|A"), (7, "C")] |
|---|
| 167 | + |
|---|
| 168 | hunk ./Data/IntMap.hs 686 |
|---|
| 169 | --- | /O(n+m)/. Difference between two maps (based on keys). |
|---|
| 170 | +-- | /O(n+m)/. Difference between two maps (based on keys). |
|---|
| 171 | +-- |
|---|
| 172 | +-- > difference (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 3 "b" |
|---|
| 173 | + |
|---|
| 174 | hunk ./Data/IntMap.hs 713 |
|---|
| 175 | --- | /O(n+m)/. Difference with a combining function. |
|---|
| 176 | +-- | /O(n+m)/. Difference with a combining function. |
|---|
| 177 | +-- |
|---|
| 178 | +-- > let f al ar = if al == "b" then Just (al ++ ":" ++ ar) else Nothing |
|---|
| 179 | +-- > differenceWith f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (7, "C")]) |
|---|
| 180 | +-- > == singleton 3 "b:B" |
|---|
| 181 | + |
|---|
| 182 | hunk ./Data/IntMap.hs 727 |
|---|
| 183 | +-- |
|---|
| 184 | +-- > let f k al ar = if al == "b" then Just ((show k) ++ ":" ++ al ++ "|" ++ ar) else Nothing |
|---|
| 185 | +-- > differenceWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (10, "C")]) |
|---|
| 186 | +-- > == singleton 3 "3:b|B" |
|---|
| 187 | + |
|---|
| 188 | hunk ./Data/IntMap.hs 762 |
|---|
| 189 | --- | /O(n+m)/. The (left-biased) intersection of two maps (based on keys). |
|---|
| 190 | +-- | /O(n+m)/. The (left-biased) intersection of two maps (based on keys). |
|---|
| 191 | +-- |
|---|
| 192 | +-- > intersection (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "a" |
|---|
| 193 | + |
|---|
| 194 | hunk ./Data/IntMap.hs 791 |
|---|
| 195 | --- | /O(n+m)/. The intersection with a combining function. |
|---|
| 196 | +-- | /O(n+m)/. The intersection with a combining function. |
|---|
| 197 | +-- |
|---|
| 198 | +-- > intersectionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "aA" |
|---|
| 199 | + |
|---|
| 200 | hunk ./Data/IntMap.hs 799 |
|---|
| 201 | --- | /O(n+m)/. The intersection with a combining function. |
|---|
| 202 | +-- | /O(n+m)/. The intersection with a combining function. |
|---|
| 203 | +-- |
|---|
| 204 | +-- > let f k al ar = (show k) ++ ":" ++ al ++ "|" ++ ar |
|---|
| 205 | +-- > intersectionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "5:a|A" |
|---|
| 206 | + |
|---|
| 207 | hunk ./Data/IntMap.hs 836 |
|---|
| 208 | +-- |
|---|
| 209 | +-- > updateMinWithKey (\ k a -> Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"3:b"), (5,"a")] |
|---|
| 210 | +-- > updateMinWithKey (\ _ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 211 | + |
|---|
| 212 | hunk ./Data/IntMap.hs 854 |
|---|
| 213 | +-- |
|---|
| 214 | +-- > updateMaxWithKey (\ k a -> Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"b"), (5,"5:a")] |
|---|
| 215 | +-- > updateMaxWithKey (\ _ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b" |
|---|
| 216 | + |
|---|
| 217 | hunk ./Data/IntMap.hs 874 |
|---|
| 218 | +-- |
|---|
| 219 | +-- > v <- maxViewWithKey (fromList [(5,"a"), (3,"b")]) |
|---|
| 220 | +-- > v == ((5,"a"), singleton 3 "b") |
|---|
| 221 | +-- > maxViewWithKey empty Error: empty map |
|---|
| 222 | + |
|---|
| 223 | hunk ./Data/IntMap.hs 885 |
|---|
| 224 | - Nil -> fail "maxView: empty map has no maximal element" |
|---|
| 225 | + Nil -> fail "maxViewWithKey: empty map has no maximal element" |
|---|
| 226 | hunk ./Data/IntMap.hs 894 |
|---|
| 227 | +-- |
|---|
| 228 | +-- > v <- minViewWithKey (fromList [(5,"a"), (3,"b")]) |
|---|
| 229 | +-- > v == ((3,"b"), singleton 5 "a") |
|---|
| 230 | +-- > minViewWithKey empty Error: empty map |
|---|
| 231 | + |
|---|
| 232 | hunk ./Data/IntMap.hs 905 |
|---|
| 233 | - Nil -> fail "minView: empty map has no minimal element" |
|---|
| 234 | + Nil -> fail "minViewWithKey: empty map has no minimal element" |
|---|
| 235 | hunk ./Data/IntMap.hs 914 |
|---|
| 236 | +-- |
|---|
| 237 | +-- > updateMax (\ a -> Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "Xa")] |
|---|
| 238 | +-- > updateMax (\ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b" |
|---|
| 239 | + |
|---|
| 240 | hunk ./Data/IntMap.hs 922 |
|---|
| 241 | +-- |
|---|
| 242 | +-- > updateMin (\ a -> Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "Xb"), (5, "a")] |
|---|
| 243 | +-- > updateMin (\ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 244 | + |
|---|
| 245 | hunk ./Data/IntMap.hs 1029 |
|---|
| 246 | -{- | /O(n+m)/. |
|---|
| 247 | +{- | /O(n+m)/. |
|---|
| 248 | hunk ./Data/IntMap.hs 1045 |
|---|
| 249 | - |
|---|
| 250 | hunk ./Data/IntMap.hs 1061 |
|---|
| 251 | +-- |
|---|
| 252 | +-- > map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")] |
|---|
| 253 | + |
|---|
| 254 | hunk ./Data/IntMap.hs 1069 |
|---|
| 255 | +-- |
|---|
| 256 | +-- > let f key x = (show key) ++ ":" ++ x |
|---|
| 257 | +-- > mapWithKey f (fromList [(5,"a"), (3,"b")]) == fromList [(3, "3:b"), (5, "5:a")] |
|---|
| 258 | + |
|---|
| 259 | hunk ./Data/IntMap.hs 1082 |
|---|
| 260 | +-- |
|---|
| 261 | +-- > let f a b = (a ++ b, b ++ "X") |
|---|
| 262 | +-- > mapAccum f "Everything: " (fromList [(5,"a"), (3,"b")]) == ("Everything: ba", fromList [(3, "bX"), (5, "aX")]) |
|---|
| 263 | + |
|---|
| 264 | hunk ./Data/IntMap.hs 1092 |
|---|
| 265 | +-- |
|---|
| 266 | +-- > let f a k b = (a ++ " " ++ (show k) ++ "-" ++ b, b ++ "X") |
|---|
| 267 | +-- > mapAccumWithKey f "Everything:" (fromList [(5,"a"), (3,"b")]) == ("Everything: 3-b 5-a", fromList [(3, "bX"), (5, "aX")]) |
|---|
| 268 | + |
|---|
| 269 | hunk ./Data/IntMap.hs 1127 |
|---|
| 270 | +-- |
|---|
| 271 | +-- > filter (> "a") (fromList [(5,"a"), (3,"b")]) == singleton 3 "b" |
|---|
| 272 | +-- > filter (> "x") (fromList [(5,"a"), (3,"b")]) == empty |
|---|
| 273 | +-- > filter (< "a") (fromList [(5,"a"), (3,"b")]) == empty |
|---|
| 274 | + |
|---|
| 275 | hunk ./Data/IntMap.hs 1137 |
|---|
| 276 | +-- |
|---|
| 277 | +-- > filterWithKey (\k _ -> k > 4) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 278 | + |
|---|
| 279 | hunk ./Data/IntMap.hs 1150 |
|---|
| 280 | --- | /O(n)/. partition the map according to some predicate. The first |
|---|
| 281 | +-- | /O(n)/. Partition the map according to some predicate. The first |
|---|
| 282 | hunk ./Data/IntMap.hs 1153 |
|---|
| 283 | +-- |
|---|
| 284 | +-- > partition (> "a") (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a") |
|---|
| 285 | +-- > partition (< "x") (fromList [(5,"a"), (3,"b")]) == (fromList [(3, "b"), (5, "a")], empty) |
|---|
| 286 | +-- > partition (> "x") (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3, "b"), (5, "a")]) |
|---|
| 287 | + |
|---|
| 288 | hunk ./Data/IntMap.hs 1162 |
|---|
| 289 | --- | /O(n)/. partition the map according to some predicate. The first |
|---|
| 290 | +-- | /O(n)/. Partition the map according to some predicate. The first |
|---|
| 291 | hunk ./Data/IntMap.hs 1165 |
|---|
| 292 | +-- |
|---|
| 293 | +-- > partitionWithKey (\ k _ -> k > 3) (fromList [(5,"a"), (3,"b")]) == (singleton 5 "a", singleton 3 "b") |
|---|
| 294 | +-- > partitionWithKey (\ k _ -> k < 7) (fromList [(5,"a"), (3,"b")]) == (fromList [(3, "b"), (5, "a")], empty) |
|---|
| 295 | +-- > partitionWithKey (\ k _ -> k > 7) (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3, "b"), (5, "a")]) |
|---|
| 296 | + |
|---|
| 297 | hunk ./Data/IntMap.hs 1183 |
|---|
| 298 | +-- |
|---|
| 299 | +-- > let f x = if x == "a" then Just "new a" else Nothing |
|---|
| 300 | +-- > mapMaybe f (fromList [(5,"a"), (3,"b")]) == singleton 5 "new a" |
|---|
| 301 | + |
|---|
| 302 | hunk ./Data/IntMap.hs 1192 |
|---|
| 303 | +-- |
|---|
| 304 | +-- > let f k _ = if k < 5 then Just ("key : " ++ (show k)) else Nothing |
|---|
| 305 | +-- > mapMaybeWithKey f (fromList [(5,"a"), (3,"b")]) == singleton 3 "key : 3" |
|---|
| 306 | + |
|---|
| 307 | hunk ./Data/IntMap.hs 1205 |
|---|
| 308 | +-- |
|---|
| 309 | +-- > let f a = if a < "c" then Left a else Right a |
|---|
| 310 | +-- > mapEither f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")]) |
|---|
| 311 | +-- > == (fromList [(3,"b"), (5,"a")], fromList [(1,"x"), (7,"z")]) |
|---|
| 312 | +-- > |
|---|
| 313 | +-- > mapEither (\ a -> Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")]) |
|---|
| 314 | +-- > == (empty, fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")]) |
|---|
| 315 | + |
|---|
| 316 | hunk ./Data/IntMap.hs 1218 |
|---|
| 317 | +-- |
|---|
| 318 | +-- > let f k a = if k < 5 then Left (k * 2) else Right (a ++ a) |
|---|
| 319 | +-- > mapEitherWithKey f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")]) |
|---|
| 320 | +-- > == (fromList [(1,2), (3,6)], fromList [(5,"aa"), (7,"zz")]) |
|---|
| 321 | +-- > |
|---|
| 322 | +-- > mapEitherWithKey (\_ a -> Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")]) |
|---|
| 323 | +-- > == (empty, fromList [(1,"x"), (3,"b"), (5,"a"), (7,"z")]) |
|---|
| 324 | + |
|---|
| 325 | hunk ./Data/IntMap.hs 1240 |
|---|
| 326 | +-- |
|---|
| 327 | +-- > split 2 (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3,"b"), (5,"a")]) |
|---|
| 328 | +-- > split 3 (fromList [(5,"a"), (3,"b")]) == (empty, singleton 5 "a") |
|---|
| 329 | +-- > split 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a") |
|---|
| 330 | +-- > split 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", empty) |
|---|
| 331 | +-- > split 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], empty) |
|---|
| 332 | + |
|---|
| 333 | hunk ./Data/IntMap.hs 1276 |
|---|
| 334 | +-- |
|---|
| 335 | +-- > splitLookup 2 (fromList [(5,"a"), (3,"b")]) == (empty, Nothing, fromList [(3,"b"), (5,"a")]) |
|---|
| 336 | +-- > splitLookup 3 (fromList [(5,"a"), (3,"b")]) == (empty, Just "b", singleton 5 "a") |
|---|
| 337 | +-- > splitLookup 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", Nothing, singleton 5 "a") |
|---|
| 338 | +-- > splitLookup 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", Just "a", empty) |
|---|
| 339 | +-- > splitLookup 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], Nothing, empty) |
|---|
| 340 | + |
|---|
| 341 | hunk ./Data/IntMap.hs 1319 |
|---|
| 342 | +-- > let f a len = len + (length a) |
|---|
| 343 | +-- > fold f 0 (fromList [(5,"a"), (3,"bbb")]) == 4 |
|---|
| 344 | + |
|---|
| 345 | hunk ./Data/IntMap.hs 1332 |
|---|
| 346 | +-- > let f k a result = result ++ "(" ++ (show k) ++ ":" ++ a ++ ")" |
|---|
| 347 | +-- > foldWithKey f "Map: " (fromList [(5,"a"), (3,"b")]) == "Map: (5:a)(3:b)" |
|---|
| 348 | + |
|---|
| 349 | hunk ./Data/IntMap.hs 1361 |
|---|
| 350 | +-- |
|---|
| 351 | +-- > elems (fromList [(5,"a"), (3,"b")]) == ["b","a"] |
|---|
| 352 | +-- > elems empty == [] |
|---|
| 353 | + |
|---|
| 354 | hunk ./Data/IntMap.hs 1370 |
|---|
| 355 | +-- |
|---|
| 356 | +-- > keys (fromList [(5,"a"), (3,"b")]) == [3,5] |
|---|
| 357 | +-- > keys empty == [] |
|---|
| 358 | + |
|---|
| 359 | hunk ./Data/IntMap.hs 1379 |
|---|
| 360 | +-- |
|---|
| 361 | +-- > keysSet (fromList [(5,"a"), (3,"b")]) == Data.IntSet.fromList [3,5] |
|---|
| 362 | +-- > keysSet empty == Data.IntSet.empty |
|---|
| 363 | + |
|---|
| 364 | hunk ./Data/IntMap.hs 1388 |
|---|
| 365 | +-- |
|---|
| 366 | +-- > assocs (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")] |
|---|
| 367 | +-- > assocs empty == [] |
|---|
| 368 | + |
|---|
| 369 | hunk ./Data/IntMap.hs 1401 |
|---|
| 370 | +-- |
|---|
| 371 | +-- > toList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")] |
|---|
| 372 | +-- > toList empty == [] |
|---|
| 373 | + |
|---|
| 374 | hunk ./Data/IntMap.hs 1411 |
|---|
| 375 | +-- |
|---|
| 376 | +-- > toAscList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")] |
|---|
| 377 | + |
|---|
| 378 | hunk ./Data/IntMap.hs 1420 |
|---|
| 379 | +-- |
|---|
| 380 | +-- > fromList [] == empty |
|---|
| 381 | +-- > fromList [(5,"a"), (3,"b"), (5, "c")] == fromList [(5,"c"), (3,"b")] |
|---|
| 382 | +-- > fromList [(5,"c"), (3,"b"), (5, "a")] == fromList [(5,"a"), (3,"b")] |
|---|
| 383 | + |
|---|
| 384 | hunk ./Data/IntMap.hs 1431 |
|---|
| 385 | --- | /O(n*min(n,W))/. Create a map from a list of key\/value pairs with a combining function. See also 'fromAscListWith'. |
|---|
| 386 | +-- | /O(n*min(n,W))/. Create a map from a list of key\/value pairs with a combining function. See also 'fromAscListWith'. |
|---|
| 387 | +-- |
|---|
| 388 | +-- > fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "ab"), (5, "aba")] |
|---|
| 389 | +-- > fromListWith (++) [] == empty |
|---|
| 390 | + |
|---|
| 391 | hunk ./Data/IntMap.hs 1440 |
|---|
| 392 | --- | /O(n*min(n,W))/. Build a map from a list of key\/value pairs with a combining function. See also fromAscListWithKey'. |
|---|
| 393 | +-- | /O(n*min(n,W))/. Build a map from a list of key\/value pairs with a combining function. See also fromAscListWithKey'. |
|---|
| 394 | +-- |
|---|
| 395 | +-- > fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "ab"), (5, "aba")] |
|---|
| 396 | +-- > fromListWith (++) [] == empty |
|---|
| 397 | + |
|---|
| 398 | hunk ./Data/IntMap.hs 1453 |
|---|
| 399 | +-- |
|---|
| 400 | +-- > fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")] |
|---|
| 401 | +-- > fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")] |
|---|
| 402 | + |
|---|
| 403 | hunk ./Data/IntMap.hs 1463 |
|---|
| 404 | +-- |
|---|
| 405 | +-- > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")] |
|---|
| 406 | + |
|---|
| 407 | hunk ./Data/IntMap.hs 1472 |
|---|
| 408 | +-- |
|---|
| 409 | +-- > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")] |
|---|
| 410 | + |
|---|
| 411 | hunk ./Data/IntMap.hs 1481 |
|---|
| 412 | +-- |
|---|
| 413 | +-- > fromDistinctAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")] |
|---|
| 414 | + |
|---|
| 415 | hunk ./Data/Map.hs 7 |
|---|
| 416 | +-- (c) Andriy Palamarchuk 2007 |
|---|
| 417 | hunk ./Data/Map.hs 35 |
|---|
| 418 | +-- |
|---|
| 419 | +-- Operation comments contain the operation time complexity in |
|---|
| 420 | +-- the Big-O notation <http://en.wikipedia.org/wiki/Big_O_notation>. |
|---|
| 421 | hunk ./Data/Map.hs 99 |
|---|
| 422 | - , mapKeys |
|---|
| 423 | - , mapKeysWith |
|---|
| 424 | - , mapKeysMonotonic |
|---|
| 425 | + , mapKeys |
|---|
| 426 | + , mapKeysWith |
|---|
| 427 | + , mapKeysMonotonic |
|---|
| 428 | hunk ./Data/Map.hs 110 |
|---|
| 429 | - , keysSet |
|---|
| 430 | + , keysSet |
|---|
| 431 | hunk ./Data/Map.hs 203 |
|---|
| 432 | +-- |
|---|
| 433 | +-- > fromList [(5,'a'), (3,'b')] ! 1 Error: element not in the map |
|---|
| 434 | +-- > fromList [(5,'a'), (3,'b')] ! 5 == 'a' |
|---|
| 435 | + |
|---|
| 436 | hunk ./Data/Map.hs 210 |
|---|
| 437 | --- | /O(n+m)/. See 'difference'. |
|---|
| 438 | +-- | Same as 'difference'. |
|---|
| 439 | hunk ./Data/Map.hs 250 |
|---|
| 440 | +-- |
|---|
| 441 | +-- > Data.Map.null (empty) == True |
|---|
| 442 | +-- > Data.Map.null (singleton 1 'a') == False |
|---|
| 443 | + |
|---|
| 444 | hunk ./Data/Map.hs 261 |
|---|
| 445 | +-- |
|---|
| 446 | +-- > size empty == 0 |
|---|
| 447 | +-- > size (singleton 1 'a') == 1 |
|---|
| 448 | +-- > size (fromList([(1,'a'), (2,'c'), (3,'b')])) == 3 |
|---|
| 449 | + |
|---|
| 450 | hunk ./Data/Map.hs 273 |
|---|
| 451 | --- | /O(log n)/. Lookup the value at a key in the map. |
|---|
| 452 | +-- | /O(log n)/. Lookup the value at a key in the map. |
|---|
| 453 | hunk ./Data/Map.hs 279 |
|---|
| 454 | +-- |
|---|
| 455 | +-- > let m = fromList [(5,'a'), (3,'b'), (7,'c')] |
|---|
| 456 | +-- > value1 <- Data.Map.lookup 5 m |
|---|
| 457 | +-- > value1 |
|---|
| 458 | +-- > 'a' |
|---|
| 459 | +-- > value2 <- Data.Map.lookup 1 m |
|---|
| 460 | +-- > Error: Key not found |
|---|
| 461 | +-- |
|---|
| 462 | +-- An example of using @lookup@ with @Maybe@ monad: |
|---|
| 463 | +-- |
|---|
| 464 | +-- > import Prelude hiding (lookup) |
|---|
| 465 | +-- > import Data.Map |
|---|
| 466 | +-- > |
|---|
| 467 | +-- > employeeDept = fromList([("John","Sales"), ("Bob","IT")]) |
|---|
| 468 | +-- > deptCountry = fromList([("IT","USA"), ("Sales","France")]) |
|---|
| 469 | +-- > countryCurrency = fromList([("USA", "Dollar"), ("France", "Euro")]) |
|---|
| 470 | +-- > |
|---|
| 471 | +-- > employeeCurrency :: String -> Maybe String |
|---|
| 472 | +-- > employeeCurrency name = do |
|---|
| 473 | +-- > dept <- lookup name employeeDept |
|---|
| 474 | +-- > country <- lookup dept deptCountry |
|---|
| 475 | +-- > lookup country countryCurrency |
|---|
| 476 | +-- > |
|---|
| 477 | +-- > main = do |
|---|
| 478 | +-- > putStrLn $ "John's currency: " ++ (show (employeeCurrency "John")) |
|---|
| 479 | +-- > putStrLn $ "Pete's currency: " ++ (show (employeeCurrency "Pete")) |
|---|
| 480 | +-- |
|---|
| 481 | +-- The output of this program: |
|---|
| 482 | +-- |
|---|
| 483 | +-- > John's currency: Just "Euro" |
|---|
| 484 | +-- > Pete's currency: Nothing |
|---|
| 485 | + |
|---|
| 486 | hunk ./Data/Map.hs 335 |
|---|
| 487 | --- | /O(log n)/. Is the key a member of the map? |
|---|
| 488 | +-- | /O(log n)/. Is the key a member of the map? See also 'notMember'. |
|---|
| 489 | +-- |
|---|
| 490 | +-- > member 5 (fromList [(5,'a'), (3,'b')]) == True |
|---|
| 491 | +-- > member 1 (fromList [(5,'a'), (3,'b')]) == False |
|---|
| 492 | + |
|---|
| 493 | hunk ./Data/Map.hs 346 |
|---|
| 494 | --- | /O(log n)/. Is the key not a member of the map? |
|---|
| 495 | +-- | /O(log n)/. Is the key not a member of the map? See also 'member'. |
|---|
| 496 | +-- |
|---|
| 497 | +-- > notMember 5 (fromList [(5,'a'), (3,'b')]) == False |
|---|
| 498 | +-- > notMember 1 (fromList [(5,'a'), (3,'b')]) == True |
|---|
| 499 | + |
|---|
| 500 | hunk ./Data/Map.hs 363 |
|---|
| 501 | --- the value at key @k@ or returns @def@ when the key is not in the map. |
|---|
| 502 | +-- the value at key @k@ or returns default value @def@ |
|---|
| 503 | +-- when the key is not in the map. |
|---|
| 504 | +-- |
|---|
| 505 | +-- > findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x' |
|---|
| 506 | +-- > findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a' |
|---|
| 507 | + |
|---|
| 508 | hunk ./Data/Map.hs 381 |
|---|
| 509 | +-- |
|---|
| 510 | +-- > empty == fromList [] |
|---|
| 511 | +-- > size empty == 0 |
|---|
| 512 | + |
|---|
| 513 | hunk ./Data/Map.hs 390 |
|---|
| 514 | +-- |
|---|
| 515 | +-- > singleton 1 'a' == fromList [(1, 'a')] |
|---|
| 516 | +-- > size (singleton 1 'a') == 1 |
|---|
| 517 | + |
|---|
| 518 | hunk ./Data/Map.hs 403 |
|---|
| 519 | --- replaced with the supplied value, i.e. 'insert' is equivalent to |
|---|
| 520 | +-- replaced with the supplied value. 'insert' is equivalent to |
|---|
| 521 | hunk ./Data/Map.hs 405 |
|---|
| 522 | +-- |
|---|
| 523 | +-- > insert 5 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'x')] |
|---|
| 524 | +-- > insert 7 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'a'), (7, 'x')] |
|---|
| 525 | +-- > insert 5 'x' empty == singleton 5 'x' |
|---|
| 526 | + |
|---|
| 527 | hunk ./Data/Map.hs 420 |
|---|
| 528 | --- | /O(log n)/. Insert with a combining function. |
|---|
| 529 | +-- | /O(log n)/. Insert with a function, combining new value and old value. |
|---|
| 530 | hunk ./Data/Map.hs 425 |
|---|
| 531 | +-- |
|---|
| 532 | +-- > insertWith (++) 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "xxxa")] |
|---|
| 533 | +-- > insertWith (++) 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")] |
|---|
| 534 | +-- > insertWith (++) 5 "xxx" empty == singleton 5 "xxx" |
|---|
| 535 | + |
|---|
| 536 | hunk ./Data/Map.hs 440 |
|---|
| 537 | --- | /O(log n)/. Insert with a combining function. |
|---|
| 538 | +-- | /O(log n)/. Insert with a function, combining key, new value and old value. |
|---|
| 539 | hunk ./Data/Map.hs 446 |
|---|
| 540 | +-- |
|---|
| 541 | +-- > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value |
|---|
| 542 | +-- > insertWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:xxx|a")] |
|---|
| 543 | +-- > insertWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")] |
|---|
| 544 | +-- > insertWithKey f 5 "xxx" empty == singleton 5 "xxx" |
|---|
| 545 | + |
|---|
| 546 | hunk ./Data/Map.hs 474 |
|---|
| 547 | --- | /O(log n)/. The expression (@'insertLookupWithKey' f k x map@) |
|---|
| 548 | +-- | /O(log n)/. Combines insert operation with old value retrieval. |
|---|
| 549 | +-- The expression (@'insertLookupWithKey' f k x map@) |
|---|
| 550 | hunk ./Data/Map.hs 478 |
|---|
| 551 | +-- |
|---|
| 552 | +-- > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value |
|---|
| 553 | +-- > insertLookupWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "5:xxx|a")]) |
|---|
| 554 | +-- > insertLookupWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "xxx")]) |
|---|
| 555 | +-- > insertLookupWithKey f 5 "xxx" empty == (Nothing, singleton 5 "xxx") |
|---|
| 556 | +-- |
|---|
| 557 | +-- This is how to define @insertLookup@ using @insertLookupWithKey@: |
|---|
| 558 | +-- |
|---|
| 559 | +-- > let insertLookup kx x t = insertLookupWithKey (\_ a _ -> a) kx x t |
|---|
| 560 | +-- > insertLookup 5 "x" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "x")]) |
|---|
| 561 | +-- > insertLookup 7 "x" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "x")]) |
|---|
| 562 | + |
|---|
| 563 | hunk ./Data/Map.hs 506 |
|---|
| 564 | +-- |
|---|
| 565 | +-- > delete 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b" |
|---|
| 566 | +-- > delete 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] |
|---|
| 567 | +-- > delete 5 empty == empty |
|---|
| 568 | + |
|---|
| 569 | hunk ./Data/Map.hs 521 |
|---|
| 570 | --- | /O(log n)/. Adjust a value at a specific key. When the key is not |
|---|
| 571 | +-- | /O(log n)/. Update a value at a specific key with the result of the provided function. |
|---|
| 572 | +-- When the key is not |
|---|
| 573 | hunk ./Data/Map.hs 524 |
|---|
| 574 | +-- |
|---|
| 575 | +-- > adjust ("new " ++) 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")] |
|---|
| 576 | +-- > adjust ("new " ++) 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] |
|---|
| 577 | +-- > adjust ("new " ++) 7 empty == empty |
|---|
| 578 | + |
|---|
| 579 | hunk ./Data/Map.hs 535 |
|---|
| 580 | +-- |
|---|
| 581 | +-- > let f key x = (show key) ++ ":new " ++ x |
|---|
| 582 | +-- > adjustWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")] |
|---|
| 583 | +-- > adjustWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] |
|---|
| 584 | +-- > adjustWithKey f 7 empty == empty |
|---|
| 585 | + |
|---|
| 586 | hunk ./Data/Map.hs 548 |
|---|
| 587 | +-- |
|---|
| 588 | +-- > let f x = if x == "a" then Just "new a" else Nothing |
|---|
| 589 | +-- > update f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")] |
|---|
| 590 | +-- > update f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] |
|---|
| 591 | +-- > update f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 592 | + |
|---|
| 593 | hunk ./Data/Map.hs 562 |
|---|
| 594 | +-- |
|---|
| 595 | +-- > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing |
|---|
| 596 | +-- > updateWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")] |
|---|
| 597 | +-- > updateWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] |
|---|
| 598 | +-- > updateWithKey f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 599 | + |
|---|
| 600 | hunk ./Data/Map.hs 580 |
|---|
| 601 | --- | /O(log n)/. Lookup and update. |
|---|
| 602 | +-- | /O(log n)/. Lookup and update. See also 'updateWithKey'. |
|---|
| 603 | +-- The function returns changed value, if it is updated. |
|---|
| 604 | +-- Returns the original key value if the map entry is deleted. |
|---|
| 605 | +-- |
|---|
| 606 | +-- > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing |
|---|
| 607 | +-- > updateLookupWithKey f 5 (fromList [(5,"a"), (3,"b")]) == (Just "5:new a", fromList [(3, "b"), (5, "5:new a")]) |
|---|
| 608 | +-- > updateLookupWithKey f 7 (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a")]) |
|---|
| 609 | +-- > updateLookupWithKey f 3 (fromList [(5,"a"), (3,"b")]) == (Just "b", singleton 5 "a") |
|---|
| 610 | + |
|---|
| 611 | hunk ./Data/Map.hs 603 |
|---|
| 612 | --- In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@ |
|---|
| 613 | +-- In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@. |
|---|
| 614 | +-- |
|---|
| 615 | +-- > let f _ = Nothing |
|---|
| 616 | +-- > alter f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] |
|---|
| 617 | +-- > alter f 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b" |
|---|
| 618 | +-- > |
|---|
| 619 | +-- > let f _ = Just "c" |
|---|
| 620 | +-- > alter f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "c")] |
|---|
| 621 | +-- > alter f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "c")] |
|---|
| 622 | + |
|---|
| 623 | hunk ./Data/Map.hs 633 |
|---|
| 624 | +-- |
|---|
| 625 | +-- > findIndex 2 (fromList [(5,"a"), (3,"b")]) Error: element is not in the map |
|---|
| 626 | +-- > findIndex 3 (fromList [(5,"a"), (3,"b")]) == 0 |
|---|
| 627 | +-- > findIndex 5 (fromList [(5,"a"), (3,"b")]) == 1 |
|---|
| 628 | +-- > findIndex 6 (fromList [(5,"a"), (3,"b")]) Error: element is not in the map |
|---|
| 629 | + |
|---|
| 630 | hunk ./Data/Map.hs 646 |
|---|
| 631 | --- /0/ up to, but not including, the 'size' of the map. |
|---|
| 632 | +-- /0/ up to, but not including, the 'size' of the map. |
|---|
| 633 | +-- |
|---|
| 634 | +-- > isJust (lookupIndex 2 (fromList [(5,"a"), (3,"b")])) == False |
|---|
| 635 | +-- > fromJust (lookupIndex 3 (fromList [(5,"a"), (3,"b")])) == 0 |
|---|
| 636 | +-- > fromJust (lookupIndex 5 (fromList [(5,"a"), (3,"b")])) == 1 |
|---|
| 637 | +-- > isJust (lookupIndex 6 (fromList [(5,"a"), (3,"b")])) == False |
|---|
| 638 | + |
|---|
| 639 | hunk ./Data/Map.hs 667 |
|---|
| 640 | +-- |
|---|
| 641 | +-- > elemAt 0 (fromList [(5,"a"), (3,"b")]) == (3,"b") |
|---|
| 642 | +-- > elemAt 1 (fromList [(5,"a"), (3,"b")]) == (5, "a") |
|---|
| 643 | +-- > elemAt 2 (fromList [(5,"a"), (3,"b")]) Error: index out of range |
|---|
| 644 | + |
|---|
| 645 | hunk ./Data/Map.hs 684 |
|---|
| 646 | +-- |
|---|
| 647 | +-- > updateAt (\ _ _ -> Just "x") 0 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "x"), (5, "a")] |
|---|
| 648 | +-- > updateAt (\ _ _ -> Just "x") 1 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "x")] |
|---|
| 649 | +-- > updateAt (\ _ _ -> Just "x") 2 (fromList [(5,"a"), (3,"b")]) Error: index out of range |
|---|
| 650 | +-- > updateAt (\ _ _ -> Just "x") (-1) (fromList [(5,"a"), (3,"b")]) Error: index out of range |
|---|
| 651 | +-- > updateAt (\_ _ -> Nothing) 0 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 652 | +-- > updateAt (\_ _ -> Nothing) 1 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b" |
|---|
| 653 | +-- > updateAt (\_ _ -> Nothing) 2 (fromList [(5,"a"), (3,"b")]) Error: index out of range |
|---|
| 654 | +-- > updateAt (\_ _ -> Nothing) (-1) (fromList [(5,"a"), (3,"b")]) Error: index out of range |
|---|
| 655 | + |
|---|
| 656 | hunk ./Data/Map.hs 708 |
|---|
| 657 | +-- |
|---|
| 658 | +-- > deleteAt 0 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 659 | +-- > deleteAt 1 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b" |
|---|
| 660 | +-- > deleteAt 2 (fromList [(5,"a"), (3,"b")]) Error: index out of range |
|---|
| 661 | +-- > deleteAt (-1) (fromList [(5,"a"), (3,"b")]) Error: index out of range |
|---|
| 662 | + |
|---|
| 663 | hunk ./Data/Map.hs 722 |
|---|
| 664 | --- | /O(log n)/. The minimal key of the map. |
|---|
| 665 | +-- | /O(log n)/. The minimal key of the map. Calls 'error' is the map is empty. |
|---|
| 666 | +-- |
|---|
| 667 | +-- > findMin (fromList [(5,"a"), (3,"b")]) == (3,"b") |
|---|
| 668 | +-- > findMin empty Error: empty map has no minimal element |
|---|
| 669 | + |
|---|
| 670 | hunk ./Data/Map.hs 732 |
|---|
| 671 | --- | /O(log n)/. The maximal key of the map. |
|---|
| 672 | +-- | /O(log n)/. The maximal key of the map. Calls 'error' is the map is empty. |
|---|
| 673 | +-- |
|---|
| 674 | +-- > findMax (fromList [(5,"a"), (3,"b")]) == (5,"a") |
|---|
| 675 | +-- > findMax empty Error: empty map has no maximal element |
|---|
| 676 | + |
|---|
| 677 | hunk ./Data/Map.hs 742 |
|---|
| 678 | --- | /O(log n)/. Delete the minimal key. |
|---|
| 679 | +-- | /O(log n)/. Delete the minimal key. Returns an empty map if the map is empty. |
|---|
| 680 | +-- |
|---|
| 681 | +-- > deleteMin (fromList [(5,"a"), (3,"b"), (7,"c")]) == fromList [(5,"a"), (7,"c")] |
|---|
| 682 | +-- > deleteMin empty == empty |
|---|
| 683 | + |
|---|
| 684 | hunk ./Data/Map.hs 752 |
|---|
| 685 | --- | /O(log n)/. Delete the maximal key. |
|---|
| 686 | +-- | /O(log n)/. Delete the maximal key. Returns an empty map if the map is empty. |
|---|
| 687 | +-- |
|---|
| 688 | +-- > deleteMax (fromList [(5,"a"), (3,"b"), (7,"c")]) == fromList [(3,"b"), (5,"a")] |
|---|
| 689 | +-- > deleteMax empty == empty |
|---|
| 690 | + |
|---|
| 691 | hunk ./Data/Map.hs 763 |
|---|
| 692 | +-- |
|---|
| 693 | +-- > updateMin (\ a -> Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "Xb"), (5, "a")] |
|---|
| 694 | +-- > updateMin (\ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 695 | + |
|---|
| 696 | hunk ./Data/Map.hs 772 |
|---|
| 697 | +-- |
|---|
| 698 | +-- > updateMax (\ a -> Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "Xa")] |
|---|
| 699 | +-- > updateMax (\ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b" |
|---|
| 700 | + |
|---|
| 701 | hunk ./Data/Map.hs 782 |
|---|
| 702 | +-- |
|---|
| 703 | +-- > updateMinWithKey (\ k a -> Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"3:b"), (5,"a")] |
|---|
| 704 | +-- > updateMinWithKey (\ _ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 705 | + |
|---|
| 706 | hunk ./Data/Map.hs 796 |
|---|
| 707 | +-- |
|---|
| 708 | +-- > updateMaxWithKey (\ k a -> Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"b"), (5,"5:a")] |
|---|
| 709 | +-- > updateMaxWithKey (\ _ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b" |
|---|
| 710 | + |
|---|
| 711 | hunk ./Data/Map.hs 811 |
|---|
| 712 | +-- |
|---|
| 713 | +-- > v <- minViewWithKey (fromList [(5,"a"), (3,"b")]) |
|---|
| 714 | +-- > v == ((3,"b"), singleton 5 "a") |
|---|
| 715 | +-- > minViewWithKey empty Error: empty map |
|---|
| 716 | + |
|---|
| 717 | hunk ./Data/Map.hs 817 |
|---|
| 718 | -minViewWithKey Tip = fail "Map.minView: empty map" |
|---|
| 719 | +minViewWithKey Tip = fail "Map.minViewWithKey: empty map" |
|---|
| 720 | hunk ./Data/Map.hs 822 |
|---|
| 721 | +-- |
|---|
| 722 | +-- > v <- maxViewWithKey (fromList [(5,"a"), (3,"b")]) |
|---|
| 723 | +-- > v == ((5,"a"), singleton 3 "b") |
|---|
| 724 | +-- > maxViewWithKey empty Error: empty map |
|---|
| 725 | + |
|---|
| 726 | hunk ./Data/Map.hs 828 |
|---|
| 727 | -maxViewWithKey Tip = fail "Map.maxView: empty map" |
|---|
| 728 | +maxViewWithKey Tip = fail "Map.maxViewWithKey: empty map" |
|---|
| 729 | hunk ./Data/Map.hs 833 |
|---|
| 730 | +-- |
|---|
| 731 | +-- > v <- minView (fromList [(5,"a"), (3,"b")]) |
|---|
| 732 | +-- > v == ("b", singleton 5 "a") |
|---|
| 733 | +-- > minView empty Error: empty map |
|---|
| 734 | + |
|---|
| 735 | hunk ./Data/Map.hs 844 |
|---|
| 736 | +-- |
|---|
| 737 | +-- > v <- maxView (fromList [(5,"a"), (3,"b")]) |
|---|
| 738 | +-- > v == ("a", singleton 3 "b") |
|---|
| 739 | +-- > maxView empty Error: empty map |
|---|
| 740 | + |
|---|
| 741 | hunk ./Data/Map.hs 862 |
|---|
| 742 | +-- |
|---|
| 743 | +-- > unions [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])] |
|---|
| 744 | +-- > == fromList [(3, "b"), (5, "a"), (7, "C")] |
|---|
| 745 | +-- > unions [(fromList [(5, "A3"), (3, "B3")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "a"), (3, "b")])] |
|---|
| 746 | +-- > == fromList [(3, "B3"), (5, "A3"), (7, "C")] |
|---|
| 747 | + |
|---|
| 748 | hunk ./Data/Map.hs 874 |
|---|
| 749 | +-- |
|---|
| 750 | +-- > unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])] |
|---|
| 751 | +-- > == fromList [(3, "bB3"), (5, "aAA3"), (7, "C")] |
|---|
| 752 | + |
|---|
| 753 | hunk ./Data/Map.hs 887 |
|---|
| 754 | --- Hedge-union is more efficient on (bigset `union` smallset) |
|---|
| 755 | +-- Hedge-union is more efficient on (bigset \``union`\` smallset). |
|---|
| 756 | +-- |
|---|
| 757 | +-- > union (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "a"), (7, "C")] |
|---|
| 758 | + |
|---|
| 759 | hunk ./Data/Map.hs 927 |
|---|
| 760 | +-- |
|---|
| 761 | +-- > unionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "aA"), (7, "C")] |
|---|
| 762 | + |
|---|
| 763 | hunk ./Data/Map.hs 936 |
|---|
| 764 | --- Hedge-union is more efficient on (bigset `union` smallset). |
|---|
| 765 | +-- Hedge-union is more efficient on (bigset \``union`\` smallset). |
|---|
| 766 | +-- |
|---|
| 767 | +-- > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value |
|---|
| 768 | +-- > unionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "5:a|A"), (7, "C")] |
|---|
| 769 | + |
|---|
| 770 | hunk ./Data/Map.hs 965 |
|---|
| 771 | +-- Return elements of the first map not existing in the second map. |
|---|
| 772 | hunk ./Data/Map.hs 967 |
|---|
| 773 | +-- |
|---|
| 774 | +-- > difference (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 3 "b" |
|---|
| 775 | + |
|---|
| 776 | hunk ./Data/Map.hs 986 |
|---|
| 777 | +-- When two equal keys are |
|---|
| 778 | +-- encountered, the combining function is applied to the values of these keys. |
|---|
| 779 | +-- If it returns 'Nothing', the element is discarded (proper set difference). If |
|---|
| 780 | +-- it returns (@'Just' y@), the element is updated with a new value @y@. |
|---|
| 781 | hunk ./Data/Map.hs 991 |
|---|
| 782 | +-- |
|---|
| 783 | +-- > let f al ar = if al == "b" then Just (al ++ ":" ++ ar) else Nothing |
|---|
| 784 | +-- > differenceWith f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (7, "C")]) |
|---|
| 785 | +-- > == singleton 3 "b:B" |
|---|
| 786 | + |
|---|
| 787 | hunk ./Data/Map.hs 1005 |
|---|
| 788 | +-- |
|---|
| 789 | +-- > let f k al ar = if al == "b" then Just ((show k) ++ ":" ++ al ++ "|" ++ ar) else Nothing |
|---|
| 790 | +-- > differenceWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (10, "C")]) |
|---|
| 791 | +-- > == singleton 3 "3:b|B" |
|---|
| 792 | + |
|---|
| 793 | hunk ./Data/Map.hs 1038 |
|---|
| 794 | --- | /O(n+m)/. Intersection of two maps. The values in the first |
|---|
| 795 | --- map are returned, i.e. (@'intersection' m1 m2 == 'intersectionWith' 'const' m1 m2@). |
|---|
| 796 | +-- | /O(n+m)/. Intersection of two maps. |
|---|
| 797 | +-- Return data in the first map for the keys existing in both maps. |
|---|
| 798 | +-- (@'intersection' m1 m2 == 'intersectionWith' 'const' m1 m2@). |
|---|
| 799 | +-- |
|---|
| 800 | +-- > intersection (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "a" |
|---|
| 801 | + |
|---|
| 802 | hunk ./Data/Map.hs 1049 |
|---|
| 803 | +-- |
|---|
| 804 | +-- > intersectionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "aA" |
|---|
| 805 | + |
|---|
| 806 | hunk ./Data/Map.hs 1057 |
|---|
| 807 | --- Intersection is more efficient on (bigset `intersection` smallset) |
|---|
| 808 | +-- Intersection is more efficient on (bigset \``intersection`\` smallset). |
|---|
| 809 | +-- |
|---|
| 810 | +-- > let f k al ar = (show k) ++ ":" ++ al ++ "|" ++ ar |
|---|
| 811 | +-- > intersectionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "5:a|A" |
|---|
| 812 | + |
|---|
| 813 | hunk ./Data/Map.hs 1078 |
|---|
| 814 | - |
|---|
| 815 | hunk ./Data/Map.hs 1101 |
|---|
| 816 | --- | /O(n+m)/. |
|---|
| 817 | +-- | /O(n+m)/. |
|---|
| 818 | hunk ./Data/Map.hs 1103 |
|---|
| 819 | +-- |
|---|
| 820 | hunk ./Data/Map.hs 1108 |
|---|
| 821 | -{- | /O(n+m)/. |
|---|
| 822 | +{- | /O(n+m)/. |
|---|
| 823 | hunk ./Data/Map.hs 1123 |
|---|
| 824 | + |
|---|
| 825 | + |
|---|
| 826 | hunk ./Data/Map.hs 1160 |
|---|
| 827 | + |
|---|
| 828 | + |
|---|
| 829 | hunk ./Data/Map.hs 1171 |
|---|
| 830 | +-- |
|---|
| 831 | +-- > filter (> "a") (fromList [(5,"a"), (3,"b")]) == singleton 3 "b" |
|---|
| 832 | +-- > filter (> "x") (fromList [(5,"a"), (3,"b")]) == empty |
|---|
| 833 | +-- > filter (< "a") (fromList [(5,"a"), (3,"b")]) == empty |
|---|
| 834 | + |
|---|
| 835 | hunk ./Data/Map.hs 1181 |
|---|
| 836 | +-- |
|---|
| 837 | +-- > filterWithKey (\k _ -> k > 4) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a" |
|---|
| 838 | + |
|---|
| 839 | hunk ./Data/Map.hs 1191 |
|---|
| 840 | --- | /O(n)/. partition the map according to a predicate. The first |
|---|
| 841 | +-- | /O(n)/. Partition the map according to a predicate. The first |
|---|
| 842 | hunk ./Data/Map.hs 1194 |
|---|
| 843 | +-- |
|---|
| 844 | +-- > partition (> "a") (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a") |
|---|
| 845 | +-- > partition (< "x") (fromList [(5,"a"), (3,"b")]) == (fromList [(3, "b"), (5, "a")], empty) |
|---|
| 846 | +-- > partition (> "x") (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3, "b"), (5, "a")]) |
|---|
| 847 | + |
|---|
| 848 | hunk ./Data/Map.hs 1203 |
|---|
| 849 | --- | /O(n)/. partition the map according to a predicate. The first |
|---|
| 850 | +-- | /O(n)/. Partition the map according to a predicate. The first |
|---|
| 851 | hunk ./Data/Map.hs 1206 |
|---|
| 852 | +-- |
|---|
| 853 | +-- > partitionWithKey (\ k _ -> k > 3) (fromList [(5,"a"), (3,"b")]) == (singleton 5 "a", singleton 3 "b") |
|---|
| 854 | +-- > partitionWithKey (\ k _ -> k < 7) (fromList [(5,"a"), (3,"b")]) == (fromList [(3, "b"), (5, "a")], empty) |
|---|
| 855 | +-- > partitionWithKey (\ k _ -> k > 7) (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3, "b"), (5, "a")]) |
|---|
| 856 | + |
|---|
| 857 | hunk ./Data/Map.hs 1221 |
|---|
| 858 | +-- |
|---|
| 859 | +-- > let f x = if x == "a" then Just "new a" else Nothing |
|---|
| 860 | +-- > mapMaybe f (fromList [(5,"a"), (3,"b")]) == singleton 5 "new a" |
|---|
| 861 | + |
|---|
| 862 | hunk ./Data/Map.hs 1230 |
|---|
| 863 | +-- |
|---|
| 864 | +-- > let f k _ = if k < 5 then Just ("key : " ++ (show k)) else Nothing |
|---|
| 865 | +-- > mapMaybeWithKey f (fromList [(5,"a"), (3,"b")]) == singleton 3 "key : 3" |
|---|
| 866 | + |
|---|
| 867 | hunk ./Data/Map.hs 1241 |
|---|
| 868 | +-- |
|---|
| 869 | +-- > let f a = if a < "c" then Left a else Right a |
|---|
| 870 | +-- > mapEither f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")]) |
|---|
| 871 | +-- > == (fromList [(3,"b"), (5,"a")], fromList [(1,"x"), (7,"z")]) |
|---|
| 872 | +-- > |
|---|
| 873 | +-- > mapEither (\ a -> Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")]) |
|---|
| 874 | +-- > == (empty, fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")]) |
|---|
| 875 | + |
|---|
| 876 | hunk ./Data/Map.hs 1254 |
|---|
| 877 | +-- |
|---|
| 878 | +-- > let f k a = if k < 5 then Left (k * 2) else Right (a ++ a) |
|---|
| 879 | +-- > mapEitherWithKey f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")]) |
|---|
| 880 | +-- > == (fromList [(1,2), (3,6)], fromList [(5,"aa"), (7,"zz")]) |
|---|
| 881 | +-- > |
|---|
| 882 | +-- > mapEitherWithKey (\_ a -> Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")]) |
|---|
| 883 | +-- > == (empty, fromList [(1,"x"), (3,"b"), (5,"a"), (7,"z")]) |
|---|
| 884 | + |
|---|
| 885 | hunk ./Data/Map.hs 1276 |
|---|
| 886 | +-- |
|---|
| 887 | +-- > map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")] |
|---|
| 888 | + |
|---|
| 889 | hunk ./Data/Map.hs 1284 |
|---|
| 890 | +-- |
|---|
| 891 | +-- > let f key x = (show key) ++ ":" ++ x |
|---|
| 892 | +-- > mapWithKey f (fromList [(5,"a"), (3,"b")]) == fromList [(3, "3:b"), (5, "5:a")] |
|---|
| 893 | + |
|---|
| 894 | hunk ./Data/Map.hs 1295 |
|---|
| 895 | +-- |
|---|
| 896 | +-- > let f a b = (a ++ b, b ++ "X") |
|---|
| 897 | +-- > mapAccum f "Everything: " (fromList [(5,"a"), (3,"b")]) == ("Everything: ba", fromList [(3, "bX"), (5, "aX")]) |
|---|
| 898 | + |
|---|
| 899 | hunk ./Data/Map.hs 1305 |
|---|
| 900 | +-- |
|---|
| 901 | +-- > let f a k b = (a ++ " " ++ (show k) ++ "-" ++ b, b ++ "X") |
|---|
| 902 | +-- > mapAccumWithKey f "Everything:" (fromList [(5,"a"), (3,"b")]) == ("Everything: 3-b 5-a", fromList [(3, "bX"), (5, "aX")]) |
|---|
| 903 | + |
|---|
| 904 | hunk ./Data/Map.hs 1337 |
|---|
| 905 | --- | /O(n*log n)/. |
|---|
| 906 | +-- | /O(n*log n)/. |
|---|
| 907 | hunk ./Data/Map.hs 1343 |
|---|
| 908 | +-- |
|---|
| 909 | +-- > mapKeys (+ 1) (fromList [(5,"a"), (3,"b")]) == fromList [(4, "b"), (6, "a")] |
|---|
| 910 | +-- > mapKeys (\ _ -> 1) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 1 "c" |
|---|
| 911 | +-- > mapKeys (\ _ -> 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 3 "c" |
|---|
| 912 | hunk ./Data/Map.hs 1351 |
|---|
| 913 | --- | /O(n*log n)/. |
|---|
| 914 | +-- | /O(n*log n)/. |
|---|
| 915 | hunk ./Data/Map.hs 1357 |
|---|
| 916 | +-- |
|---|
| 917 | +-- > mapKeysWith (++) (\ _ -> 1) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 1 "cdab" |
|---|
| 918 | +-- > mapKeysWith (++) (\ _ -> 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 3 "cdab" |
|---|
| 919 | hunk ./Data/Map.hs 1369 |
|---|
| 920 | +-- That is, for any values @x@ and @y@, if @x@ < @y@ then @f x@ < @f y@. |
|---|
| 921 | hunk ./Data/Map.hs 1376 |
|---|
| 922 | +-- |
|---|
| 923 | +-- This means that @f@ maps distinct original keys to distinct resulting keys. |
|---|
| 924 | +-- This function has better performance than 'mapKeys'. |
|---|
| 925 | +-- |
|---|
| 926 | +-- > mapKeysMonotonic (\ k -> k * 2) (fromList [(5,"a"), (3,"b")]) == fromList [(6, "b"), (10, "a")] |
|---|
| 927 | +-- > valid (mapKeysMonotonic (\ k -> k * 2) (fromList [(5,"a"), (3,"b")])) == True |
|---|
| 928 | +-- > valid (mapKeysMonotonic (\ _ -> 1) (fromList [(5,"a"), (3,"b")])) == False |
|---|
| 929 | hunk ./Data/Map.hs 1399 |
|---|
| 930 | +-- > let f a len = len + (length a) |
|---|
| 931 | +-- > fold f 0 (fromList [(5,"a"), (3,"bbb")]) == 4 |
|---|
| 932 | + |
|---|
| 933 | hunk ./Data/Map.hs 1412 |
|---|
| 934 | +-- > let f k a result = result ++ "(" ++ (show k) ++ ":" ++ a ++ ")" |
|---|
| 935 | +-- > foldWithKey f "Map: " (fromList [(5,"a"), (3,"b")]) == "Map: (5:a)(3:b)" |
|---|
| 936 | + |
|---|
| 937 | hunk ./Data/Map.hs 1439 |
|---|
| 938 | +-- |
|---|
| 939 | +-- > elems (fromList [(5,"a"), (3,"b")]) == ["b","a"] |
|---|
| 940 | +-- > elems empty == [] |
|---|
| 941 | + |
|---|
| 942 | hunk ./Data/Map.hs 1448 |
|---|
| 943 | +-- |
|---|
| 944 | +-- > keys (fromList [(5,"a"), (3,"b")]) == [3,5] |
|---|
| 945 | +-- > keys empty == [] |
|---|
| 946 | + |
|---|
| 947 | hunk ./Data/Map.hs 1457 |
|---|
| 948 | +-- |
|---|
| 949 | +-- > keysSet (fromList [(5,"a"), (3,"b")]) == Data.Set.fromList [3,5] |
|---|
| 950 | +-- > keysSet empty == Data.Set.empty |
|---|
| 951 | + |
|---|
| 952 | hunk ./Data/Map.hs 1465 |
|---|
| 953 | +-- |
|---|
| 954 | +-- > assocs (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")] |
|---|
| 955 | +-- > assocs empty == [] |
|---|
| 956 | + |
|---|
| 957 | hunk ./Data/Map.hs 1478 |
|---|
| 958 | +-- If the list contains more than one value for the same key, the last value |
|---|
| 959 | +-- for the key is retained. |
|---|
| 960 | +-- |
|---|
| 961 | +-- > fromList [] == empty |
|---|
| 962 | +-- > fromList [(5,"a"), (3,"b"), (5, "c")] == fromList [(5,"c"), (3,"b")] |
|---|
| 963 | +-- > fromList [(5,"c"), (3,"b"), (5, "a")] == fromList [(5,"a"), (3,"b")] |
|---|
| 964 | + |
|---|
| 965 | hunk ./Data/Map.hs 1492 |
|---|
| 966 | +-- |
|---|
| 967 | +-- > fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "ab"), (5, "aba")] |
|---|
| 968 | +-- > fromListWith (++) [] == empty |
|---|
| 969 | + |
|---|
| 970 | hunk ./Data/Map.hs 1501 |
|---|
| 971 | +-- |
|---|
| 972 | +-- > let f k a1 a2 = (show k) ++ a1 ++ a2 |
|---|
| 973 | +-- > fromListWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "3ab"), (5, "5a5ba")] |
|---|
| 974 | +-- > fromListWithKey f [] == empty |
|---|
| 975 | + |
|---|
| 976 | hunk ./Data/Map.hs 1513 |
|---|
| 977 | +-- |
|---|
| 978 | +-- > toList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")] |
|---|
| 979 | +-- > toList empty == [] |
|---|
| 980 | + |
|---|
| 981 | hunk ./Data/Map.hs 1521 |
|---|
| 982 | +-- |
|---|
| 983 | +-- > toAscList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")] |
|---|
| 984 | + |
|---|
| 985 | hunk ./Data/Map.hs 1527 |
|---|
| 986 | --- | /O(n)/. |
|---|
| 987 | +-- | /O(n)/. |
|---|
| 988 | hunk ./Data/Map.hs 1541 |
|---|
| 989 | +-- |
|---|
| 990 | +-- > fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")] |
|---|
| 991 | +-- > fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")] |
|---|
| 992 | +-- > valid (fromAscList [(3,"b"), (5,"a"), (5,"b")]) == True |
|---|
| 993 | +-- > valid (fromAscList [(5,"a"), (3,"b"), (5,"b")]) == False |
|---|
| 994 | + |
|---|
| 995 | hunk ./Data/Map.hs 1553 |
|---|
| 996 | +-- |
|---|
| 997 | +-- > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")] |
|---|
| 998 | +-- > valid (fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")]) == True |
|---|
| 999 | +-- > valid (fromAscListWith (++) [(5,"a"), (3,"b"), (5,"b")]) == False |
|---|
| 1000 | + |
|---|
| 1001 | hunk ./Data/Map.hs 1565 |
|---|
| 1002 | +-- |
|---|
| 1003 | +-- > let f k a1 a2 = (show k) ++ ":" ++ a1 ++ a2 |
|---|
| 1004 | +-- > fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b"), (5,"b")] == fromList [(3, "b"), (5, "5:b5:ba")] |
|---|
| 1005 | +-- > valid (fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b"), (5,"b")]) == True |
|---|
| 1006 | +-- > valid (fromAscListWithKey f [(5,"a"), (3,"b"), (5,"b"), (5,"b")]) == False |
|---|
| 1007 | + |
|---|
| 1008 | hunk ./Data/Map.hs 1590 |
|---|
| 1009 | +-- |
|---|
| 1010 | +-- > fromDistinctAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")] |
|---|
| 1011 | +-- > valid (fromDistinctAscList [(3,"b"), (5,"a")]) == True |
|---|
| 1012 | +-- > valid (fromDistinctAscList [(3,"b"), (5,"a"), (5,"b")]) == False |
|---|
| 1013 | + |
|---|
| 1014 | hunk ./Data/Map.hs 1681 |
|---|
| 1015 | --- the keys in @map1@ are smaller than @k@ and the keys in @map2@ larger than @k@. Any key equal to @k@ is found in neither @map1@ nor @map2@. |
|---|
| 1016 | +-- the keys in @map1@ are smaller than @k@ and the keys in @map2@ larger than @k@. |
|---|
| 1017 | +-- Any key equal to @k@ is found in neither @map1@ nor @map2@. |
|---|
| 1018 | +-- |
|---|
| 1019 | +-- > split 2 (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3,"b"), (5,"a")]) |
|---|
| 1020 | +-- > split 3 (fromList [(5,"a"), (3,"b")]) == (empty, singleton 5 "a") |
|---|
| 1021 | +-- > split 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a") |
|---|
| 1022 | +-- > split 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", empty) |
|---|
| 1023 | +-- > split 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], empty) |
|---|
| 1024 | + |
|---|
| 1025 | hunk ./Data/Map.hs 1700 |
|---|
| 1026 | +-- |
|---|
| 1027 | +-- > splitLookup 2 (fromList [(5,"a"), (3,"b")]) == (empty, Nothing, fromList [(3,"b"), (5,"a")]) |
|---|
| 1028 | +-- > splitLookup 3 (fromList [(5,"a"), (3,"b")]) == (empty, Just "b", singleton 5 "a") |
|---|
| 1029 | +-- > splitLookup 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", Nothing, singleton 5 "a") |
|---|
| 1030 | +-- > splitLookup 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", Just "a", empty) |
|---|
| 1031 | +-- > splitLookup 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], Nothing, empty) |
|---|
| 1032 | + |
|---|
| 1033 | hunk ./Data/Map.hs 1810 |
|---|
| 1034 | +-- |
|---|
| 1035 | +-- > deleteFindMin (fromList [(5,"a"), (3,"b"), (10,"c")]) == ((3,"b"), fromList[(5,"a"), (10,"c")]) |
|---|
| 1036 | +-- > deleteFindMin Error: can not return the minimal element of an empty map |
|---|
| 1037 | + |
|---|
| 1038 | hunk ./Data/Map.hs 1822 |
|---|
| 1039 | +-- |
|---|
| 1040 | +-- > deleteFindMax (fromList [(5,"a"), (3,"b"), (10,"c")]) == ((10,"c"), fromList [(3,"b"), (5,"a")]) |
|---|
| 1041 | +-- > deleteFindMax empty Error: can not return the maximal element of an empty map |
|---|
| 1042 | + |
|---|
| 1043 | hunk ./Data/Map.hs 1980 |
|---|
| 1044 | --- in a compressed, hanging format. |
|---|
| 1045 | +-- in a compressed, hanging format. See 'showTreeWith'. |
|---|
| 1046 | hunk ./Data/Map.hs 2081 |
|---|
| 1047 | +-- |
|---|
| 1048 | +-- > valid (fromAscList [(3,"b"), (5,"a")]) == True |
|---|
| 1049 | +-- > valid (fromAscList [(5,"a"), (3,"b")]) == False |
|---|
| 1050 | + |
|---|
| 1051 | } |
|---|
| 1052 | |
|---|
| 1053 | Context: |
|---|
| 1054 | |
|---|
| 1055 | [Clarify the swapMVar haddock doc |
|---|
| 1056 | Ian Lynagh <igloo@earth.li>**20070807185557] |
|---|
| 1057 | [fix Haddock markup |
|---|
| 1058 | Simon Marlow <simonmar@microsoft.com>**20070802081717] |
|---|
| 1059 | [Temporarily fix breakage for nhc98. |
|---|
| 1060 | Malcolm.Wallace@cs.york.ac.uk**20070801163750 |
|---|
| 1061 | A recent patch to System.IO introduced a cyclic dependency on Foreign.C.Error, |
|---|
| 1062 | and also inadvertently dragged along System.Posix.Internals which has |
|---|
| 1063 | non-H'98 layout, causing many build problems. The solution for now |
|---|
| 1064 | is to #ifndef __NHC__ all of the recent the openTempFile additions, |
|---|
| 1065 | and mark them non-portable once again. (I also took the opportunity |
|---|
| 1066 | to note a number of other non-portable functions in their Haddock |
|---|
| 1067 | comments.) |
|---|
| 1068 | ] |
|---|
| 1069 | [Generalise the type of synthesize, as suggested by Trac #1571 |
|---|
| 1070 | simonpj@microsoft**20070801125208 |
|---|
| 1071 | |
|---|
| 1072 | I have not looked at the details, but the type checker is happy with the |
|---|
| 1073 | more general type, and more general types are usually a Good Thing. |
|---|
| 1074 | |
|---|
| 1075 | ] |
|---|
| 1076 | [Fix fdToHandle on Windows |
|---|
| 1077 | Ian Lynagh <igloo@earth.li>**20070730133139 |
|---|
| 1078 | The old setmode code was throwing an exception, and I'm not sure it is |
|---|
| 1079 | meant to do what we need anyway. For now we assume that all FDs are |
|---|
| 1080 | both readable and writable. |
|---|
| 1081 | ] |
|---|
| 1082 | [Correct Windows OS name in cabal configuration |
|---|
| 1083 | Ian Lynagh <igloo@earth.li>**20070729161739] |
|---|
| 1084 | [Use cabal configurations rather than Setup hacks |
|---|
| 1085 | Ian Lynagh <igloo@earth.li>**20070729132157] |
|---|
| 1086 | [Handle buffers should be allocated with newPinnedByteArray# always |
|---|
| 1087 | Simon Marlow <simonmar@microsoft.com>**20070725095550 |
|---|
| 1088 | Not just on Windows. This change is required because we now use safe |
|---|
| 1089 | foreign calls for I/O on blocking file descriptors with the threaded |
|---|
| 1090 | RTS. Exposed by concio001.thr on MacOS X: MacOS apparently uses |
|---|
| 1091 | smaller buffers by default, so they weren't being allocated as large |
|---|
| 1092 | objects. |
|---|
| 1093 | |
|---|
| 1094 | ] |
|---|
| 1095 | [fix Hugs implementation of openTempFile |
|---|
| 1096 | Ross Paterson <ross@soi.city.ac.uk>**20070724114003] |
|---|
| 1097 | [Hugs only: avoid dependency cycle |
|---|
| 1098 | Ross Paterson <ross@soi.city.ac.uk>**20070724113852] |
|---|
| 1099 | [open(Binary)TempFile is now portable |
|---|
| 1100 | Ian Lynagh <igloo@earth.li>**20070722152752] |
|---|
| 1101 | [Tweak temporary file filename chooser |
|---|
| 1102 | Ian Lynagh <igloo@earth.li>**20070722105445] |
|---|
| 1103 | [Move open(Binary)TempFile to System.IO |
|---|
| 1104 | Ian Lynagh <igloo@earth.li>**20070722010205] |
|---|
| 1105 | [Rename openFd to fdToHandle' |
|---|
| 1106 | Ian Lynagh <igloo@earth.li>**20070721235538 |
|---|
| 1107 | The name collision with System.Posix.IO.openFd made my brain hurt. |
|---|
| 1108 | ] |
|---|
| 1109 | [Add a test for Data.Map, for a bug on the libraries@ list |
|---|
| 1110 | Ian Lynagh <igloo@earth.li>**20070721002119] |
|---|
| 1111 | [fix Data.Map.updateAt |
|---|
| 1112 | Bertram Felgenhauer <int-e@gmx.de>**20070718150340 |
|---|
| 1113 | See http://haskell.org/pipermail/libraries/2007-July/007785.html for a piece |
|---|
| 1114 | of code triggering the bug. updateAt threw away parts of the tree making up |
|---|
| 1115 | the map. |
|---|
| 1116 | ] |
|---|
| 1117 | [in hClose, free the handle buffer by replacing it with an empty one |
|---|
| 1118 | Simon Marlow <simonmar@microsoft.com>**20070719161419 |
|---|
| 1119 | This helps reduce the memory requirements for a closed but unfinalised |
|---|
| 1120 | Handle. |
|---|
| 1121 | ] |
|---|
| 1122 | [Implement GHC.Environment.getFullArgs |
|---|
| 1123 | Ian Lynagh <igloo@earth.li>**20070717141918 |
|---|
| 1124 | This returns all the arguments, including those normally eaten by the |
|---|
| 1125 | RTS (+RTS ... -RTS). |
|---|
| 1126 | This is mainly for ghc-inplace, where we need to pass /all/ the |
|---|
| 1127 | arguments on to the real ghc. e.g. ioref001(ghci) was failing because |
|---|
| 1128 | the +RTS -K32m -RTS wasn't getting passed on. |
|---|
| 1129 | ] |
|---|
| 1130 | [Define stripPrefix; fixes trac #1464 |
|---|
| 1131 | Ian Lynagh <igloo@earth.li>**20070714235204] |
|---|
| 1132 | [no need to hide Maybe |
|---|
| 1133 | Malcolm.Wallace@cs.york.ac.uk**20070710154058] |
|---|
| 1134 | [Add a more efficient Data.List.foldl' for GHC (from GHC's utils/Util.lhs) |
|---|
| 1135 | Ian Lynagh <igloo@earth.li>**20070706205526] |
|---|
| 1136 | [Remove include-dirs ../../includes and ../../rts |
|---|
| 1137 | Ian Lynagh <igloo@earth.li>**20070705205356 |
|---|
| 1138 | We get these by virtue of depending on the rts package. |
|---|
| 1139 | ] |
|---|
| 1140 | [FIX #1131 (newArray_ allocates an array full of garbage) |
|---|
| 1141 | Simon Marlow <simonmar@microsoft.com>**20070704102020 |
|---|
| 1142 | Now newArray_ returns a deterministic result in the ST monad, and |
|---|
| 1143 | behaves as before in other contexts. The current newArray_ is renamed |
|---|
| 1144 | to unsafeNewArray_; the MArray class therefore has one more method |
|---|
| 1145 | than before. |
|---|
| 1146 | ] |
|---|
| 1147 | [change nhc98 option from -prelude to --prelude |
|---|
| 1148 | Malcolm.Wallace@cs.york.ac.uk**20070702150355] |
|---|
| 1149 | [Word is a type synonym in nhc98 - so class instance not permitted. |
|---|
| 1150 | Malcolm.Wallace@cs.york.ac.uk**20070629122035] |
|---|
| 1151 | [fix bug in writes to blocking FDs in the non-threaded RTS |
|---|
| 1152 | Simon Marlow <simonmar@microsoft.com>**20070628134320] |
|---|
| 1153 | [Modernize printf. |
|---|
| 1154 | lennart.augustsson@credit-suisse.com**20070628083852 |
|---|
| 1155 | |
|---|
| 1156 | Add instances for Int8, Int16, Int32, Int64, Word, Word8, Word16, Word32, and |
|---|
| 1157 | Word64. |
|---|
| 1158 | Handle + flag. |
|---|
| 1159 | Handle X, E, and G formatting characters. |
|---|
| 1160 | Rewrite internals to make it simpler. |
|---|
| 1161 | ] |
|---|
| 1162 | [Speed up number printing and remove the need for Array by using the standard 'intToDigit' routine |
|---|
| 1163 | John Meacham <john@repetae.net>**20070608182353] |
|---|
| 1164 | [Use "-- //" (2 spaces) rather than "-- //" (1) to avoid tripping haddock up |
|---|
| 1165 | Ian Lynagh <igloo@earth.li>**20070627010930 |
|---|
| 1166 | Are we nearly there yet? |
|---|
| 1167 | ] |
|---|
| 1168 | [Use a combination of Haskell/C comments to ensure robustness. |
|---|
| 1169 | Malcolm.Wallace@cs.york.ac.uk**20070626095222 |
|---|
| 1170 | e.g. -- // ensures that _no_ preprocessor will try to tokenise the |
|---|
| 1171 | rest of the line. |
|---|
| 1172 | ] |
|---|
| 1173 | [Change C-style comments to Haskell-style. |
|---|
| 1174 | Malcolm.Wallace@cs.york.ac.uk**20070625094515 |
|---|
| 1175 | These two headers are only ever used for pre-processing Haskell code, |
|---|
| 1176 | and are never seen by any C tools except cpp. Using the Haskell comment |
|---|
| 1177 | convention means that cpphs no longer needs to be given the --strip |
|---|
| 1178 | option to remove C comments from open code. This is a Good Thing, |
|---|
| 1179 | because all of /* */ and // are valid Haskell operator names, and there |
|---|
| 1180 | is no compelling reason to forbid using them in files which also happen |
|---|
| 1181 | to have C-preprocessor directives. |
|---|
| 1182 | ] |
|---|
| 1183 | [makefileHook needs to generate PrimopWrappers.hs too |
|---|
| 1184 | Simon Marlow <simonmar@microsoft.com>**20070622073424] |
|---|
| 1185 | [Hugs now gets MonadFix(mfix) from its prelude |
|---|
| 1186 | Ross Paterson <ross@soi.city.ac.uk>**20070620000343] |
|---|
| 1187 | [Typo (consUtils.hs -> consUtils.h) |
|---|
| 1188 | Ian Lynagh <igloo@earth.li>**20070619124140] |
|---|
| 1189 | [install dependent include files and Typeable.h |
|---|
| 1190 | Bertram Felgenhauer <int-e@gmx.de>**20070613041734] |
|---|
| 1191 | [update prototype following inputReady->fdReady change |
|---|
| 1192 | Simon Marlow <simonmar@microsoft.com>**20070614095309] |
|---|
| 1193 | [FIX hGetBuf001: cut-and-pasto in readRawBufferNoBlock |
|---|
| 1194 | Simon Marlow <simonmar@microsoft.com>**20070614094222] |
|---|
| 1195 | [fix description of CWStringLen |
|---|
| 1196 | Ross Paterson <ross@soi.city.ac.uk>**20070605223345] |
|---|
| 1197 | [Remove unsafeCoerce-importing kludgery in favor of Unsafe.Coerce |
|---|
| 1198 | Isaac Dupree <id@isaac.cedarswampstudios.org>**20070601203625] |
|---|
| 1199 | [--configure-option and --ghc-option are now provided by Cabal |
|---|
| 1200 | Ross Paterson <ross@soi.city.ac.uk>**20070604115233] |
|---|
| 1201 | [Data.PackedString: Data.Generics is GHC-only |
|---|
| 1202 | Ross Paterson <ross@soi.city.ac.uk>**20070529232427] |
|---|
| 1203 | [Add Data instance for PackedString; patch from greenrd in trac #1263 |
|---|
| 1204 | Ian Lynagh <igloo@earth.li>**20070529205420] |
|---|
| 1205 | [Control.Concurrent documentation fix |
|---|
| 1206 | shae@ScannedInAvian.com**20070524163325] |
|---|
| 1207 | [add nhc98-options: field to .cabal file |
|---|
| 1208 | Malcolm.Wallace@cs.york.ac.uk**20070528122626] |
|---|
| 1209 | [add a dummy implementation of System.Timeout.timeout for nhc98 |
|---|
| 1210 | Malcolm.Wallace@cs.york.ac.uk**20070528110309] |
|---|
| 1211 | [Add System.Timeout to base.cabal |
|---|
| 1212 | Ian Lynagh <igloo@earth.li>**20070527123314 |
|---|
| 1213 | Filtered out for non-GHC by Setup.hs. |
|---|
| 1214 | ] |
|---|
| 1215 | [add module Data.Fixed to nhc98 build |
|---|
| 1216 | Malcolm.Wallace@cs.york.ac.uk**20070525141021] |
|---|
| 1217 | [DIRS now lives in package Makefile, not script/pkgdirlist |
|---|
| 1218 | Malcolm.Wallace@cs.york.ac.uk**20070525111749] |
|---|
| 1219 | [delete unused constants |
|---|
| 1220 | Ross Paterson <ross@soi.city.ac.uk>**20070525001741] |
|---|
| 1221 | [remove System.Cmd and System.Time too |
|---|
| 1222 | Malcolm.Wallace@cs.york.ac.uk**20070524163200] |
|---|
| 1223 | [remove locale as well |
|---|
| 1224 | Malcolm.Wallace@cs.york.ac.uk**20070524161943] |
|---|
| 1225 | [nhc98 version of instance Show (a->b) copied from Prelude |
|---|
| 1226 | Malcolm.Wallace@cs.york.ac.uk**20070524160615] |
|---|
| 1227 | [remove directory, pretty, and random bits from base for nhc98 |
|---|
| 1228 | Malcolm.Wallace@cs.york.ac.uk**20070524160608] |
|---|
| 1229 | [Remove Makefile and package.conf.in (used in the old build system) |
|---|
| 1230 | Ian Lynagh <igloo@earth.li>**20070524142545] |
|---|
| 1231 | [Split off process package |
|---|
| 1232 | Ian Lynagh <igloo@earth.li>**20070523210523] |
|---|
| 1233 | [Fix comment: maperrno is in Win32Utils.c, not runProcess.c |
|---|
| 1234 | Ian Lynagh <igloo@earth.li>**20070523181331] |
|---|
| 1235 | [System.Locale is now split out |
|---|
| 1236 | Ian Lynagh <igloo@earth.li>**20070519132638] |
|---|
| 1237 | [Split off directory, random and old-time packages |
|---|
| 1238 | Ian Lynagh <igloo@earth.li>**20070519120642] |
|---|
| 1239 | [Remove Control.Parallel*, now in package parallel |
|---|
| 1240 | Ian Lynagh <igloo@earth.li>**20070518165431] |
|---|
| 1241 | [Remove the pretty-printing modules (now in package pretty( |
|---|
| 1242 | Ian Lynagh <igloo@earth.li>**20070518162521] |
|---|
| 1243 | [add install-includes: field |
|---|
| 1244 | Simon Marlow <simonmar@microsoft.com>**20070517094948] |
|---|
| 1245 | [correct the documentation for newForeignPtr |
|---|
| 1246 | Simon Marlow <simonmar@microsoft.com>**20070516082019] |
|---|
| 1247 | [When doing safe writes, handle EAGAIN rather than raising an exception |
|---|
| 1248 | Simon Marlow <simonmar@microsoft.com>**20070515114615 |
|---|
| 1249 | It might be that stdin was set to O_NONBLOCK by someone else, and we |
|---|
| 1250 | should handle this case. (this happens with GHCi, I'm not quite sure why) |
|---|
| 1251 | ] |
|---|
| 1252 | [Use FilePath to make paths when building GHC/Prim.hs and GHC/PrimopWrappers.hs |
|---|
| 1253 | Ian Lynagh <igloo@earth.li>**20070514110409] |
|---|
| 1254 | [Build GHC/Prim.hs and GHC/PrimopWrappers.hs from Cabal |
|---|
| 1255 | Ian Lynagh <igloo@earth.li>**20070509142655] |
|---|
| 1256 | [fix imports for non-GHC |
|---|
| 1257 | Ross Paterson <ross@soi.city.ac.uk>**20070513001138] |
|---|
| 1258 | [Give an example of how intersection takes elements from the first set |
|---|
| 1259 | Ian Lynagh <igloo@earth.li>**20070512160253] |
|---|
| 1260 | [further clarify the docs for 'evaluate' |
|---|
| 1261 | Malcolm.Wallace@cs.york.ac.uk**20070508101124] |
|---|
| 1262 | [improve documentation for evaluate |
|---|
| 1263 | Simon Marlow <simonmar@microsoft.com>**20070508081712] |
|---|
| 1264 | [FIX: #724 (tee complains if used in a process started by ghc) |
|---|
| 1265 | Simon Marlow <simonmar@microsoft.com>**20070507123537 |
|---|
| 1266 | |
|---|
| 1267 | Now, we only set O_NONBLOCK on file descriptors that we create |
|---|
| 1268 | ourselves. File descriptors that we inherit (stdin, stdout, stderr) |
|---|
| 1269 | are kept in blocking mode. The way we deal with this differs between |
|---|
| 1270 | the threaded and non-threaded runtimes: |
|---|
| 1271 | |
|---|
| 1272 | - with -threaded, we just make a safe foreign call to read(), which |
|---|
| 1273 | may block, but this is ok. |
|---|
| 1274 | |
|---|
| 1275 | - without -threaded, we test the descriptor with select() before |
|---|
| 1276 | attempting any I/O. This isn't completely safe - someone else |
|---|
| 1277 | might read the data between the select() and the read() - but it's |
|---|
| 1278 | a reasonable compromise and doesn't seem to measurably affect |
|---|
| 1279 | performance. |
|---|
| 1280 | ] |
|---|
| 1281 | [the "unknown" types are no longer required |
|---|
| 1282 | Simon Marlow <simonmar@microsoft.com>**20070426135931] |
|---|
| 1283 | [Make Control.Exception buildable by nhc98. |
|---|
| 1284 | Malcolm.Wallace@cs.york.ac.uk**20070504105548 |
|---|
| 1285 | The nhc98 does not have true exceptions, but these additions should be |
|---|
| 1286 | enough infrastructure to pretend that it does. Only IO exceptions will |
|---|
| 1287 | actually work. |
|---|
| 1288 | ] |
|---|
| 1289 | [Trim imports, remove a cycle |
|---|
| 1290 | simonpj@microsoft**20070503123010 |
|---|
| 1291 | |
|---|
| 1292 | A first attempt at removing gratuitous cycles in the base package. |
|---|
| 1293 | I've removed the useless module GHC.Dynamic, which gets rid of a cycle; |
|---|
| 1294 | and trimmed off various unnecesary imports. |
|---|
| 1295 | |
|---|
| 1296 | This also fixes the IsString import problem. |
|---|
| 1297 | |
|---|
| 1298 | ] |
|---|
| 1299 | [Be less quiet about building the base package |
|---|
| 1300 | simonpj@microsoft**20070503093707] |
|---|
| 1301 | [Remove Splittable class (a vestige of linear implicit parameters) |
|---|
| 1302 | simonpj@microsoft**20070221104329] |
|---|
| 1303 | [Add IsString to exports of GHC.Exts |
|---|
| 1304 | simonpj@microsoft**20070221104249] |
|---|
| 1305 | [tweak documentation as per suggestion from Marc Weber on libraries@haskell.org |
|---|
| 1306 | Simon Marlow <simonmar@microsoft.com>**20070426075921] |
|---|
| 1307 | [Add extra libraries when compiling with GHC on Windows |
|---|
| 1308 | Ian Lynagh <igloo@earth.li>**20070424213127] |
|---|
| 1309 | [Follow Cabal changes in Setup.hs |
|---|
| 1310 | Ian Lynagh <igloo@earth.li>**20070418114345] |
|---|
| 1311 | [inclusion of libc.h is conditional on __APPLE__ |
|---|
| 1312 | Malcolm.Wallace@cs.york.ac.uk**20070417085556] |
|---|
| 1313 | [MERGE: fix ugly uses of memcpy foreign import inside ST |
|---|
| 1314 | Simon Marlow <simonmar@microsoft.com>**20070416101530 |
|---|
| 1315 | fixes cg026 |
|---|
| 1316 | ] |
|---|
| 1317 | [Fix configure with no --with-cc |
|---|
| 1318 | Ian Lynagh <igloo@earth.li>**20070415165143] |
|---|
| 1319 | [MacOS 10.3 needs #include <libc.h> as well |
|---|
| 1320 | Malcolm.Wallace@cs.york.ac.uk**20070414155507] |
|---|
| 1321 | [For nhc98 only, use hsc2hs to determine System.Posix.Types. |
|---|
| 1322 | Malcolm.Wallace@cs.york.ac.uk**20070413155831 |
|---|
| 1323 | Avoids the existing autoconf stuff, by introducing an auxiliary module |
|---|
| 1324 | called NHC.PosixTypes that uses hsc2hs, which is then simply re-exported |
|---|
| 1325 | from System.Posix.Types. |
|---|
| 1326 | ] |
|---|
| 1327 | [we need a makefileHook too |
|---|
| 1328 | Simon Marlow <simonmar@microsoft.com>**20070413151307] |
|---|
| 1329 | [Remove unnecesary SOURCE import of GHC.Err in GHC.Pack |
|---|
| 1330 | Ian Lynagh <igloo@earth.li>**20070412235908] |
|---|
| 1331 | [add System.Posix.Types to default nhc98 build |
|---|
| 1332 | Malcolm.Wallace@cs.york.ac.uk**20070412195026] |
|---|
| 1333 | [mark System.IO.openTempFile as non-portable in haddocks |
|---|
| 1334 | Malcolm.Wallace@cs.york.ac.uk**20070412135359] |
|---|
| 1335 | [Don't turn on -Werror in Data.Fixed |
|---|
| 1336 | Ian Lynagh <igloo@earth.li>**20070411155721 |
|---|
| 1337 | This may be responsible for the x86_64/Linux nightly build failing. |
|---|
| 1338 | ] |
|---|
| 1339 | [Fix -Wall warnings |
|---|
| 1340 | Ian Lynagh <igloo@earth.li>**20070411004929] |
|---|
| 1341 | [Add missing case in removePrefix |
|---|
| 1342 | Ian Lynagh <igloo@earth.li>**20070411002537] |
|---|
| 1343 | [Allow additional options to pass on to ./configure to be given |
|---|
| 1344 | Ian Lynagh <igloo@earth.li>**20070406151856] |
|---|
| 1345 | [Hugs only: fix location of unsafeCoerce |
|---|
| 1346 | Ross Paterson <ross@soi.city.ac.uk>**20070406113731] |
|---|
| 1347 | [fix isPortableBuild test |
|---|
| 1348 | Ross Paterson <ross@soi.city.ac.uk>**20070406111304] |
|---|
| 1349 | [Unsafe.Coerce doesn't need Prelude |
|---|
| 1350 | Ian Lynagh <igloo@earth.li>**20070405175930] |
|---|
| 1351 | [make Setup and base.cabal suitable for building the libraries with GHC |
|---|
| 1352 | Ian Lynagh <igloo@earth.li>**20070308163824] |
|---|
| 1353 | [HsByteArray doesn't exist |
|---|
| 1354 | Ian Lynagh <igloo@earth.li>**20070404163051] |
|---|
| 1355 | [Don't use Fd/FD in foreign decls |
|---|
| 1356 | Ian Lynagh <igloo@earth.li>**20070404155822 |
|---|
| 1357 | Using CInt makes it much easier to verify that it is right, and we won't |
|---|
| 1358 | get caught out by possible newtype switches between CInt/Int. |
|---|
| 1359 | ] |
|---|
| 1360 | [HsByteArray doesn't exist |
|---|
| 1361 | Ian Lynagh <igloo@earth.li>**20070404155732] |
|---|
| 1362 | [Fix braino |
|---|
| 1363 | Ian Lynagh <igloo@earth.li>**20070404144508] |
|---|
| 1364 | [Fix incorrect changes to C types in a foreign import for nhc98. |
|---|
| 1365 | Malcolm.Wallace@cs.york.ac.uk**20070404120954 |
|---|
| 1366 | If we use type CTime, it needs to be imported. Also, CTime is not an |
|---|
| 1367 | instance of Integral, so use some other mechanism to convert it. |
|---|
| 1368 | ] |
|---|
| 1369 | [Fix C/Haskell type mismatches |
|---|
| 1370 | Ian Lynagh <igloo@earth.li>**20070403194943] |
|---|
| 1371 | [add new module Unsafe.Coerce to build system |
|---|
| 1372 | Malcolm.Wallace@cs.york.ac.uk**20070403131333] |
|---|
| 1373 | [Fix type mismatches between foreign imports and HsBase.h |
|---|
| 1374 | Ian Lynagh <igloo@earth.li>**20070403001611 |
|---|
| 1375 | |
|---|
| 1376 | Merge to stable, checking for interface changes. |
|---|
| 1377 | ] |
|---|
| 1378 | [put 'unsafeCoerce' in a standard location |
|---|
| 1379 | Malcolm.Wallace@cs.york.ac.uk**20061113114103] |
|---|
| 1380 | [fix for nhc98 build |
|---|
| 1381 | Malcolm.Wallace@cs.york.ac.uk**20070402141712] |
|---|
| 1382 | [Function crossMapP for fixing desugaring of comprehensions |
|---|
| 1383 | Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20070402082906 |
|---|
| 1384 | |
|---|
| 1385 | Merge into 6.6 branch. |
|---|
| 1386 | ] |
|---|
| 1387 | [Add min/max handling operations for IntSet/IntMap |
|---|
| 1388 | jeanphilippe.bernardy@gmail.com**20070315072352] |
|---|
| 1389 | [Monoid instance for Maybe and two wrappers: First and Last. trac proposal #1189 |
|---|
| 1390 | Jeffrey Yasskin <jyasskin@gmail.com>**20070309062550] |
|---|
| 1391 | [Fix the type of wgencat |
|---|
| 1392 | Ian Lynagh <igloo@earth.li>**20070329164223] |
|---|
| 1393 | [fix strictness of foldr/build rule for take, see #1219 |
|---|
| 1394 | Simon Marlow <simonmar@microsoft.com>**20070327103941] |
|---|
| 1395 | [remove Makefile.inc (only affects nhc98) |
|---|
| 1396 | Malcolm.Wallace@cs.york.ac.uk**20070320120057] |
|---|
| 1397 | [copyBytes copies bytes, not elements; fixes trac #1203 |
|---|
| 1398 | Ian Lynagh <igloo@earth.li>**20070312113555] |
|---|
| 1399 | [Add ioeGetLocation, ioeSetLocation to System/IO/Error.hs; trac #1191 |
|---|
| 1400 | Ian Lynagh <igloo@earth.li>**20070304130315] |
|---|
| 1401 | [fix race condition in prodServiceThread |
|---|
| 1402 | Simon Marlow <simonmar@microsoft.com>**20070307134330 |
|---|
| 1403 | See #1187 |
|---|
| 1404 | ] |
|---|
| 1405 | [Prevent duplication of unsafePerformIO on a multiprocessor |
|---|
| 1406 | Simon Marlow <simonmar@microsoft.com>**20070306145424 |
|---|
| 1407 | Fixes #986. The idea is to add a new operation |
|---|
| 1408 | |
|---|
| 1409 | noDuplicate :: IO () |
|---|
| 1410 | |
|---|
| 1411 | it is guaranteed that if two threads have executed noDuplicate, then |
|---|
| 1412 | they are not duplicating any computation. |
|---|
| 1413 | |
|---|
| 1414 | We now provide two new unsafe operations: |
|---|
| 1415 | |
|---|
| 1416 | unsafeDupablePerformIO :: IO a -> a |
|---|
| 1417 | unsafeDupableInterleaveIO :: IO a -> IO a |
|---|
| 1418 | |
|---|
| 1419 | which are equivalent to the old unsafePerformIO and unsafeInterleaveIO |
|---|
| 1420 | respectively. The new versions of these functions are defined as: |
|---|
| 1421 | |
|---|
| 1422 | unsafePerformIO m = unsafeDupablePerformIO (noDuplicate >> m) |
|---|
| 1423 | unsafeInterleaveIO m = unsafeDupableInterleaveIO (noDuplicate >> m) |
|---|
| 1424 | ] |
|---|
| 1425 | [expand docs for forkOS |
|---|
| 1426 | Simon Marlow <simonmar@microsoft.com>**20070305160921] |
|---|
| 1427 | [document timeout limitations |
|---|
| 1428 | Peter Simons <simons@cryp.to>**20070228223540] |
|---|
| 1429 | [So many people were involved in the writing of this module that |
|---|
| 1430 | Peter Simons <simons@cryp.to>**20070228223415 |
|---|
| 1431 | it feels unfair to single anyone out as the lone copyright |
|---|
| 1432 | holder. |
|---|
| 1433 | ] |
|---|
| 1434 | [This patch adds a timeout function to the base libraries. Trac #980 is |
|---|
| 1435 | Peter Simons <simons@cryp.to>**20070126222615 |
|---|
| 1436 | concerned with this issue. The design guideline for this implementation |
|---|
| 1437 | is that 'timeout N E' should behave exactly the same as E as long as E |
|---|
| 1438 | doesn't time out. In our implementation, this means that E has the same |
|---|
| 1439 | myThreadId it would have without the timeout wrapper. Any exception E |
|---|
| 1440 | might throw cancels the timeout and propagates further up. It also |
|---|
| 1441 | possible for E to receive exceptions thrown to it by another thread. |
|---|
| 1442 | ] |
|---|
| 1443 | [PArr: fixed permutations |
|---|
| 1444 | Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20070305055807] |
|---|
| 1445 | [Add Data.String, containing IsString(fromString); trac proposal #1126 |
|---|
| 1446 | Ian Lynagh <igloo@earth.li>**20070130134841 |
|---|
| 1447 | This is used by the overloaded strings extension (-foverloaded-strings in GHC). |
|---|
| 1448 | ] |
|---|
| 1449 | [GHC.PArr: add bounds checking |
|---|
| 1450 | Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20070302053224] |
|---|
| 1451 | [Bump nhc98 stack size for System/Time.hsc |
|---|
| 1452 | sven.panne@aedion.de**20070301153009] |
|---|
| 1453 | [FDs are CInts now, fixing non-GHC builds |
|---|
| 1454 | sven.panne@aedion.de**20070225105620] |
|---|
| 1455 | [Fixed PArr.dropP |
|---|
| 1456 | Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20070222032405 |
|---|
| 1457 | - Thanks to Audrey Tang for the bug report |
|---|
| 1458 | ] |
|---|
| 1459 | [Keep the same FD in both halves of a duplex handle when dup'ing |
|---|
| 1460 | Ian Lynagh <igloo@earth.li>**20070220141039 |
|---|
| 1461 | Otherwise we only close one of the FDs when closing the handle. |
|---|
| 1462 | Fixes trac #1149. |
|---|
| 1463 | ] |
|---|
| 1464 | [Remove more redundant FD conversions |
|---|
| 1465 | Ian Lynagh <igloo@earth.li>**20070220092520] |
|---|
| 1466 | [Fix FD changes on Windows |
|---|
| 1467 | Ian Lynagh <igloo@earth.li>**20070220091516] |
|---|
| 1468 | [Consistently use CInt rather than Int for FDs |
|---|
| 1469 | Ian Lynagh <igloo@earth.li>**20070219233854] |
|---|
| 1470 | [Fix the types of minView/maxView (ticket #1134) |
|---|
| 1471 | jeanphilippe.bernardy@gmail.com**20070210065115] |
|---|
| 1472 | [fix for hashString, from Jan-Willem Maessen (see #1137) |
|---|
| 1473 | Simon Marlow <simonmar@microsoft.com>**20070215094304 |
|---|
| 1474 | |
|---|
| 1475 | ] |
|---|
| 1476 | [fix to getUSecOfDay(): arithmetic was overflowing |
|---|
| 1477 | Simon Marlow <simonmar@microsoft.com>**20070214161719] |
|---|
| 1478 | [The Windows counterpart to 'wrapround of thread delays' |
|---|
| 1479 | Ian Lynagh <igloo@earth.li>**20070209173510] |
|---|
| 1480 | [wrapround of thread delays |
|---|
| 1481 | Neil Davies <SemanticPhilosopher@gmail.com>**20070129160519 |
|---|
| 1482 | |
|---|
| 1483 | * made the wrapround of the underlying O/S occur before the wrapround |
|---|
| 1484 | of the delayed threads by making threads delay in microseconds since |
|---|
| 1485 | O/S epoch (1970 - Unix, 1601 - Windows) stored in Word64. |
|---|
| 1486 | * removed redundant calls reading O/S realtime clock |
|---|
| 1487 | * removed rounding to 1/50th of sec for timers |
|---|
| 1488 | * Only for Unix version of scheduler. |
|---|
| 1489 | ] |
|---|
| 1490 | [Whitespace changes only |
|---|
| 1491 | Ian Lynagh <igloo@earth.li>**20070206232722] |
|---|
| 1492 | [Add some type sigs |
|---|
| 1493 | Ian Lynagh <igloo@earth.li>**20070206232439] |
|---|
| 1494 | [Use static inline rather than extern inline/inline |
|---|
| 1495 | Ian Lynagh <igloo@earth.li>**20070205203628 |
|---|
| 1496 | I understand this is more portable, and it also fixes warnings when |
|---|
| 1497 | C things we are wrapping are themselves static inlines (which FD_ISSET |
|---|
| 1498 | is on ppc OS X). |
|---|
| 1499 | ] |
|---|
| 1500 | [add derived instances for Dual monoid |
|---|
| 1501 | Ross Paterson <ross@soi.city.ac.uk>**20070202190847] |
|---|
| 1502 | [add doc pointers to Foldable |
|---|
| 1503 | Ross Paterson <ross@soi.city.ac.uk>**20070202110931 |
|---|
| 1504 | |
|---|
| 1505 | Could be applied to STABLE. |
|---|
| 1506 | ] |
|---|
| 1507 | [Eliminate some warnings |
|---|
| 1508 | Ian Lynagh <igloo@earth.li>**20060729220854 |
|---|
| 1509 | Eliminate warnings in the libraries caused by mixing pattern matching |
|---|
| 1510 | with numeric literal matching. |
|---|
| 1511 | ] |
|---|
| 1512 | [Remove IsString(fromString) from the Prelude |
|---|
| 1513 | Ian Lynagh <igloo@earth.li>**20070130124136] |
|---|
| 1514 | [Add Kleisli composition |
|---|
| 1515 | Don Stewart <dons@cse.unsw.edu.au>**20061113015442] |
|---|
| 1516 | [IsString is GHC-only (so why is it in the Prelude?) |
|---|
| 1517 | Ross Paterson <ross@soi.city.ac.uk>**20070123183007] |
|---|
| 1518 | [Applicative and Monad instances for Tree |
|---|
| 1519 | Ross Paterson <ross@soi.city.ac.uk>**20070115174510] |
|---|
| 1520 | [Add IsString class for overloaded string literals. |
|---|
| 1521 | lennart@augustsson.net**20061221210532] |
|---|
| 1522 | [fix threadDelay |
|---|
| 1523 | Simon Marlow <simonmar@microsoft.com>**20070117091702 |
|---|
| 1524 | In "Add support for the IO manager thread" I accidentally spammed part |
|---|
| 1525 | of "Make sure the threaded threadDelay sleeps at least as long as it |
|---|
| 1526 | is asked", which is why the ThreadDelay001 test has been failing. |
|---|
| 1527 | ] |
|---|
| 1528 | [update section on "blocking" |
|---|
| 1529 | Simon Marlow <simonmar@microsoft.com>**20070116124328] |
|---|
| 1530 | [Fix crash with (minBound :: Int*) `div (-1) as result is maxBound + 1. |
|---|
| 1531 | Ian Lynagh <igloo@earth.li>**20070115142005] |
|---|
| 1532 | [version of example using Tomasz Zielonka's technique |
|---|
| 1533 | Ross Paterson <ross@soi.city.ac.uk>**20070105175907] |
|---|
| 1534 | [Added Unknowns for higher kinds |
|---|
| 1535 | Pepe Iborra <mnislaih@gmail.com>**20061108155938] |
|---|
| 1536 | [Improved the Show instance for Unknown |
|---|
| 1537 | Pepe Iborra <mnislaih@gmail.com>**20060813111816] |
|---|
| 1538 | [Show instance for GHC.Base.Unknown |
|---|
| 1539 | mnislaih@gmail.com**20060801233530] |
|---|
| 1540 | [Introduce Unknowns for the closure viewer. Add breakpointCond which was missing |
|---|
| 1541 | mnislaih@gmail.com**20060725174537] |
|---|
| 1542 | [Fix missing comma in Fractional documentation |
|---|
| 1543 | Alec Berryman <alec@thened.net>**20061201173237] |
|---|
| 1544 | [Mention that throwTo does not guarantee promptness of delivery |
|---|
| 1545 | simonpj@microsoft**20061211123215] |
|---|
| 1546 | [Add note about synhronous delivery of throwTo |
|---|
| 1547 | simonpj@microsoft**20061211122257] |
|---|
| 1548 | [documentation for installHandler |
|---|
| 1549 | Simon Marlow <simonmar@microsoft.com>**20061205154927 |
|---|
| 1550 | merge to 6.6 |
|---|
| 1551 | ] |
|---|
| 1552 | [Added examples, more detailed documentation to Data.List Extracting sublists functions |
|---|
| 1553 | Andriy Palamarchuk <apa3a@yahoo.com>**20061204164710] |
|---|
| 1554 | [dos2unix |
|---|
| 1555 | Simon Marlow <simonmar@microsoft.com>**20061204095439] |
|---|
| 1556 | [don't try to compile this on Unix |
|---|
| 1557 | Simon Marlow <simonmar@microsoft.com>**20061204095427] |
|---|
| 1558 | [TAG 6.6 release |
|---|
| 1559 | Ian Lynagh <igloo@earth.li>**20061011124740] |
|---|
| 1560 | [TAG Version 2.1 |
|---|
| 1561 | Ian Lynagh <igloo@earth.li>**20061009114014] |
|---|
| 1562 | [Bump version number |
|---|
| 1563 | Ian Lynagh <igloo@earth.li>**20061009114009] |
|---|
| 1564 | [Add support for the IO manager thread on Windows |
|---|
| 1565 | Simon Marlow <simonmar@microsoft.com>**20061201152042 |
|---|
| 1566 | Fixes #637. The test program in that report now works for me with |
|---|
| 1567 | -threaded, but it doesn't work without -threaded (I don't know if |
|---|
| 1568 | that's new behaviour or not, though). |
|---|
| 1569 | ] |
|---|
| 1570 | [deriving (Eq, Ord, Enum, Show, Read, Typeab) for ConsoleEvent |
|---|
| 1571 | Simon Marlow <simonmar@microsoft.com>**20061201144032] |
|---|
| 1572 | [Make sure the threaded threadDelay sleeps at least as long as it is asked to |
|---|
| 1573 | Ian Lynagh <igloo@earth.li>**20061128204807] |
|---|
| 1574 | [Add comments about argument order to the definitions of gmapQ and constrFields |
|---|
| 1575 | simonpj@microsoft**20061124164505] |
|---|
| 1576 | [Hugs: add Control.Parallel.Strategies |
|---|
| 1577 | Ross Paterson <ross@soi.city.ac.uk>**20061124161039] |
|---|
| 1578 | [Move instance of Show Ptr to Ptr.hs (fewer orphans) |
|---|
| 1579 | simonpj@microsoft.com**20061124100639] |
|---|
| 1580 | [Add type signatures |
|---|
| 1581 | simonpj@microsoft.com**20061124100621] |
|---|
| 1582 | [Add an example of the use of unfoldr, following doc feedback from dozer |
|---|
| 1583 | Don Stewart <dons@cse.unsw.edu.au>**20061124011249] |
|---|
| 1584 | [trim imports |
|---|
| 1585 | Ross Paterson <ross@soi.city.ac.uk>**20061123190352] |
|---|
| 1586 | [Data.Graph is now portable (enable for nhc98) |
|---|
| 1587 | Malcolm.Wallace@cs.york.ac.uk**20061123174913] |
|---|
| 1588 | [remove Data.FunctorM and Data.Queue |
|---|
| 1589 | Ross Paterson <ross@soi.city.ac.uk>**20061112001046 |
|---|
| 1590 | |
|---|
| 1591 | These were deprecated in 6.6, and can thus be removed in 6.8. |
|---|
| 1592 | ] |
|---|
| 1593 | [make Data.Graph portable (no change to the interface) |
|---|
| 1594 | Ross Paterson <ross@soi.city.ac.uk>**20061122010040 |
|---|
| 1595 | |
|---|
| 1596 | The algorithm now uses STArrays on GHC and IntSets elsewhere. |
|---|
| 1597 | (Hugs has STArrays, but avoiding them saves a -98, and boxed arrays |
|---|
| 1598 | aren't fast under Hugs anyway.) |
|---|
| 1599 | ] |
|---|
| 1600 | [One less unsafeCoerce# in the tree |
|---|
| 1601 | Don Stewart <dons@cse.unsw.edu.au>**20061120120242] |
|---|
| 1602 | [typo in comment |
|---|
| 1603 | Ross Paterson <ross@soi.city.ac.uk>**20061120115106] |
|---|
| 1604 | [fix shift docs to match ffi spec |
|---|
| 1605 | Ross Paterson <ross@soi.city.ac.uk>**20061117003144] |
|---|
| 1606 | [(nhc98) use new primitive implementations of h{Put,Get}Buf. |
|---|
| 1607 | Malcolm.Wallace@cs.york.ac.uk**20061116173104] |
|---|
| 1608 | [The wrong 'cycle' was exported from Data.ByteString.Lazy.Char8, spotted by sjanssen |
|---|
| 1609 | Don Stewart <dons@cse.unsw.edu.au>**20061110021311] |
|---|
| 1610 | [LPS chunk sizes should be 16 bytes, not 17. |
|---|
| 1611 | Don Stewart <dons@cse.unsw.edu.au>**20061110021254] |
|---|
| 1612 | [Update comments on Prelude organisation in GHC/Base.lhs |
|---|
| 1613 | Ian Lynagh <igloo@earth.li>**20061115001926] |
|---|
| 1614 | [Control.Parallel.Strategies clean-up: Added export list to avoid exporting seq, fixed import list strangeness that haddock choked on, and moved the deprecated functions to a separate section. |
|---|
| 1615 | bringert@cs.chalmers.se**20061113224202] |
|---|
| 1616 | [Control.Parallel.Strategies: added NFData instances for Data.Int.*, Data.Word.*, Maybe, Either, Map, Set, Tree, IntMap, IntSet. |
|---|
| 1617 | bringert@cs.chalmers.se**20061113221843] |
|---|
| 1618 | [Control.Parallel.Strategies: deprecate sPar, sSeq, Assoc, fstPairFstList, force and sforce. |
|---|
| 1619 | bringert@cs.chalmers.se**20061113215219 |
|---|
| 1620 | Code comments indicated that sPar and sSeq have been superceded by sparking and demanding, and that Assoc, fstPairFstList, force and sforce are examples and hacks needed by the Lolita system. |
|---|
| 1621 | ] |
|---|
| 1622 | [add Control.Monad.Instances to nhc98 build |
|---|
| 1623 | Malcolm.Wallace@cs.york.ac.uk**20061113113221] |
|---|
| 1624 | [Control.Parallel.Strategies: clarified documentation of parListChunk. |
|---|
| 1625 | bringert@cs.chalmers.se**20061112232904] |
|---|
| 1626 | [Added and cleaned up Haddock comments in Control.Parallel.Strategies. |
|---|
| 1627 | bringert@cs.chalmers.se**20061112220445 |
|---|
| 1628 | Many of the definitions in Control.Parallel.Strategies had missing or unclear Haddock comments. I converted most of the existing plain code comments to haddock comments, added some missing documentation and cleaned up the existing Haddock mark-up. |
|---|
| 1629 | ] |
|---|
| 1630 | [Fix broken pragmas; spotted by Bulat Ziganshin |
|---|
| 1631 | Ian Lynagh <igloo@earth.li>**20061111205916] |
|---|
| 1632 | [add doc link to bound threads section |
|---|
| 1633 | Ross Paterson <ross@soi.city.ac.uk>**20060929103252] |
|---|
| 1634 | [hide Data.Array.IO.Internals |
|---|
| 1635 | Ross Paterson <ross@soi.city.ac.uk>**20061111113248 |
|---|
| 1636 | |
|---|
| 1637 | It's hidden from haddock, and everything it exports is re-exported by |
|---|
| 1638 | Data.Array.IO. |
|---|
| 1639 | ] |
|---|
| 1640 | [add Data.Function |
|---|
| 1641 | Malcolm.Wallace@cs.york.ac.uk**20061110142710] |
|---|
| 1642 | [add Data.Function |
|---|
| 1643 | Ross Paterson <ross@soi.city.ac.uk>**20061110141354] |
|---|
| 1644 | [whitespace only |
|---|
| 1645 | Ross Paterson <ross@soi.city.ac.uk>**20061110141326] |
|---|
| 1646 | [move fix to Data.Function |
|---|
| 1647 | Ross Paterson <ross@soi.city.ac.uk>**20061110141120] |
|---|
| 1648 | [import Prelude |
|---|
| 1649 | Ross Paterson <ross@soi.city.ac.uk>**20061110140445] |
|---|
| 1650 | [Added Data.Function (Trac ticket #979). |
|---|
| 1651 | Nils Anders Danielsson <nad@cs.chalmers.se>**20061110122503 |
|---|
| 1652 | + A module with simple combinators working solely on and with |
|---|
| 1653 | functions. |
|---|
| 1654 | + The only new function is "on". |
|---|
| 1655 | + Some functions from the Prelude are re-exported. |
|---|
| 1656 | ] |
|---|
| 1657 | [__hscore_long_path_size is not portable beyond GHC |
|---|
| 1658 | Malcolm.Wallace@cs.york.ac.uk**20061110113222] |
|---|
| 1659 | [redefine writeFile and appendFile using withFile |
|---|
| 1660 | Ross Paterson <ross@soi.city.ac.uk>**20061107140359] |
|---|
| 1661 | [add withFile and withBinaryFile (#966) |
|---|
| 1662 | Ross Paterson <ross@soi.city.ac.uk>**20061107134510] |
|---|
| 1663 | [remove conflicting import for nhc98 |
|---|
| 1664 | Malcolm.Wallace@cs.york.ac.uk**20061108111215] |
|---|
| 1665 | [Add intercalate to Data.List (ticket #971) |
|---|
| 1666 | Josef Svenningsson <josef.svenningsson@gmail.com>**20061102122052] |
|---|
| 1667 | [non-GHC: fix canonicalizeFilePath |
|---|
| 1668 | Ross Paterson <ross@soi.city.ac.uk>**20061107133902 |
|---|
| 1669 | |
|---|
| 1670 | I've also removed the #ifdef __GLASGOW_HASKELL__ from the proper |
|---|
| 1671 | Windows versions of a few functions. These will need testing with |
|---|
| 1672 | Hugs on Windows. |
|---|
| 1673 | ] |
|---|
| 1674 | [enable canonicalizePath for non-GHC platforms |
|---|
| 1675 | Simon Marlow <simonmar@microsoft.com>**20061107121141] |
|---|
| 1676 | [Update documentation for hWaitForInput |
|---|
| 1677 | Simon Marlow <simonmar@microsoft.com>**20061107111430 |
|---|
| 1678 | See #972 |
|---|
| 1679 | Merge to 6.6 branch. |
|---|
| 1680 | ] |
|---|
| 1681 | [Use unchecked shifts to implement Data.Bits.rotate |
|---|
| 1682 | Samuel Bronson <naesten@gmail.com>**20061012125553 |
|---|
| 1683 | This should get rid of those cases, maybe lower the size enough that the inliner will like it? |
|---|
| 1684 | ] |
|---|
| 1685 | [fix Haddock module headers |
|---|
| 1686 | Ross Paterson <ross@soi.city.ac.uk>**20061106124140] |
|---|
| 1687 | [fix example in docs |
|---|
| 1688 | Ross Paterson <ross@soi.city.ac.uk>**20061106115628] |
|---|
| 1689 | [Add intercalate and split to Data.List |
|---|
| 1690 | Josef Svenningsson <josef.svenningsson@gmail.com>*-20061024172357] |
|---|
| 1691 | [Data.Generics.Basics is GHC-only |
|---|
| 1692 | Ross Paterson <ross@soi.city.ac.uk>**20061102111736] |
|---|
| 1693 | [#ifdef around non-portable Data.Generics.Basics |
|---|
| 1694 | Malcolm.Wallace@cs.york.ac.uk**20061102103445] |
|---|
| 1695 | [Add deriving Data to Complex |
|---|
| 1696 | simonpj@microsoft**20061101102059] |
|---|
| 1697 | [minor clarification of RandomGen doc |
|---|
| 1698 | Ross Paterson <ross@soi.city.ac.uk>**20061030230842] |
|---|
| 1699 | [rearrange docs a bit |
|---|
| 1700 | Ross Paterson <ross@soi.city.ac.uk>**20061030161223] |
|---|
| 1701 | [Add intercalate and split to Data.List |
|---|
| 1702 | Josef Svenningsson <josef.svenningsson@gmail.com>**20061024172357] |
|---|
| 1703 | [Export pseq from Control.Parallel, and use it in Control.Parallel.Strategies |
|---|
| 1704 | Simon Marlow <simonmar@microsoft.com>**20061027150141] |
|---|
| 1705 | [`par` should be infixr 0 |
|---|
| 1706 | Simon Marlow <simonmar@microsoft.com>**20061027130800 |
|---|
| 1707 | Alas, I didn't spot this due to lack of testing, and the symptom is |
|---|
| 1708 | that an expression like x `par` y `seq z will have exactly the wrong |
|---|
| 1709 | parallelism properties. The workaround is to add parantheses. |
|---|
| 1710 | |
|---|
| 1711 | I think we could push this to the 6.6 branch. |
|---|
| 1712 | ] |
|---|
| 1713 | [fix example in comment |
|---|
| 1714 | Ross Paterson <ross@soi.city.ac.uk>**20061023163925] |
|---|
| 1715 | [Use the new Any type for dynamics (GHC only) |
|---|
| 1716 | simonpj@microsoft**20061019160408] |
|---|
| 1717 | [add Data.Sequence to nhc98 build |
|---|
| 1718 | Malcolm.Wallace@cs.york.ac.uk**20061012135200] |
|---|
| 1719 | [Remove Data.FiniteMap, add Control.Applicative, Data.Traversable, and |
|---|
| 1720 | Malcolm.Wallace@cs.york.ac.uk**20061012095605 |
|---|
| 1721 | Data.Foldable to the nhc98 build. |
|---|
| 1722 | ] |
|---|
| 1723 | [STM invariants |
|---|
| 1724 | tharris@microsoft.com**20061007123253] |
|---|
| 1725 | [Inline shift in GHC's Bits instances for {Int,Word}{,8,16,32,64} |
|---|
| 1726 | Samuel Bronson <naesten@gmail.com>**20061009020906] |
|---|
| 1727 | [Don't create GHC.Prim when bootstrapping; we can't, and we don't need it |
|---|
| 1728 | Ian Lynagh <igloo@earth.li>**20061004165355] |
|---|
| 1729 | [Data.ByteString: fix lazyness of take, drop & splitAt |
|---|
| 1730 | Don Stewart <dons@cse.unsw.edu.au>**20061005011703 |
|---|
| 1731 | |
|---|
| 1732 | ByteString.Lazy's take, drop and splitAt were too strict when demanding |
|---|
| 1733 | a byte string. Spotted by Einar Karttunen. Thanks to him and to Bertram |
|---|
| 1734 | Felgenhauer for explaining the problem and the fix. |
|---|
| 1735 | |
|---|
| 1736 | ] |
|---|
| 1737 | [Fix syntax error that prevents building Haddock documentation on Windows |
|---|
| 1738 | brianlsmith@gmail.com**20060917013530] |
|---|
| 1739 | [Hugs only: unbreak typeRepKey |
|---|
| 1740 | Ross Paterson <ross@soi.city.ac.uk>**20060929102743] |
|---|
| 1741 | [make hGetBufNonBlocking do something on Windows w/ -threaded |
|---|
| 1742 | Simon Marlow <simonmar@microsoft.com>**20060927145811 |
|---|
| 1743 | hGetBufNonBlocking will behave the same as hGetBuf on Windows now, which |
|---|
| 1744 | is better than just crashing (which it did previously). |
|---|
| 1745 | ] |
|---|
| 1746 | [add typeRepKey :: TypeRep -> IO Int |
|---|
| 1747 | Simon Marlow <simonmar@microsoft.com>**20060927100342 |
|---|
| 1748 | See feature request #880 |
|---|
| 1749 | ] |
|---|
| 1750 | [fix header comment |
|---|
| 1751 | Ross Paterson <ross@soi.city.ac.uk>**20060926135843] |
|---|
| 1752 | [Add strict versions of insertWith and insertWithKey (Data.Map) |
|---|
| 1753 | jeanphilippe.bernardy@gmail.com**20060910162443] |
|---|
| 1754 | [doc tweaks, including more precise equations for evaluate |
|---|
| 1755 | Ross Paterson <ross@soi.city.ac.uk>**20060910115259] |
|---|
| 1756 | [Sync Data.ByteString with stable branch |
|---|
| 1757 | Don Stewart <dons@cse.unsw.edu.au>**20060909050111 |
|---|
| 1758 | |
|---|
| 1759 | This patch: |
|---|
| 1760 | * hides the LPS constructor (its in .Base if you need it) |
|---|
| 1761 | * adds functions to convert between strict and lazy bytestrings |
|---|
| 1762 | * and adds readInteger |
|---|
| 1763 | |
|---|
| 1764 | ] |
|---|
| 1765 | [Typeable1 instances for STM and TVar |
|---|
| 1766 | Ross Paterson <ross@soi.city.ac.uk>**20060904231425] |
|---|
| 1767 | [remove obsolete Hugs stuff |
|---|
| 1768 | Ross Paterson <ross@soi.city.ac.uk>**20060904223944] |
|---|
| 1769 | [Cleaner isInfixOf suggestion from Ross Paterson |
|---|
| 1770 | John Goerzen <jgoerzen@complete.org>**20060901143654] |
|---|
| 1771 | [New function isInfixOf that searches a list for a given sublist |
|---|
| 1772 | John Goerzen <jgoerzen@complete.org>**20060831151556 |
|---|
| 1773 | |
|---|
| 1774 | Example: |
|---|
| 1775 | |
|---|
| 1776 | isInfixOf "Haskell" "I really like Haskell." -> True |
|---|
| 1777 | isInfixOf "Ial" "I really like Haskell." -> False |
|---|
| 1778 | |
|---|
| 1779 | This function was first implemented in MissingH as MissingH.List.contains |
|---|
| 1780 | ] |
|---|
| 1781 | [Better doc on Data.Map.lookup: explain what the monad is for |
|---|
| 1782 | jeanphilippe.bernardy@gmail.com**20060903133440] |
|---|
| 1783 | [fix hDuplicateTo on Windows |
|---|
| 1784 | Simon Marlow <simonmar@microsoft.com>**20060901150016 |
|---|
| 1785 | deja vu - I'm sure I remember fixing this before... |
|---|
| 1786 | ] |
|---|
| 1787 | [Improve documentation of atomically |
|---|
| 1788 | simonpj@microsoft**20060714120207] |
|---|
| 1789 | [Add missing method genRange for StdGen (fixes #794) |
|---|
| 1790 | simonpj@microsoft**20060707151901 |
|---|
| 1791 | |
|---|
| 1792 | MERGE TO STABLE |
|---|
| 1793 | |
|---|
| 1794 | Trac #794 reports (correctly) that the implementation of StdGen |
|---|
| 1795 | only returns numbers in the range (0..something) rather than |
|---|
| 1796 | (minBound, maxBound), which is what StdGen's genRange claims. |
|---|
| 1797 | |
|---|
| 1798 | This commit fixes the problem, by implementing genRange for StdGen |
|---|
| 1799 | (previously it just used the default method). |
|---|
| 1800 | |
|---|
| 1801 | |
|---|
| 1802 | ] |
|---|
| 1803 | [mark nhc98 import hack |
|---|
| 1804 | Ross Paterson <ross@soi.city.ac.uk>**20060831125219] |
|---|
| 1805 | [remove some outdated comments |
|---|
| 1806 | Simon Marlow <simonmar@microsoft.com>**20060831104200] |
|---|
| 1807 | [import Control.Arrow.ArrowZero to help nhc98's type checker |
|---|
| 1808 | Malcolm.Wallace@cs.york.ac.uk**20060831101105] |
|---|
| 1809 | [remove Text.Regex(.Posix) from nhc98 build |
|---|
| 1810 | Malcolm.Wallace@cs.york.ac.uk**20060831101016] |
|---|
| 1811 | [add Data.Foldable.{msum,asum}, plus tweaks to comments |
|---|
| 1812 | Ross Paterson <ross@soi.city.ac.uk>**20060830163521] |
|---|
| 1813 | [fix doc typo |
|---|
| 1814 | Ross Paterson <ross@soi.city.ac.uk>**20060830134123] |
|---|
| 1815 | [add Data.Foldable.{for_,forM_} and Data.Traversable.{for,forM} |
|---|
| 1816 | Ross Paterson <ross@soi.city.ac.uk>**20060830133805 |
|---|
| 1817 | |
|---|
| 1818 | generalizing Control.Monad.{forM_,forM} |
|---|
| 1819 | ] |
|---|
| 1820 | [Make length a good consumer |
|---|
| 1821 | simonpj@microsoft*-20060508142726 |
|---|
| 1822 | |
|---|
| 1823 | Make length into a good consumer. Fixes Trac bug #707. |
|---|
| 1824 | |
|---|
| 1825 | (Before length simply didn't use foldr.) |
|---|
| 1826 | |
|---|
| 1827 | ] |
|---|
| 1828 | [Add Control.Monad.forM and forM_ |
|---|
| 1829 | Don Stewart <dons@cse.unsw.edu.au>**20060824081118 |
|---|
| 1830 | |
|---|
| 1831 | flip mapM_ is more and more common, I find. Several suggestions have |
|---|
| 1832 | been made to add this, as foreach or something similar. This patch |
|---|
| 1833 | does just that: |
|---|
| 1834 | |
|---|
| 1835 | forM :: (Monad m) => [a] -> (a -> m b) -> m [b] |
|---|
| 1836 | forM_ :: (Monad m) => [a] -> (a -> m b) -> m () |
|---|
| 1837 | |
|---|
| 1838 | So we can write: |
|---|
| 1839 | |
|---|
| 1840 | Prelude Control.Monad> forM_ [1..4] $ \x -> print x |
|---|
| 1841 | 1 |
|---|
| 1842 | 2 |
|---|
| 1843 | 3 |
|---|
| 1844 | 4 |
|---|
| 1845 | |
|---|
| 1846 | ] |
|---|
| 1847 | [Hide internal module from haddock in Data.ByteString |
|---|
| 1848 | Don Stewart <dons@cse.unsw.edu.au>**20060828011515] |
|---|
| 1849 | [add advice on avoiding import ambiguities |
|---|
| 1850 | Ross Paterson <ross@soi.city.ac.uk>**20060827170407] |
|---|
| 1851 | [expand advice on importing these modules |
|---|
| 1852 | Ross Paterson <ross@soi.city.ac.uk>**20060827164044] |
|---|
| 1853 | [add Haddock marker |
|---|
| 1854 | Ross Paterson <ross@soi.city.ac.uk>**20060827115140] |
|---|
| 1855 | [Clarify how one hides Prelude.catch |
|---|
| 1856 | Don Stewart <dons@cse.unsw.edu.au>**20060826124346 |
|---|
| 1857 | |
|---|
| 1858 | User feedback indicated that an example was required, of how to hide |
|---|
| 1859 | Prelude.catch, so add such an example to the docs |
|---|
| 1860 | |
|---|
| 1861 | ] |
|---|
| 1862 | [Workaround for OSes that don't have intmax_t and uintmax_t |
|---|
| 1863 | Ian Lynagh <igloo@earth.li>**20060825134936 |
|---|
| 1864 | OpenBSD (and possibly others) do not have intmax_t and uintmax_t types: |
|---|
| 1865 | http://www.mail-archive.com/haskell-prime@haskell.org/msg01548.html |
|---|
| 1866 | so substitute (unsigned) long long if we have them, otherwise |
|---|
| 1867 | (unsigned) long. |
|---|
| 1868 | |
|---|
| 1869 | ] |
|---|
| 1870 | [add docs for par |
|---|
| 1871 | Simon Marlow <simonmar@microsoft.com>**20060825110610] |
|---|
| 1872 | [document minimal complete definition for Bits |
|---|
| 1873 | Ross Paterson <ross@soi.city.ac.uk>**20060824140504] |
|---|
| 1874 | [C regex library bits have moved to the regex-posix package |
|---|
| 1875 | Simon Marlow <simonmar@microsoft.com>**20060824132311] |
|---|
| 1876 | [Add shared Typeable support (ghc only) |
|---|
| 1877 | Esa Ilari Vuokko <ei@vuokko.info>**20060823003126] |
|---|
| 1878 | [this should have been removed with the previous patch |
|---|
| 1879 | Simon Marlow <simonmar@microsoft.com>**20060824121223] |
|---|
| 1880 | [remove Text.Regx & Text.Regex.Posix |
|---|
| 1881 | Simon Marlow <simonmar@microsoft.com>**20060824094615 |
|---|
| 1882 | These are subsumed by the new regex-base, regex-posix and regex-compat |
|---|
| 1883 | packages. |
|---|
| 1884 | ] |
|---|
| 1885 | [explicitly tag Data.ByteString rules with the FPS prefix. |
|---|
| 1886 | Don Stewart <dons@cse.unsw.edu.au>**20060824041326] |
|---|
| 1887 | [Add spec rules for sections in Data.ByteString |
|---|
| 1888 | Don Stewart <dons@cse.unsw.edu.au>**20060824012611] |
|---|
| 1889 | [Sync Data.ByteString with current stable branch, 0.7 |
|---|
| 1890 | Don Stewart <dons@cse.unsw.edu.au>**20060823143338] |
|---|
| 1891 | [add notes about why copyFile doesn't remove the target |
|---|
| 1892 | Simon Marlow <simonmar@microsoft.com>**20060823095059] |
|---|
| 1893 | [copyFile: try removing the target file before opening it for writing |
|---|
| 1894 | Simon Marlow <simonmar@microsoft.com>*-20060822121909] |
|---|
| 1895 | [copyFile: try removing the target file before opening it for writing |
|---|
| 1896 | Simon Marlow <simonmar@microsoft.com>**20060822121909] |
|---|
| 1897 | [add alternative functors and extra instances |
|---|
| 1898 | Ross Paterson <ross@soi.city.ac.uk>**20060821152151 |
|---|
| 1899 | |
|---|
| 1900 | * Alternative class, for functors with a monoid |
|---|
| 1901 | * instances for Const |
|---|
| 1902 | * instances for arrows |
|---|
| 1903 | ] |
|---|
| 1904 | [generate Haddock docs on all platforms |
|---|
| 1905 | Simon Marlow <simonmar@microsoft.com>**20060821131612] |
|---|
| 1906 | [remove extra comma from import |
|---|
| 1907 | Ross Paterson <ross@soi.city.ac.uk>**20060819173954] |
|---|
| 1908 | [fix docs for withC(A)StringLen |
|---|
| 1909 | Ross Paterson <ross@soi.city.ac.uk>**20060818170328] |
|---|
| 1910 | [use Haskell'98 compliant indentation in do blocks |
|---|
| 1911 | Malcolm.Wallace@cs.york.ac.uk**20060818130810] |
|---|
| 1912 | [use correct names of IOArray operations for nhc98 |
|---|
| 1913 | Malcolm.Wallace@cs.york.ac.uk**20060818130714] |
|---|
| 1914 | [add mapMaybe and mapEither, plus WithKey variants |
|---|
| 1915 | Ross Paterson <ross@soi.city.ac.uk>**20060817235041] |
|---|
| 1916 | [remove Text.Html from nhc98 build |
|---|
| 1917 | Malcolm.Wallace@cs.york.ac.uk**20060817135502] |
|---|
| 1918 | [eliminate more HOST_OS tests |
|---|
| 1919 | Ross Paterson <ross@soi.city.ac.uk>**20060815190609] |
|---|
| 1920 | [Hugs only: disable unused process primitives |
|---|
| 1921 | Ross Paterson <ross@soi.city.ac.uk>**20060813184435 |
|---|
| 1922 | |
|---|
| 1923 | These were the cause of Hugs bug #30, I think, and weren't used by Hugs anyway. |
|---|
| 1924 | ] |
|---|
| 1925 | [markup fix to Data.HashTable |
|---|
| 1926 | Ross Paterson <ross@soi.city.ac.uk>**20060812103835] |
|---|
| 1927 | [revert removal of ghcconfig.h from package.conf.in |
|---|
| 1928 | Ross Paterson <ross@soi.city.ac.uk>**20060812082702 |
|---|
| 1929 | |
|---|
| 1930 | as it's preprocessed with -undef (pointed out by Esa Ilari Vuokko) |
|---|
| 1931 | ] |
|---|
| 1932 | [fix Data.HashTable for non-GHC |
|---|
| 1933 | Ross Paterson <ross@soi.city.ac.uk>**20060811231521] |
|---|
| 1934 | [remove deprecated 'withObject' |
|---|
| 1935 | Simon Marlow <simonmar@microsoft.com>**20060811152350] |
|---|
| 1936 | [Jan-Willem Maessen's improved implementation of Data.HashTable |
|---|
| 1937 | Simon Marlow <simonmar@microsoft.com>**20060811151024 |
|---|
| 1938 | Rather than incrementally enlarging the hash table, this version |
|---|
| 1939 | just does it in one go when the table gets too full. |
|---|
| 1940 | ] |
|---|
| 1941 | [Warning police: Make some prototypes from the RTS known |
|---|
| 1942 | sven.panne@aedion.de**20060811144629] |
|---|
| 1943 | [Warning police: Removed useless catch-all clause |
|---|
| 1944 | sven.panne@aedion.de**20060811142208] |
|---|
| 1945 | [reduce dependency on ghcconfig.h |
|---|
| 1946 | Ross Paterson <ross@soi.city.ac.uk>**20060811124030 |
|---|
| 1947 | |
|---|
| 1948 | The only remaining use is in cbits/dirUtils.h, which tests solaris2_HOST_OS |
|---|
| 1949 | |
|---|
| 1950 | (Also System.Info uses ghcplatform.h and several modules import MachDeps.h |
|---|
| 1951 | to get SIZEOF_* and ALIGNMENT_* from ghcautoconf.h) |
|---|
| 1952 | ] |
|---|
| 1953 | [(non-GHC only) track MArray interface change |
|---|
| 1954 | Ross Paterson <ross@soi.city.ac.uk>**20060810182902] |
|---|
| 1955 | [move Text.Html to a separate package |
|---|
| 1956 | Simon Marlow <simonmar@microsoft.com>**20060810113017] |
|---|
| 1957 | [bump version to 2.0 |
|---|
| 1958 | Simon Marlow <simonmar@microsoft.com>**20060810112833] |
|---|
| 1959 | [Remove deprecated Data.FiniteMap and Data.Set interfaces |
|---|
| 1960 | Simon Marlow <simonmar@microsoft.com>**20060809153810] |
|---|
| 1961 | [move altzone test from ghc to base package |
|---|
| 1962 | Ross Paterson <ross@soi.city.ac.uk>**20060809124259] |
|---|
| 1963 | [remove unnecessary #include "ghcconfig.h" |
|---|
| 1964 | Ross Paterson <ross@soi.city.ac.uk>**20060809123812] |
|---|
| 1965 | [Change the API of MArray to allow resizable arrays |
|---|
| 1966 | Simon Marlow <simonmar@microsoft.com>**20060809100548 |
|---|
| 1967 | See #704 |
|---|
| 1968 | |
|---|
| 1969 | The MArray class doesn't currently allow a mutable array to change its |
|---|
| 1970 | size, because of the pure function |
|---|
| 1971 | |
|---|
| 1972 | bounds :: (HasBounds a, Ix i) => a i e -> (i,i) |
|---|
| 1973 | |
|---|
| 1974 | This patch removes the HasBounds class, and adds |
|---|
| 1975 | |
|---|
| 1976 | getBounds :: (MArray a e m, Ix i) => a i e -> m (i,i) |
|---|
| 1977 | |
|---|
| 1978 | to the MArray class, and |
|---|
| 1979 | |
|---|
| 1980 | bounds :: (IArray a e, Ix i) => a i e -> (i,i) |
|---|
| 1981 | |
|---|
| 1982 | to the IArray class. |
|---|
| 1983 | |
|---|
| 1984 | The reason that bounds had to be incorporated into the IArray class is |
|---|
| 1985 | because I couldn't make DiffArray work without doing this. DiffArray |
|---|
| 1986 | acts as a layer converting an MArray into an IArray, and there was no |
|---|
| 1987 | way (that I could find) to define an instance of HasBounds for |
|---|
| 1988 | DiffArray. |
|---|
| 1989 | ] |
|---|
| 1990 | [deprecate this module. |
|---|
| 1991 | Simon Marlow <simonmar@microsoft.com>**20060808100708] |
|---|
| 1992 | [add traceShow (see #474) |
|---|
| 1993 | Simon Marlow <simonmar@microsoft.com>**20060807155545] |
|---|
| 1994 | [remove spurious 'extern "C" {' |
|---|
| 1995 | Simon Marlow <simonmar@microsoft.com>**20060724160258] |
|---|
| 1996 | [Fix unsafeIndex for large ranges |
|---|
| 1997 | Simon Marlow <simonmar@microsoft.com>**20060721100225] |
|---|
| 1998 | [disambiguate uses of foldr for nhc98 to compile without errors |
|---|
| 1999 | Malcolm.Wallace@cs.york.ac.uk**20060711161614] |
|---|
| 2000 | [make Control.Monad.Instances compilable by nhc98 |
|---|
| 2001 | Malcolm.Wallace@cs.york.ac.uk**20060711160941] |
|---|
| 2002 | [breakpointCond |
|---|
| 2003 | Lemmih <lemmih@gmail.com>**20060708055528] |
|---|
| 2004 | [UNDO: Merge "unrecognized long opt" fix from 6.4.2 |
|---|
| 2005 | Simon Marlow <simonmar@microsoft.com>**20060705142537 |
|---|
| 2006 | This patch undid the previous patch, "RequireOrder: do not collect |
|---|
| 2007 | unrecognised options after a non-opt". I asked Sven to revert it, but |
|---|
| 2008 | didn't get an answer. |
|---|
| 2009 | |
|---|
| 2010 | See bug #473. |
|---|
| 2011 | ] |
|---|
| 2012 | [Avoid strictness in accumulator for unpackFoldr |
|---|
| 2013 | Don Stewart <dons@cse.unsw.edu.au>**20060703091806 |
|---|
| 2014 | |
|---|
| 2015 | The seq on the accumulator for unpackFoldr will break in the presence of |
|---|
| 2016 | head/build rewrite rules. The empty list case will be forced, producing |
|---|
| 2017 | an exception. This is a known issue with seq and rewrite rules that we |
|---|
| 2018 | just stumbled on to. |
|---|
| 2019 | |
|---|
| 2020 | ] |
|---|
| 2021 | [Disable unpack/build fusion |
|---|
| 2022 | Don Stewart <dons@cse.unsw.edu.au>**20060702083913 |
|---|
| 2023 | |
|---|
| 2024 | unpack/build on bytestrings seems to trigger a bug when interacting with |
|---|
| 2025 | head/build fusion in GHC.List. The bytestring001 testcase catches it. |
|---|
| 2026 | |
|---|
| 2027 | I'll investigate further, but best to disable this for now (its not |
|---|
| 2028 | often used anyway). |
|---|
| 2029 | |
|---|
| 2030 | Note that with -frules-off or ghc 6.4.2 things are fine. It seems to |
|---|
| 2031 | have emerged with the recent rules changes. |
|---|
| 2032 | |
|---|
| 2033 | ] |
|---|
| 2034 | [Import Data.ByteString.Lazy, improve ByteString Fusion, and resync with FPS head |
|---|
| 2035 | Don Stewart <dons@cse.unsw.edu.au>**20060701084345 |
|---|
| 2036 | |
|---|
| 2037 | This patch imports the Data.ByteString.Lazy module, and its helpers, |
|---|
| 2038 | providing a ByteString implemented as a lazy list of strict cache-sized |
|---|
| 2039 | chunks. This type allows the usual lazy operations to be written on |
|---|
| 2040 | bytestrings, including lazy IO, with much improved space and time over |
|---|
| 2041 | the [Char] equivalents. |
|---|
| 2042 | |
|---|
| 2043 | ] |
|---|
| 2044 | [Wibble in docs for new ForeignPtr functionsn |
|---|
| 2045 | Don Stewart <dons@cse.unsw.edu.au>**20060609075924] |
|---|
| 2046 | [comments for Applicative and Traversable |
|---|
| 2047 | Ross Paterson <ross@soi.city.ac.uk>**20060622170436] |
|---|
| 2048 | [default to NoBuffering on Windows for a read/write text file |
|---|
| 2049 | Simon Marlow <simonmar@microsoft.com>**20060622144446 |
|---|
| 2050 | Fixes (works around) #679 |
|---|
| 2051 | ] |
|---|
| 2052 | [remove dead code |
|---|
| 2053 | Simon Marlow <simonmar@microsoft.com>**20060622144433] |
|---|
| 2054 | [clarify and expand docs |
|---|
| 2055 | Simon Marlow <simonmar@microsoft.com>**20060622112911] |
|---|
| 2056 | [Add minView and maxView to Map and Set |
|---|
| 2057 | jeanphilippe.bernardy@gmail.com**20060616180121] |
|---|
| 2058 | [add signature for registerDelay |
|---|
| 2059 | Ross Paterson <ross@soi.city.ac.uk>**20060614114456] |
|---|
| 2060 | [a few doc comments |
|---|
| 2061 | Ross Paterson <ross@soi.city.ac.uk>**20060613142704] |
|---|
| 2062 | [Optimised foreign pointer representation, for heap-allocated objects |
|---|
| 2063 | Don Stewart <dons@cse.unsw.edu.au>**20060608015011] |
|---|
| 2064 | [Add the inline function, and many comments |
|---|
| 2065 | simonpj@microsoft.com**20060605115814 |
|---|
| 2066 | |
|---|
| 2067 | This commit adds the 'inline' function described in the |
|---|
| 2068 | related patch in the compiler. |
|---|
| 2069 | |
|---|
| 2070 | I've also added comments about the 'lazy' function. |
|---|
| 2071 | |
|---|
| 2072 | ] |
|---|
| 2073 | [small intro to exceptions |
|---|
| 2074 | Ross Paterson <ross@soi.city.ac.uk>**20060525111604] |
|---|
| 2075 | [export breakpoint |
|---|
| 2076 | Simon Marlow <simonmar@microsoft.com>**20060525090456] |
|---|
| 2077 | [Merge in changes from fps head. Highlights: |
|---|
| 2078 | Don Stewart <dons@cse.unsw.edu.au>**20060525065012 |
|---|
| 2079 | |
|---|
| 2080 | Wed May 24 15:49:38 EST 2006 sjanssen@cse.unl.edu |
|---|
| 2081 | * instance Monoid ByteString |
|---|
| 2082 | |
|---|
| 2083 | Wed May 24 15:04:04 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 2084 | * Rearange export lists for the .Char8 modules |
|---|
| 2085 | |
|---|
| 2086 | Wed May 24 14:59:56 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 2087 | * Implement mapAccumL and reimplement mapIndexed using loopU |
|---|
| 2088 | |
|---|
| 2089 | Wed May 24 14:47:32 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 2090 | * Change the implementation of the unfoldr(N) functions. |
|---|
| 2091 | Use a more compact implementation for unfoldrN and change it's behaviour |
|---|
| 2092 | to only return Just in the case that it actually 'overflowed' the N, so |
|---|
| 2093 | the boundary case of unfolding exactly N gives Nothing. |
|---|
| 2094 | Implement unfoldr and Lazy.unfoldr in terms of unfoldrN. Use fibonacci |
|---|
| 2095 | growth for the chunk size in unfoldr |
|---|
| 2096 | |
|---|
| 2097 | Wed May 24 08:32:29 EST 2006 sjanssen@cse.unl.edu |
|---|
| 2098 | * Add unfoldr to ByteString and .Char8 |
|---|
| 2099 | A preliminary implementation of unfoldr. |
|---|
| 2100 | |
|---|
| 2101 | Wed May 24 01:39:41 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 2102 | * Reorder the export lists to better match the Data.List api |
|---|
| 2103 | |
|---|
| 2104 | Tue May 23 14:04:32 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2105 | * pack{Byte,Char} -> singleton. As per fptools convention |
|---|
| 2106 | |
|---|
| 2107 | Tue May 23 14:00:51 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2108 | * elemIndexLast -> elemIndexEnd |
|---|
| 2109 | |
|---|
| 2110 | Tue May 23 13:57:34 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2111 | * In the search for a more orthogonal api, we kill breakFirst/breakLast, |
|---|
| 2112 | which were of dubious value |
|---|
| 2113 | |
|---|
| 2114 | Tue May 23 12:24:09 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2115 | * Abolish elems. It's name implied it was unpack, but its type didn't. it made no sense |
|---|
| 2116 | |
|---|
| 2117 | Tue May 23 10:42:09 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 2118 | * Minor doc tidyup. Use haddock markup better. |
|---|
| 2119 | |
|---|
| 2120 | Tue May 23 11:00:31 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2121 | * Simplify the join() implementation. Spotted by Duncan. |
|---|
| 2122 | |
|---|
| 2123 | ] |
|---|
| 2124 | [add a way to ask the IO manager thread to exit |
|---|
| 2125 | Simon Marlow <simonmar@microsoft.com>**20060524121823] |
|---|
| 2126 | [Sync with FPS head, including the following patches: |
|---|
| 2127 | Don Stewart <dons@cse.unsw.edu.au>**20060520030436 |
|---|
| 2128 | |
|---|
| 2129 | Thu May 18 15:45:46 EST 2006 sjanssen@cse.unl.edu |
|---|
| 2130 | * Export unsafeTake and unsafeDrop |
|---|
| 2131 | |
|---|
| 2132 | Fri May 19 11:53:08 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2133 | * Add foldl1' |
|---|
| 2134 | |
|---|
| 2135 | Fri May 19 13:41:24 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2136 | * Add fuseable scanl, scanl1 + properties |
|---|
| 2137 | |
|---|
| 2138 | Fri May 19 18:20:40 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2139 | * Spotted another chance to use unsafeTake,Drop (in groupBy) |
|---|
| 2140 | |
|---|
| 2141 | Thu May 18 09:24:25 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 2142 | * More effecient findIndexOrEnd based on the impl of findIndex |
|---|
| 2143 | |
|---|
| 2144 | Thu May 18 09:22:49 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 2145 | * Eliminate special case in findIndex since it's handled anyway. |
|---|
| 2146 | |
|---|
| 2147 | Thu May 18 09:19:08 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 2148 | * Add unsafeTake and unsafeDrop |
|---|
| 2149 | These versions assume the n is in the bounds of the bytestring, saving |
|---|
| 2150 | two comparison tests. Then use them in varous places where we think this |
|---|
| 2151 | holds. These cases need double checking (and there are a few remaining |
|---|
| 2152 | internal uses of take / drop that might be possible to convert). |
|---|
| 2153 | Not exported for the moment. |
|---|
| 2154 | |
|---|
| 2155 | Tue May 16 23:15:11 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2156 | * Handle n < 0 in drop and splitAt. Spotted by QC. |
|---|
| 2157 | |
|---|
| 2158 | Tue May 16 22:46:22 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2159 | * Handle n <= 0 cases for unfoldr and replicate. Spotted by QC |
|---|
| 2160 | |
|---|
| 2161 | Tue May 16 21:34:11 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2162 | * mapF -> map', filterF -> filter' |
|---|
| 2163 | |
|---|
| 2164 | ] |
|---|
| 2165 | [haddock fix |
|---|
| 2166 | Ross Paterson <ross@soi.city.ac.uk>**20060518154723] |
|---|
| 2167 | [simplify indexing in Data.Sequence |
|---|
| 2168 | Ross Paterson <ross@soi.city.ac.uk>**20060518154316] |
|---|
| 2169 | [Move Eq, Ord, Show instances for ThreadId to GHC.Conc |
|---|
| 2170 | Simon Marlow <simonmar@microsoft.com>**20060518113339 |
|---|
| 2171 | Eliminates orphans. |
|---|
| 2172 | ] |
|---|
| 2173 | [Better error handling in the IO manager thread |
|---|
| 2174 | Simon Marlow <simonmar@microsoft.com>**20060518113303 |
|---|
| 2175 | In particular, handle EBADF just like rts/posix/Select.c, by waking up |
|---|
| 2176 | all the waiting threads. Other errors are thrown, instead of just |
|---|
| 2177 | being ignored. |
|---|
| 2178 | ] |
|---|
| 2179 | [#define _REENTRANT 1 (needed to get the right errno on some OSs) |
|---|
| 2180 | Simon Marlow <simonmar@microsoft.com>**20060518104151 |
|---|
| 2181 | Part 2 of the fix for threaded RTS problems on Solaris and possibly |
|---|
| 2182 | *BSD (Part 1 was the same change in ghc/includes/Rts.h). |
|---|
| 2183 | ] |
|---|
| 2184 | [copyCString* should be in IO. Spotted by Tomasz Zielonka |
|---|
| 2185 | Don Stewart <dons@cse.unsw.edu.au>**20060518012154] |
|---|
| 2186 | [add import Prelude to get dependencies right for Data/Fixed.hs |
|---|
| 2187 | Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060517222044 |
|---|
| 2188 | Hopefully this fixes parallel builds. |
|---|
| 2189 | ] |
|---|
| 2190 | [Fix negative index handling in splitAt, replicate and unfoldrN. Move mapF, filterF -> map', filter' while we're here |
|---|
| 2191 | Don Stewart <dons@cse.unsw.edu.au>**20060517020150] |
|---|
| 2192 | [Use our own realloc. Thus reduction functions (like filter) allocate on the Haskell heap. Makes around 10% difference. |
|---|
| 2193 | Don Stewart <dons@cse.unsw.edu.au>**20060513051736] |
|---|
| 2194 | [Last two CInt fixes for 64 bit, and bracket writeFile while we're here |
|---|
| 2195 | Don Stewart <dons@cse.unsw.edu.au>**20060512050750] |
|---|
| 2196 | [Some small optimisations, generalise the type of unfold |
|---|
| 2197 | Don Stewart <dons@cse.unsw.edu.au>**20060510043309 |
|---|
| 2198 | |
|---|
| 2199 | Tue May 9 22:36:29 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 2200 | * Surely the error function should not be inlined. |
|---|
| 2201 | |
|---|
| 2202 | Tue May 9 22:35:53 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 2203 | * Reorder memory writes for better cache locality. |
|---|
| 2204 | |
|---|
| 2205 | Tue May 9 23:28:09 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 2206 | * Generalise the type of unfoldrN |
|---|
| 2207 | |
|---|
| 2208 | The type of unfoldrN was overly constrained: |
|---|
| 2209 | unfoldrN :: Int -> (Word8 -> Maybe (Word8, Word8)) -> Word8 -> ByteString |
|---|
| 2210 | |
|---|
| 2211 | if we compare that to unfoldr: |
|---|
| 2212 | unfoldr :: (b -> Maybe (a, b)) -> b -> [a] |
|---|
| 2213 | |
|---|
| 2214 | So we can generalise unfoldrN to this type: |
|---|
| 2215 | unfoldrN :: Int -> (a -> Maybe (Word8, a)) -> a -> ByteString |
|---|
| 2216 | |
|---|
| 2217 | and something similar for the .Char8 version. If people really do want to |
|---|
| 2218 | use it a lot with Word8/Char then perhaps we should add a specialise pragma. |
|---|
| 2219 | |
|---|
| 2220 | Wed May 10 13:26:40 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2221 | * Add foldl', and thus a fusion rule for length . {map,filter,fold}, |
|---|
| 2222 | that avoids creating an array at all if the end of the pipeline is a 'length' reduction |
|---|
| 2223 | |
|---|
| 2224 | **END OF DESCRIPTION*** |
|---|
| 2225 | |
|---|
| 2226 | Place the long patch description above the ***END OF DESCRIPTION*** marker. |
|---|
| 2227 | The first line of this file will be the patch name. |
|---|
| 2228 | |
|---|
| 2229 | |
|---|
| 2230 | This patch contains the following changes: |
|---|
| 2231 | |
|---|
| 2232 | M ./Data/ByteString.hs -8 +38 |
|---|
| 2233 | M ./Data/ByteString/Char8.hs -6 +12 |
|---|
| 2234 | ] |
|---|
| 2235 | [portable implementation of WordPtr/IntPtr for non-GHC |
|---|
| 2236 | Ross Paterson <ross@soi.city.ac.uk>**20060510001826 |
|---|
| 2237 | |
|---|
| 2238 | plus much tweaking of imports to avoid cycles |
|---|
| 2239 | ] |
|---|
| 2240 | [add WordPtr and IntPtr types to Foreign.Ptr, with associated conversions |
|---|
| 2241 | Simon Marlow <simonmar@microsoft.com>**20060509092606 |
|---|
| 2242 | |
|---|
| 2243 | As suggested by John Meacham. |
|---|
| 2244 | |
|---|
| 2245 | I had to move the Show instance for Ptr into GHC.ForeignPtr to avoid |
|---|
| 2246 | recursive dependencies. |
|---|
| 2247 | ] |
|---|
| 2248 | [add CIntPtr, CUIntPtr, CIntMax, CUIntMax types |
|---|
| 2249 | Simon Marlow <simonmar@microsoft.com>**20060509092427] |
|---|
| 2250 | [add GHC.Dynamic |
|---|
| 2251 | Simon Marlow <simonmar@microsoft.com>**20060509082739] |
|---|
| 2252 | [Two things. #if defined(__GLASGOW_HASKELL__) on INLINE [n] pragmas (for jhc). And careful use of INLINE on words/unwords halves runtime for those functions |
|---|
| 2253 | Don Stewart <dons@cse.unsw.edu.au>**20060509023425] |
|---|
| 2254 | [Make length a good consumer |
|---|
| 2255 | simonpj@microsoft**20060508142726 |
|---|
| 2256 | |
|---|
| 2257 | Make length into a good consumer. Fixes Trac bug #707. |
|---|
| 2258 | |
|---|
| 2259 | (Before length simply didn't use foldr.) |
|---|
| 2260 | |
|---|
| 2261 | ] |
|---|
| 2262 | [Trim imports |
|---|
| 2263 | simonpj@microsoft**20060508142557] |
|---|
| 2264 | [Make unsafePerformIO lazy |
|---|
| 2265 | simonpj@microsoft**20060508142507 |
|---|
| 2266 | |
|---|
| 2267 | The stricteness analyser used to have a HACK which ensured that NOINLNE things |
|---|
| 2268 | were not strictness-analysed. The reason was unsafePerformIO. Left to itself, |
|---|
| 2269 | the strictness analyser would discover this strictness for unsafePerformIO: |
|---|
| 2270 | unsafePerformIO: C(U(AV)) |
|---|
| 2271 | But then consider this sub-expression |
|---|
| 2272 | unsafePerformIO (\s -> let r = f x in |
|---|
| 2273 | case writeIORef v r s of (# s1, _ #) -> |
|---|
| 2274 | (# s1, r #) |
|---|
| 2275 | The strictness analyser will now find that r is sure to be eval'd, |
|---|
| 2276 | and may then hoist it out. This makes tests/lib/should_run/memo002 |
|---|
| 2277 | deadlock. |
|---|
| 2278 | |
|---|
| 2279 | Solving this by making all NOINLINE things have no strictness info is overkill. |
|---|
| 2280 | In particular, it's overkill for runST, which is perfectly respectable. |
|---|
| 2281 | Consider |
|---|
| 2282 | f x = runST (return x) |
|---|
| 2283 | This should be strict in x. |
|---|
| 2284 | |
|---|
| 2285 | So the new plan is to define unsafePerformIO using the 'lazy' combinator: |
|---|
| 2286 | |
|---|
| 2287 | unsafePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r) |
|---|
| 2288 | |
|---|
| 2289 | Remember, 'lazy' is a wired-in identity-function Id, of type a->a, which is |
|---|
| 2290 | magically NON-STRICT, and is inlined after strictness analysis. So |
|---|
| 2291 | unsafePerformIO will look non-strict, and that's what we want. |
|---|
| 2292 | |
|---|
| 2293 | ] |
|---|
| 2294 | [Sync with FPS head. |
|---|
| 2295 | Don Stewart <dons@cse.unsw.edu.au>**20060508122322 |
|---|
| 2296 | |
|---|
| 2297 | Mon May 8 10:40:14 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2298 | * Fix all uses for Int that should be CInt or CSize in ffi imports. |
|---|
| 2299 | Spotted by Igloo, dcoutts |
|---|
| 2300 | |
|---|
| 2301 | Mon May 8 16:09:41 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2302 | * Import nicer loop/loop fusion rule from ghc-ndp |
|---|
| 2303 | |
|---|
| 2304 | Mon May 8 17:36:07 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2305 | * Fix stack leak in split on > 60M strings |
|---|
| 2306 | |
|---|
| 2307 | Mon May 8 17:50:13 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2308 | * Try same fix for stack overflow in elemIndices |
|---|
| 2309 | |
|---|
| 2310 | ] |
|---|
| 2311 | [Fix all uses for Int that should be CInt or CSize in ffi imports. Spotted by Duncan and Ian |
|---|
| 2312 | Don Stewart <dons@cse.unsw.edu.au>**20060508010311] |
|---|
| 2313 | [Fixed import list syntax |
|---|
| 2314 | Sven Panne <sven.panne@aedion.de>**20060507155008] |
|---|
| 2315 | [Faster filterF, filterNotByte |
|---|
| 2316 | dons@cse.unsw.edu.au**20060507042301] |
|---|
| 2317 | [Much faster find, findIndex. Hint from sjanssen |
|---|
| 2318 | dons@cse.unsw.edu.au**20060507033048] |
|---|
| 2319 | [Merge "unrecognized long opt" fix from 6.4.2 |
|---|
| 2320 | Sven Panne <sven.panne@aedion.de>**20060506110519] |
|---|
| 2321 | [ |
|---|
| 2322 | dons@cse.unsw.edu.au**20060506061029 |
|---|
| 2323 | Sat May 6 13:01:34 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2324 | * Do loopU realloc on the Haskell heap. And add a really tough stress test |
|---|
| 2325 | |
|---|
| 2326 | Sat May 6 12:28:58 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2327 | * Use simple, 3x faster concat. Plus QC properties. Suggested by sjanssen and dcoutts |
|---|
| 2328 | |
|---|
| 2329 | Sat May 6 15:59:31 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2330 | * dcoutt's packByte bug squashed |
|---|
| 2331 | |
|---|
| 2332 | With inlinePerformIO, ghc head was compiling: |
|---|
| 2333 | |
|---|
| 2334 | packByte 255 `compare` packByte 127 |
|---|
| 2335 | |
|---|
| 2336 | into roughly |
|---|
| 2337 | |
|---|
| 2338 | case mallocByteString 2 of |
|---|
| 2339 | ForeignPtr f internals -> |
|---|
| 2340 | case writeWord8OffAddr# f 0 255 of _ -> |
|---|
| 2341 | case writeWord8OffAddr# f 0 127 of _ -> |
|---|
| 2342 | case eqAddr# f f of |
|---|
| 2343 | False -> case compare (GHC.Prim.plusAddr# f 0) |
|---|
| 2344 | (GHC.Prim.plusAddr# f 0) |
|---|
| 2345 | |
|---|
| 2346 | which is rather stunning. unsafePerformIO seems to prevent whatever |
|---|
| 2347 | magic inlining was leading to this. Only affected the head. |
|---|
| 2348 | |
|---|
| 2349 | ] |
|---|
| 2350 | [Add array fusion versions of map, filter and foldl |
|---|
| 2351 | dons@cse.unsw.edu.au**20060505060858 |
|---|
| 2352 | |
|---|
| 2353 | This patch adds fusable map, filter and foldl, using the array fusion |
|---|
| 2354 | code for unlifted, flat arrays, from the Data Parallel Haskell branch, |
|---|
| 2355 | after kind help from Roman Leshchinskiy, |
|---|
| 2356 | |
|---|
| 2357 | Pipelines of maps, filters and folds should now need to walk the |
|---|
| 2358 | bytestring once only, and intermediate bytestrings won't be constructed. |
|---|
| 2359 | |
|---|
| 2360 | ] |
|---|
| 2361 | [fix for non-GHC |
|---|
| 2362 | Ross Paterson <ross@soi.city.ac.uk>**20060504093044] |
|---|
| 2363 | [use bracket in appendFile (like writeFile) |
|---|
| 2364 | Ross Paterson <ross@soi.city.ac.uk>**20060504091528] |
|---|
| 2365 | [writeFile: close the file on error |
|---|
| 2366 | Simon Marlow <simonmar@microsoft.com>**20060504084505 |
|---|
| 2367 | Suggested by Ross Paterson, via Neil Mitchell |
|---|
| 2368 | |
|---|
| 2369 | ] |
|---|
| 2370 | [Sync with FPS head |
|---|
| 2371 | dons@cse.unsw.edu.au**20060503105259 |
|---|
| 2372 | |
|---|
| 2373 | This patch brings Data.ByteString into sync with the FPS head. |
|---|
| 2374 | The most significant of which is the new Haskell counting sort. |
|---|
| 2375 | |
|---|
| 2376 | Changes: |
|---|
| 2377 | |
|---|
| 2378 | Sun Apr 30 18:16:29 EST 2006 sjanssen@cse.unl.edu |
|---|
| 2379 | * Fix foldr1 in Data.ByteString and Data.ByteString.Char8 |
|---|
| 2380 | |
|---|
| 2381 | Mon May 1 11:51:16 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 2382 | * Add group and groupBy. Suggested by conversation between sjanssen and petekaz on #haskell |
|---|
| 2383 | |
|---|
| 2384 | Mon May 1 16:42:04 EST 2006 sjanssen@cse.unl.edu |
|---|
| 2385 | * Fix groupBy to match Data.List.groupBy. |
|---|
| 2386 | |
|---|
| 2387 | Wed May 3 15:01:07 EST 2006 sjanssen@cse.unl.edu |
|---|
| 2388 | * Migrate to counting sort. |
|---|
| 2389 | |
|---|
| 2390 | Data.ByteString.sort used C's qsort(), which is O(n log n). The new algorithm |
|---|
| 2391 | is O(n), and is faster for strings larger than approximately thirty bytes. We |
|---|
| 2392 | also reduce our dependency on cbits! |
|---|
| 2393 | |
|---|
| 2394 | ] |
|---|
| 2395 | [improve performance of Integer->String conversion |
|---|
| 2396 | Simon Marlow <simonmar@microsoft.com>**20060503113306 |
|---|
| 2397 | See |
|---|
| 2398 | http://www.haskell.org//pipermail/libraries/2006-April/005227.html |
|---|
| 2399 | |
|---|
| 2400 | Submitted by: bertram.felgenhauer@googlemail.com |
|---|
| 2401 | |
|---|
| 2402 | |
|---|
| 2403 | ] |
|---|
| 2404 | [inline withMVar, modifyMVar, modifyMVar_ |
|---|
| 2405 | Simon Marlow <simonmar@microsoft.com>**20060503111152] |
|---|
| 2406 | [Fix string truncating in hGetLine -- it was a pasto from Simon's code |
|---|
| 2407 | Simon Marlow <simonmar@microsoft.com>**20060503103504 |
|---|
| 2408 | (from Don Stewart) |
|---|
| 2409 | ] |
|---|
| 2410 | [Merge in Data.ByteString head. Fixes ByteString+cbits in hugs |
|---|
| 2411 | Don Stewart <dons@cse.unsw.edu.au>**20060429040733] |
|---|
| 2412 | [Import Data.ByteString from fps 0.5. |
|---|
| 2413 | Don Stewart <dons@cse.unsw.edu.au>**20060428130718 |
|---|
| 2414 | Fast, packed byte vectors, providing a better PackedString. |
|---|
| 2415 | |
|---|
| 2416 | ] |
|---|
| 2417 | [fix previous patch |
|---|
| 2418 | Ross Paterson <ross@soi.city.ac.uk>**20060501154847] |
|---|
| 2419 | [fixes for non-GHC |
|---|
| 2420 | Ross Paterson <ross@soi.city.ac.uk>**20060501144322] |
|---|
| 2421 | [fix imports for mingw32 && !GHC |
|---|
| 2422 | Ross Paterson <ross@soi.city.ac.uk>**20060427163248] |
|---|
| 2423 | [RequireOrder: do not collect unrecognised options after a non-opt |
|---|
| 2424 | Simon Marlow <simonmar@microsoft.com>**20060426121110 |
|---|
| 2425 | The documentation for RequireOrder says "no option processing after |
|---|
| 2426 | first non-option", so it doesn't seem right that we should process the |
|---|
| 2427 | rest of the arguments to collect the unrecognised ones. Presumably |
|---|
| 2428 | the client wants to know about the unrecognised options up to the |
|---|
| 2429 | first non-option, and will be using a different option parser for the |
|---|
| 2430 | rest of the command line. |
|---|
| 2431 | |
|---|
| 2432 | eg. before: |
|---|
| 2433 | |
|---|
| 2434 | Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"] |
|---|
| 2435 | ([],["bar","--foo"],["--foo"],[]) |
|---|
| 2436 | |
|---|
| 2437 | after: |
|---|
| 2438 | |
|---|
| 2439 | Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"] |
|---|
| 2440 | ([],["bar","--foo"],[],[]) |
|---|
| 2441 | ] |
|---|
| 2442 | [fix for Haddock 0.7 |
|---|
| 2443 | Ashley Yakeley <ashley@semantic.org>**20060426072521] |
|---|
| 2444 | [add Data.Fixed module |
|---|
| 2445 | Ashley Yakeley <ashley@semantic.org>**20060425071853] |
|---|
| 2446 | [add instances |
|---|
| 2447 | Ross Paterson <ross@soi.city.ac.uk>**20060424102146] |
|---|
| 2448 | [add superclasses to Applicative and Traversable |
|---|
| 2449 | Ross Paterson <ross@soi.city.ac.uk>**20060411144734 |
|---|
| 2450 | |
|---|
| 2451 | Functor is now a superclass of Applicative, and Functor and Foldable |
|---|
| 2452 | are now superclasses of Traversable. The new hierarchy makes clear the |
|---|
| 2453 | inclusions between the classes, but means more work in defining instances. |
|---|
| 2454 | Default definitions are provided to help. |
|---|
| 2455 | ] |
|---|
| 2456 | [add Functor and Monad instances for Prelude types |
|---|
| 2457 | Ross Paterson <ross@soi.city.ac.uk>**20060410111443] |
|---|
| 2458 | [GHC.Base.breakpoint |
|---|
| 2459 | Lemmih <lemmih@gmail.com>**20060407125827] |
|---|
| 2460 | [Track the GHC source tree reorganisation |
|---|
| 2461 | Simon Marlow <simonmar@microsoft.com>**20060407041631] |
|---|
| 2462 | [in the show instance for Exception, print the type of dynamic exceptions |
|---|
| 2463 | Simon Marlow <simonmar@microsoft.com>**20060406112444 |
|---|
| 2464 | Unfortunately this requires some recursve module hackery to get at |
|---|
| 2465 | the show instance for Typeable. |
|---|
| 2466 | ] |
|---|
| 2467 | [implement ForeignEnvPtr, newForeignPtrEnv, addForeignPtrEnv for GHC |
|---|
| 2468 | Simon Marlow <simonmar@microsoft.com>**20060405155448] |
|---|
| 2469 | [add forkOnIO :: Int -> IO () -> IO ThreadId |
|---|
| 2470 | Simon Marlow <simonmar@microsoft.com>**20060327135018] |
|---|
| 2471 | [Rework previous: not a gcc bug after all |
|---|
| 2472 | Simon Marlow <simonmar@microsoft.com>**20060323161229 |
|---|
| 2473 | It turns out that we were relying on behaviour that is undefined in C, |
|---|
| 2474 | and undefined behaviour in C means "the compiler can do whatever the |
|---|
| 2475 | hell it likes with your entire program". So avoid that. |
|---|
| 2476 | ] |
|---|
| 2477 | [work around a gcc 4.1.0 codegen bug in -O2 by forcing -O1 for GHC.Show |
|---|
| 2478 | Simon Marlow <simonmar@microsoft.com>**20060323134514 |
|---|
| 2479 | See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26824 |
|---|
| 2480 | ] |
|---|
| 2481 | [commit mysteriously missing parts of "runIOFastExit" patch |
|---|
| 2482 | Simon Marlow <simonmar@microsoft.com>**20060321101535] |
|---|
| 2483 | [add runIOFastExit :: IO a -> IO a |
|---|
| 2484 | Simon Marlow <simonmar@microsoft.com>**20060320124333 |
|---|
| 2485 | Similar to runIO, but calls stg_exit() directly to exit, rather than |
|---|
| 2486 | shutdownHaskellAndExit(). Needed for running GHCi in the test suite. |
|---|
| 2487 | ] |
|---|
| 2488 | [Fix a broken invariant |
|---|
| 2489 | Simon Marlow <simonmar@microsoft.com>**20060316134151 |
|---|
| 2490 | Patch from #694, for the problem "empty is an identity for <> and $$" is |
|---|
| 2491 | currently broken by eg. isEmpty (empty<>empty)" |
|---|
| 2492 | ] |
|---|
| 2493 | [Add unsafeSTToIO :: ST s a -> IO a |
|---|
| 2494 | Simon Marlow <simonmar@microsoft.com>**20060315160232 |
|---|
| 2495 | Implementation for Hugs is missing, but should be easy. We need this |
|---|
| 2496 | for the forthcoming nested data parallelism implementation. |
|---|
| 2497 | ] |
|---|
| 2498 | [Added 'alter' |
|---|
| 2499 | jeanphilippe.bernardy@gmail.com**20060315143539 |
|---|
| 2500 | Added 'alter :: (Maybe a -> Maybe a) -> k -> Map k a -> Map k a' to IntMap and Map |
|---|
| 2501 | This addresses ticket #665 |
|---|
| 2502 | ] |
|---|
| 2503 | [deprecate FunctorM in favour of Foldable and Traversable |
|---|
| 2504 | Ross Paterson <ross@soi.city.ac.uk>**20060315092942 |
|---|
| 2505 | as discussed on the libraries list. |
|---|
| 2506 | ] |
|---|
| 2507 | [Simplify Eq, Ord, and Show instances for UArray |
|---|
| 2508 | Simon Marlow <simonmar@microsoft.com>**20060313142701 |
|---|
| 2509 | The Eq, Ord, and Show instances of UArray were written out longhand |
|---|
| 2510 | with one instance per element type. It is possible to condense these |
|---|
| 2511 | into a single instance for each class, at the expense of using more |
|---|
| 2512 | extensions (non-std context on instance declaration). |
|---|
| 2513 | |
|---|
| 2514 | Suggestion by: Frederik Eaton <frederik@ofb.net> |
|---|
| 2515 | |
|---|
| 2516 | ] |
|---|
| 2517 | [Oops typo in intSet notMember |
|---|
| 2518 | jeanphilippe.bernardy@gmail.com**20060311224713] |
|---|
| 2519 | [IntMap lookup now returns monad instead of Maybe. |
|---|
| 2520 | jeanphilippe.bernardy@gmail.com**20060311224502] |
|---|
| 2521 | [Added notMember to Data.IntSet and Data.IntMap |
|---|
| 2522 | jeanphilippe.bernardy@gmail.com**20060311085221] |
|---|
| 2523 | [add Data.Set.notMember and Data.Map.notMember |
|---|
| 2524 | John Meacham <john@repetae.net>**20060309191806] |
|---|
| 2525 | [addToClockTime: handle picoseconds properly |
|---|
| 2526 | Simon Marlow <simonmar@microsoft.com>**20060310114532 |
|---|
| 2527 | fixes #588 |
|---|
| 2528 | ] |
|---|
| 2529 | [make head/build rule apply to all types, not just Bool. |
|---|
| 2530 | John Meacham <john@repetae.net>**20060303045753] |
|---|
| 2531 | [Avoid overflow when normalising clock times |
|---|
| 2532 | Ian Lynagh <igloo@earth.li>**20060210144638] |
|---|
| 2533 | [Years have 365 days, not 30*365 |
|---|
| 2534 | Ian Lynagh <igloo@earth.li>**20060210142853] |
|---|
| 2535 | [declare blkcmp() static |
|---|
| 2536 | Simon Marlow <simonmar@microsoft.com>**20060223134317] |
|---|
| 2537 | [typo in comment in Foldable class |
|---|
| 2538 | Ross Paterson <ross@soi.city.ac.uk>**20060209004901] |
|---|
| 2539 | [simplify fmap |
|---|
| 2540 | Ross Paterson <ross@soi.city.ac.uk>**20060206095048] |
|---|
| 2541 | [update ref in comment |
|---|
| 2542 | Ross Paterson <ross@soi.city.ac.uk>**20060206095139] |
|---|
| 2543 | [Give -foverlapping-instances to Data.Typeable |
|---|
| 2544 | simonpj@microsoft**20060206133439 |
|---|
| 2545 | |
|---|
| 2546 | For some time, GHC has made -fallow-overlapping-instances "sticky": |
|---|
| 2547 | any instance in a module compiled with -fallow-overlapping-instances |
|---|
| 2548 | can overlap when imported, regardless of whether the importing module |
|---|
| 2549 | allows overlap. (If there is an overlap, both instances must come from |
|---|
| 2550 | modules thus compiled.) |
|---|
| 2551 | |
|---|
| 2552 | Instances in Data.Typeable might well want to be overlapped, so this |
|---|
| 2553 | commit adds the flag to Data.Typeable (with an explanatory comment) |
|---|
| 2554 | |
|---|
| 2555 | |
|---|
| 2556 | ] |
|---|
| 2557 | [Add -fno-bang-patterns to modules using both bang and glasgow-exts |
|---|
| 2558 | simonpj@microsoft.com**20060203175759] |
|---|
| 2559 | [When splitting a bucket, keep the contents in the same order |
|---|
| 2560 | Simon Marlow <simonmar@microsoft.com>**20060201130427 |
|---|
| 2561 | To retain the property that multiple inserts shadow each other |
|---|
| 2562 | (see ticket #661, test hash001) |
|---|
| 2563 | ] |
|---|
| 2564 | [add foldr/build optimisation for take and replicate |
|---|
| 2565 | Simon Marlow <simonmar@microsoft.com>**20060126164603 |
|---|
| 2566 | This allows take to be deforested, and improves performance of |
|---|
| 2567 | replicate and replicateM/replicateM_. We have a separate problem that |
|---|
| 2568 | means expressions involving [n..m] aren't being completely optimised |
|---|
| 2569 | because eftIntFB isn't being inlined but otherwise the results look |
|---|
| 2570 | good. |
|---|
| 2571 | |
|---|
| 2572 | Sadly this has invalidated a number of the nofib benchmarks which were |
|---|
| 2573 | erroneously using take to duplicate work in a misguided attempt to |
|---|
| 2574 | lengthen their runtimes (ToDo). |
|---|
| 2575 | ] |
|---|
| 2576 | [Generate PrimopWrappers.hs with Haddock docs |
|---|
| 2577 | Simon Marlow <simonmar@microsoft.com>**20060124131121 |
|---|
| 2578 | Patch originally from Dinko Tenev <dinko.tenev@gmail.com>, modified |
|---|
| 2579 | to add log message by me. |
|---|
| 2580 | ] |
|---|
| 2581 | [[project @ 2006-01-19 14:47:15 by ross] |
|---|
| 2582 | ross**20060119144715 |
|---|
| 2583 | backport warning avoidance from Haddock |
|---|
| 2584 | ] |
|---|
| 2585 | [[project @ 2006-01-18 11:45:47 by malcolm] |
|---|
| 2586 | malcolm**20060118114547 |
|---|
| 2587 | Fix import of Ix for nhc98. |
|---|
| 2588 | ] |
|---|
| 2589 | [[project @ 2006-01-17 09:38:38 by ross] |
|---|
| 2590 | ross**20060117093838 |
|---|
| 2591 | add Ix instance for GeneralCategory. |
|---|
| 2592 | ] |
|---|
| 2593 | [TAG Initial conversion from CVS complete |
|---|
| 2594 | John Goerzen <jgoerzen@complete.org>**20060112154126] |
|---|
| 2595 | Patch bundle hash: |
|---|
| 2596 | c639191ee2ff30676bb2bab3d2904c8a4fad1ce3 |
|---|