New patches:
[Improved, fixed documentation for Data.Map, Data.IntMap. Added examples.
apa3a@yahoo.com**20071121162036] {
hunk ./Data/IntMap.hs 6
+ (c) Andriy Palamarchuk 2007
hunk ./Data/IntMap.hs 34
+ Operation comments contain the operation time complexity in
+ the BigO notation .
hunk ./Data/IntMap.hs 223
+
+ > fromList [(5,'a'), (3,'b')] ! 1 Error: element not in the map
+ > fromList [(5,'a'), (3,'b')] ! 5 == 'a'
hunk ./Data/IntMap.hs 230
  /O(n+m)/. See 'difference'.
+  Same as 'difference'.
hunk ./Data/IntMap.hs 278
+
+ > Data.IntMap.null (empty) == True
+ > Data.IntMap.null (singleton 1 'a') == False
+
hunk ./Data/IntMap.hs 287
+
+ > size empty == 0
+ > size (singleton 1 'a') == 1
+ > size (fromList([(1,'a'), (2,'c'), (3,'b')])) == 3
hunk ./Data/IntMap.hs 299
+
+ > member 5 (fromList [(5,'a'), (3,'b')]) == True
+ > member 1 (fromList [(5,'a'), (3,'b')]) == False
+
hunk ./Data/IntMap.hs 310
+
+ > notMember 5 (fromList [(5,'a'), (3,'b')]) == False
+ > notMember 1 (fromList [(5,'a'), (3,'b')]) == True
+
hunk ./Data/IntMap.hs 317
  /O(min(n,W))/. Lookup the value at a key in the map.
+  /O(min(n,W))/. Lookup the value at a key in the map. See also 'Data.Map.lookup'.
hunk ./Data/IntMap.hs 348
+
+ > findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x'
+ > findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a'
+
hunk ./Data/IntMap.hs 362
+
+ > empty == fromList []
+ > size empty == 0
+
hunk ./Data/IntMap.hs 371
+
+ > singleton 1 'a' == fromList [(1, 'a')]
+ > size (singleton 1 'a') == 1
+
hunk ./Data/IntMap.hs 386
+
+ > insert 5 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'x')]
+ > insert 7 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'a'), (7, 'x')]
+ > insert 5 'x' empty == singleton 5 'x'
+
hunk ./Data/IntMap.hs 409
+
+ > insertWith (++) 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "xxxa")]
+ > insertWith (++) 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")]
+ > insertWith (++) 5 "xxx" empty == singleton 5 "xxx"
+
hunk ./Data/IntMap.hs 423
+
+ > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "" ++ old_value
+ > insertWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:xxxa")]
+ > insertWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")]
+ > insertWithKey f 5 "xxx" empty == singleton 5 "xxx"
+
hunk ./Data/IntMap.hs 445
+
+ > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "" ++ old_value
+ > insertLookupWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "5:xxxa")])
+ > insertLookupWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "xxx")])
+ > insertLookupWithKey f 5 "xxx" empty == (Nothing, singleton 5 "xxx")
+
+ This is how to define @insertLookup@ using @insertLookupWithKey@:
+
+ > let insertLookup kx x t = insertLookupWithKey (\_ a _ > a) kx x t
+ > insertLookup 5 "x" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "x")])
+ > insertLookup 7 "x" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "x")])
+
hunk ./Data/IntMap.hs 476
+
+ > delete 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
+ > delete 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
+ > delete 5 empty == empty
+
hunk ./Data/IntMap.hs 495
+
+ > adjust ("new " ++) 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")]
+ > adjust ("new " ++) 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
+ > adjust ("new " ++) 7 empty == empty
+
hunk ./Data/IntMap.hs 506
+
+ > let f key x = (show key) ++ ":new " ++ x
+ > adjustWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")]
+ > adjustWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
+ > adjustWithKey f 7 empty == empty
+
hunk ./Data/IntMap.hs 519
+
+ > let f x = if x == "a" then Just "new a" else Nothing
+ > update f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")]
+ > update f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
+ > update f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+
hunk ./Data/IntMap.hs 532
+
+ > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing
+ > updateWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")]
+ > updateWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
+ > updateWithKey f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+
hunk ./Data/IntMap.hs 553
+ The function returns original value, if it is updated.
+ This is different behavior than 'Data.Map.updateLookupWithKey'.
+ Returns the original key value if the map entry is deleted.
+
+ > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing
+ > updateLookupWithKey f 5 (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "5:new a")])
+ > updateLookupWithKey f 7 (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a")])
+ > updateLookupWithKey f 3 (fromList [(5,"a"), (3,"b")]) == (Just "b", singleton 5 "a")
+
hunk ./Data/IntMap.hs 580
 In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@
+ In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@.
hunk ./Data/IntMap.hs 605
+
+ > unions [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]
+ > == fromList [(3, "b"), (5, "a"), (7, "C")]
+ > unions [(fromList [(5, "A3"), (3, "B3")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "a"), (3, "b")])]
+ > == fromList [(3, "B3"), (5, "A3"), (7, "C")]
+
hunk ./Data/IntMap.hs 615
  The union of a list of maps, with a combining operation
+  The union of a list of maps, with a combining operation.
+
+ > unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]
+ > == fromList [(3, "bB3"), (5, "aAA3"), (7, "C")]
+
hunk ./Data/IntMap.hs 624
  /O(n+m)/. The (leftbiased) union of two maps.
+  /O(n+m)/. The (leftbiased) union of two maps.
hunk ./Data/IntMap.hs 627
+
+ > union (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "a"), (7, "C")]
+
hunk ./Data/IntMap.hs 650
  /O(n+m)/. The union with a combining function.
+  /O(n+m)/. The union with a combining function.
+
+ > unionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "aA"), (7, "C")]
+
hunk ./Data/IntMap.hs 658
  /O(n+m)/. The union with a combining function.
+  /O(n+m)/. The union with a combining function.
+
+ > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "" ++ old_value
+ > unionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "5:aA"), (7, "C")]
+
hunk ./Data/IntMap.hs 686
  /O(n+m)/. Difference between two maps (based on keys).
+  /O(n+m)/. Difference between two maps (based on keys).
+
+ > difference (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 3 "b"
+
hunk ./Data/IntMap.hs 713
  /O(n+m)/. Difference with a combining function.
+  /O(n+m)/. Difference with a combining function.
+
+ > let f al ar = if al == "b" then Just (al ++ ":" ++ ar) else Nothing
+ > differenceWith f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (7, "C")])
+ > == singleton 3 "b:B"
+
hunk ./Data/IntMap.hs 727
+
+ > let f k al ar = if al == "b" then Just ((show k) ++ ":" ++ al ++ "" ++ ar) else Nothing
+ > differenceWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (10, "C")])
+ > == singleton 3 "3:bB"
+
hunk ./Data/IntMap.hs 762
  /O(n+m)/. The (leftbiased) intersection of two maps (based on keys).
+  /O(n+m)/. The (leftbiased) intersection of two maps (based on keys).
+
+ > intersection (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "a"
+
hunk ./Data/IntMap.hs 791
  /O(n+m)/. The intersection with a combining function.
+  /O(n+m)/. The intersection with a combining function.
+
+ > intersectionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "aA"
+
hunk ./Data/IntMap.hs 799
  /O(n+m)/. The intersection with a combining function.
+  /O(n+m)/. The intersection with a combining function.
+
+ > let f k al ar = (show k) ++ ":" ++ al ++ "" ++ ar
+ > intersectionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "5:aA"
+
hunk ./Data/IntMap.hs 836
+
+ > updateMinWithKey (\ k a > Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"3:b"), (5,"a")]
+ > updateMinWithKey (\ _ _ > Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+
hunk ./Data/IntMap.hs 854
+
+ > updateMaxWithKey (\ k a > Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"b"), (5,"5:a")]
+ > updateMaxWithKey (\ _ _ > Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
+
hunk ./Data/IntMap.hs 874
+
+ > v < maxViewWithKey (fromList [(5,"a"), (3,"b")])
+ > v == ((5,"a"), singleton 3 "b")
+ > maxViewWithKey empty Error: empty map
+
hunk ./Data/IntMap.hs 885
 Nil > fail "maxView: empty map has no maximal element"
+ Nil > fail "maxViewWithKey: empty map has no maximal element"
hunk ./Data/IntMap.hs 894
+
+ > v < minViewWithKey (fromList [(5,"a"), (3,"b")])
+ > v == ((3,"b"), singleton 5 "a")
+ > minViewWithKey empty Error: empty map
+
hunk ./Data/IntMap.hs 905
 Nil > fail "minView: empty map has no minimal element"
+ Nil > fail "minViewWithKey: empty map has no minimal element"
hunk ./Data/IntMap.hs 914
+
+ > updateMax (\ a > Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "Xa")]
+ > updateMax (\ _ > Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
+
hunk ./Data/IntMap.hs 922
+
+ > updateMin (\ a > Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "Xb"), (5, "a")]
+ > updateMin (\ _ > Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+
hunk ./Data/IntMap.hs 1029
{  /O(n+m)/.
+{  /O(n+m)/.
hunk ./Data/IntMap.hs 1045

hunk ./Data/IntMap.hs 1061
+
+ > map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]
+
hunk ./Data/IntMap.hs 1069
+
+ > let f key x = (show key) ++ ":" ++ x
+ > mapWithKey f (fromList [(5,"a"), (3,"b")]) == fromList [(3, "3:b"), (5, "5:a")]
+
hunk ./Data/IntMap.hs 1082
+
+ > let f a b = (a ++ b, b ++ "X")
+ > mapAccum f "Everything: " (fromList [(5,"a"), (3,"b")]) == ("Everything: ba", fromList [(3, "bX"), (5, "aX")])
+
hunk ./Data/IntMap.hs 1092
+
+ > let f a k b = (a ++ " " ++ (show k) ++ "" ++ b, b ++ "X")
+ > mapAccumWithKey f "Everything:" (fromList [(5,"a"), (3,"b")]) == ("Everything: 3b 5a", fromList [(3, "bX"), (5, "aX")])
+
hunk ./Data/IntMap.hs 1127
+
+ > filter (> "a") (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
+ > filter (> "x") (fromList [(5,"a"), (3,"b")]) == empty
+ > filter (< "a") (fromList [(5,"a"), (3,"b")]) == empty
+
hunk ./Data/IntMap.hs 1137
+
+ > filterWithKey (\k _ > k > 4) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+
hunk ./Data/IntMap.hs 1150
  /O(n)/. partition the map according to some predicate. The first
+  /O(n)/. Partition the map according to some predicate. The first
hunk ./Data/IntMap.hs 1153
+
+ > partition (> "a") (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a")
+ > partition (< "x") (fromList [(5,"a"), (3,"b")]) == (fromList [(3, "b"), (5, "a")], empty)
+ > partition (> "x") (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3, "b"), (5, "a")])
+
hunk ./Data/IntMap.hs 1162
  /O(n)/. partition the map according to some predicate. The first
+  /O(n)/. Partition the map according to some predicate. The first
hunk ./Data/IntMap.hs 1165
+
+ > partitionWithKey (\ k _ > k > 3) (fromList [(5,"a"), (3,"b")]) == (singleton 5 "a", singleton 3 "b")
+ > partitionWithKey (\ k _ > k < 7) (fromList [(5,"a"), (3,"b")]) == (fromList [(3, "b"), (5, "a")], empty)
+ > partitionWithKey (\ k _ > k > 7) (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3, "b"), (5, "a")])
+
hunk ./Data/IntMap.hs 1183
+
+ > let f x = if x == "a" then Just "new a" else Nothing
+ > mapMaybe f (fromList [(5,"a"), (3,"b")]) == singleton 5 "new a"
+
hunk ./Data/IntMap.hs 1192
+
+ > let f k _ = if k < 5 then Just ("key : " ++ (show k)) else Nothing
+ > mapMaybeWithKey f (fromList [(5,"a"), (3,"b")]) == singleton 3 "key : 3"
+
hunk ./Data/IntMap.hs 1205
+
+ > let f a = if a < "c" then Left a else Right a
+ > mapEither f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
+ > == (fromList [(3,"b"), (5,"a")], fromList [(1,"x"), (7,"z")])
+ >
+ > mapEither (\ a > Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
+ > == (empty, fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
+
hunk ./Data/IntMap.hs 1218
+
+ > let f k a = if k < 5 then Left (k * 2) else Right (a ++ a)
+ > mapEitherWithKey f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
+ > == (fromList [(1,2), (3,6)], fromList [(5,"aa"), (7,"zz")])
+ >
+ > mapEitherWithKey (\_ a > Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
+ > == (empty, fromList [(1,"x"), (3,"b"), (5,"a"), (7,"z")])
+
hunk ./Data/IntMap.hs 1240
+
+ > split 2 (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3,"b"), (5,"a")])
+ > split 3 (fromList [(5,"a"), (3,"b")]) == (empty, singleton 5 "a")
+ > split 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a")
+ > split 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", empty)
+ > split 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], empty)
+
hunk ./Data/IntMap.hs 1276
+
+ > splitLookup 2 (fromList [(5,"a"), (3,"b")]) == (empty, Nothing, fromList [(3,"b"), (5,"a")])
+ > splitLookup 3 (fromList [(5,"a"), (3,"b")]) == (empty, Just "b", singleton 5 "a")
+ > splitLookup 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", Nothing, singleton 5 "a")
+ > splitLookup 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", Just "a", empty)
+ > splitLookup 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], Nothing, empty)
+
hunk ./Data/IntMap.hs 1319
+ > let f a len = len + (length a)
+ > fold f 0 (fromList [(5,"a"), (3,"bbb")]) == 4
+
hunk ./Data/IntMap.hs 1332
+ > let f k a result = result ++ "(" ++ (show k) ++ ":" ++ a ++ ")"
+ > foldWithKey f "Map: " (fromList [(5,"a"), (3,"b")]) == "Map: (5:a)(3:b)"
+
hunk ./Data/IntMap.hs 1361
+
+ > elems (fromList [(5,"a"), (3,"b")]) == ["b","a"]
+ > elems empty == []
+
hunk ./Data/IntMap.hs 1370
+
+ > keys (fromList [(5,"a"), (3,"b")]) == [3,5]
+ > keys empty == []
+
hunk ./Data/IntMap.hs 1379
+
+ > keysSet (fromList [(5,"a"), (3,"b")]) == Data.IntSet.fromList [3,5]
+ > keysSet empty == Data.IntSet.empty
+
hunk ./Data/IntMap.hs 1388
+
+ > assocs (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]
+ > assocs empty == []
+
hunk ./Data/IntMap.hs 1401
+
+ > toList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]
+ > toList empty == []
+
hunk ./Data/IntMap.hs 1411
+
+ > toAscList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]
+
hunk ./Data/IntMap.hs 1420
+
+ > fromList [] == empty
+ > fromList [(5,"a"), (3,"b"), (5, "c")] == fromList [(5,"c"), (3,"b")]
+ > fromList [(5,"c"), (3,"b"), (5, "a")] == fromList [(5,"a"), (3,"b")]
+
hunk ./Data/IntMap.hs 1431
  /O(n*min(n,W))/. Create a map from a list of key\/value pairs with a combining function. See also 'fromAscListWith'.
+  /O(n*min(n,W))/. Create a map from a list of key\/value pairs with a combining function. See also 'fromAscListWith'.
+
+ > fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "ab"), (5, "aba")]
+ > fromListWith (++) [] == empty
+
hunk ./Data/IntMap.hs 1440
  /O(n*min(n,W))/. Build a map from a list of key\/value pairs with a combining function. See also fromAscListWithKey'.
+  /O(n*min(n,W))/. Build a map from a list of key\/value pairs with a combining function. See also fromAscListWithKey'.
+
+ > fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "ab"), (5, "aba")]
+ > fromListWith (++) [] == empty
+
hunk ./Data/IntMap.hs 1453
+
+ > fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")]
+ > fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")]
+
hunk ./Data/IntMap.hs 1463
+
+ > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")]
+
hunk ./Data/IntMap.hs 1472
+
+ > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")]
+
hunk ./Data/IntMap.hs 1481
+
+ > fromDistinctAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")]
+
hunk ./Data/Map.hs 7
+ (c) Andriy Palamarchuk 2007
hunk ./Data/Map.hs 35
+
+ Operation comments contain the operation time complexity in
+ the BigO notation .
hunk ./Data/Map.hs 99
 , mapKeys
 , mapKeysWith
 , mapKeysMonotonic
+ , mapKeys
+ , mapKeysWith
+ , mapKeysMonotonic
hunk ./Data/Map.hs 110
 , keysSet
+ , keysSet
hunk ./Data/Map.hs 203
+
+ > fromList [(5,'a'), (3,'b')] ! 1 Error: element not in the map
+ > fromList [(5,'a'), (3,'b')] ! 5 == 'a'
+
hunk ./Data/Map.hs 210
  /O(n+m)/. See 'difference'.
+  Same as 'difference'.
hunk ./Data/Map.hs 250
+
+ > Data.Map.null (empty) == True
+ > Data.Map.null (singleton 1 'a') == False
+
hunk ./Data/Map.hs 261
+
+ > size empty == 0
+ > size (singleton 1 'a') == 1
+ > size (fromList([(1,'a'), (2,'c'), (3,'b')])) == 3
+
hunk ./Data/Map.hs 273
  /O(log n)/. Lookup the value at a key in the map.
+  /O(log n)/. Lookup the value at a key in the map.
hunk ./Data/Map.hs 279
+
+ > let m = fromList [(5,'a'), (3,'b'), (7,'c')]
+ > value1 < Data.Map.lookup 5 m
+ > value1
+ > 'a'
+ > value2 < Data.Map.lookup 1 m
+ > Error: Key not found
+
+ An example of using @lookup@ with @Maybe@ monad:
+
+ > import Prelude hiding (lookup)
+ > import Data.Map
+ >
+ > employeeDept = fromList([("John","Sales"), ("Bob","IT")])
+ > deptCountry = fromList([("IT","USA"), ("Sales","France")])
+ > countryCurrency = fromList([("USA", "Dollar"), ("France", "Euro")])
+ >
+ > employeeCurrency :: String > Maybe String
+ > employeeCurrency name = do
+ > dept < lookup name employeeDept
+ > country < lookup dept deptCountry
+ > lookup country countryCurrency
+ >
+ > main = do
+ > putStrLn $ "John's currency: " ++ (show (employeeCurrency "John"))
+ > putStrLn $ "Pete's currency: " ++ (show (employeeCurrency "Pete"))
+
+ The output of this program:
+
+ > John's currency: Just "Euro"
+ > Pete's currency: Nothing
+
hunk ./Data/Map.hs 335
  /O(log n)/. Is the key a member of the map?
+  /O(log n)/. Is the key a member of the map? See also 'notMember'.
+
+ > member 5 (fromList [(5,'a'), (3,'b')]) == True
+ > member 1 (fromList [(5,'a'), (3,'b')]) == False
+
hunk ./Data/Map.hs 346
  /O(log n)/. Is the key not a member of the map?
+  /O(log n)/. Is the key not a member of the map? See also 'member'.
+
+ > notMember 5 (fromList [(5,'a'), (3,'b')]) == False
+ > notMember 1 (fromList [(5,'a'), (3,'b')]) == True
+
hunk ./Data/Map.hs 363
 the value at key @k@ or returns @def@ when the key is not in the map.
+ the value at key @k@ or returns default value @def@
+ when the key is not in the map.
+
+ > findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x'
+ > findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a'
+
hunk ./Data/Map.hs 381
+
+ > empty == fromList []
+ > size empty == 0
+
hunk ./Data/Map.hs 390
+
+ > singleton 1 'a' == fromList [(1, 'a')]
+ > size (singleton 1 'a') == 1
+
hunk ./Data/Map.hs 403
 replaced with the supplied value, i.e. 'insert' is equivalent to
+ replaced with the supplied value. 'insert' is equivalent to
hunk ./Data/Map.hs 405
+
+ > insert 5 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'x')]
+ > insert 7 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'a'), (7, 'x')]
+ > insert 5 'x' empty == singleton 5 'x'
+
hunk ./Data/Map.hs 420
  /O(log n)/. Insert with a combining function.
+  /O(log n)/. Insert with a function, combining new value and old value.
hunk ./Data/Map.hs 425
+
+ > insertWith (++) 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "xxxa")]
+ > insertWith (++) 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")]
+ > insertWith (++) 5 "xxx" empty == singleton 5 "xxx"
+
hunk ./Data/Map.hs 440
  /O(log n)/. Insert with a combining function.
+  /O(log n)/. Insert with a function, combining key, new value and old value.
hunk ./Data/Map.hs 446
+
+ > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "" ++ old_value
+ > insertWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:xxxa")]
+ > insertWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")]
+ > insertWithKey f 5 "xxx" empty == singleton 5 "xxx"
+
hunk ./Data/Map.hs 474
  /O(log n)/. The expression (@'insertLookupWithKey' f k x map@)
+  /O(log n)/. Combines insert operation with old value retrieval.
+ The expression (@'insertLookupWithKey' f k x map@)
hunk ./Data/Map.hs 478
+
+ > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "" ++ old_value
+ > insertLookupWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "5:xxxa")])
+ > insertLookupWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "xxx")])
+ > insertLookupWithKey f 5 "xxx" empty == (Nothing, singleton 5 "xxx")
+
+ This is how to define @insertLookup@ using @insertLookupWithKey@:
+
+ > let insertLookup kx x t = insertLookupWithKey (\_ a _ > a) kx x t
+ > insertLookup 5 "x" (fromList [(5,"a"), (3,"b")]) == (Just "a", fromList [(3, "b"), (5, "x")])
+ > insertLookup 7 "x" (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a"), (7, "x")])
+
hunk ./Data/Map.hs 506
+
+ > delete 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
+ > delete 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
+ > delete 5 empty == empty
+
hunk ./Data/Map.hs 521
  /O(log n)/. Adjust a value at a specific key. When the key is not
+  /O(log n)/. Update a value at a specific key with the result of the provided function.
+ When the key is not
hunk ./Data/Map.hs 524
+
+ > adjust ("new " ++) 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")]
+ > adjust ("new " ++) 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
+ > adjust ("new " ++) 7 empty == empty
+
hunk ./Data/Map.hs 535
+
+ > let f key x = (show key) ++ ":new " ++ x
+ > adjustWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")]
+ > adjustWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
+ > adjustWithKey f 7 empty == empty
+
hunk ./Data/Map.hs 548
+
+ > let f x = if x == "a" then Just "new a" else Nothing
+ > update f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")]
+ > update f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
+ > update f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+
hunk ./Data/Map.hs 562
+
+ > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing
+ > updateWithKey f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:new a")]
+ > updateWithKey f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
+ > updateWithKey f 3 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+
hunk ./Data/Map.hs 580
  /O(log n)/. Lookup and update.
+  /O(log n)/. Lookup and update. See also 'updateWithKey'.
+ The function returns changed value, if it is updated.
+ Returns the original key value if the map entry is deleted.
+
+ > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing
+ > updateLookupWithKey f 5 (fromList [(5,"a"), (3,"b")]) == (Just "5:new a", fromList [(3, "b"), (5, "5:new a")])
+ > updateLookupWithKey f 7 (fromList [(5,"a"), (3,"b")]) == (Nothing, fromList [(3, "b"), (5, "a")])
+ > updateLookupWithKey f 3 (fromList [(5,"a"), (3,"b")]) == (Just "b", singleton 5 "a")
+
hunk ./Data/Map.hs 603
 In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@
+ In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@.
+
+ > let f _ = Nothing
+ > alter f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
+ > alter f 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
+ >
+ > let f _ = Just "c"
+ > alter f 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "c")]
+ > alter f 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "c")]
+
hunk ./Data/Map.hs 633
+
+ > findIndex 2 (fromList [(5,"a"), (3,"b")]) Error: element is not in the map
+ > findIndex 3 (fromList [(5,"a"), (3,"b")]) == 0
+ > findIndex 5 (fromList [(5,"a"), (3,"b")]) == 1
+ > findIndex 6 (fromList [(5,"a"), (3,"b")]) Error: element is not in the map
+
hunk ./Data/Map.hs 646
 /0/ up to, but not including, the 'size' of the map.
+ /0/ up to, but not including, the 'size' of the map.
+
+ > isJust (lookupIndex 2 (fromList [(5,"a"), (3,"b")])) == False
+ > fromJust (lookupIndex 3 (fromList [(5,"a"), (3,"b")])) == 0
+ > fromJust (lookupIndex 5 (fromList [(5,"a"), (3,"b")])) == 1
+ > isJust (lookupIndex 6 (fromList [(5,"a"), (3,"b")])) == False
+
hunk ./Data/Map.hs 667
+
+ > elemAt 0 (fromList [(5,"a"), (3,"b")]) == (3,"b")
+ > elemAt 1 (fromList [(5,"a"), (3,"b")]) == (5, "a")
+ > elemAt 2 (fromList [(5,"a"), (3,"b")]) Error: index out of range
+
hunk ./Data/Map.hs 684
+
+ > updateAt (\ _ _ > Just "x") 0 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "x"), (5, "a")]
+ > updateAt (\ _ _ > Just "x") 1 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "x")]
+ > updateAt (\ _ _ > Just "x") 2 (fromList [(5,"a"), (3,"b")]) Error: index out of range
+ > updateAt (\ _ _ > Just "x") (1) (fromList [(5,"a"), (3,"b")]) Error: index out of range
+ > updateAt (\_ _ > Nothing) 0 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+ > updateAt (\_ _ > Nothing) 1 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
+ > updateAt (\_ _ > Nothing) 2 (fromList [(5,"a"), (3,"b")]) Error: index out of range
+ > updateAt (\_ _ > Nothing) (1) (fromList [(5,"a"), (3,"b")]) Error: index out of range
+
hunk ./Data/Map.hs 708
+
+ > deleteAt 0 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+ > deleteAt 1 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
+ > deleteAt 2 (fromList [(5,"a"), (3,"b")]) Error: index out of range
+ > deleteAt (1) (fromList [(5,"a"), (3,"b")]) Error: index out of range
+
hunk ./Data/Map.hs 722
  /O(log n)/. The minimal key of the map.
+  /O(log n)/. The minimal key of the map. Calls 'error' is the map is empty.
+
+ > findMin (fromList [(5,"a"), (3,"b")]) == (3,"b")
+ > findMin empty Error: empty map has no minimal element
+
hunk ./Data/Map.hs 732
  /O(log n)/. The maximal key of the map.
+  /O(log n)/. The maximal key of the map. Calls 'error' is the map is empty.
+
+ > findMax (fromList [(5,"a"), (3,"b")]) == (5,"a")
+ > findMax empty Error: empty map has no maximal element
+
hunk ./Data/Map.hs 742
  /O(log n)/. Delete the minimal key.
+  /O(log n)/. Delete the minimal key. Returns an empty map if the map is empty.
+
+ > deleteMin (fromList [(5,"a"), (3,"b"), (7,"c")]) == fromList [(5,"a"), (7,"c")]
+ > deleteMin empty == empty
+
hunk ./Data/Map.hs 752
  /O(log n)/. Delete the maximal key.
+  /O(log n)/. Delete the maximal key. Returns an empty map if the map is empty.
+
+ > deleteMax (fromList [(5,"a"), (3,"b"), (7,"c")]) == fromList [(3,"b"), (5,"a")]
+ > deleteMax empty == empty
+
hunk ./Data/Map.hs 763
+
+ > updateMin (\ a > Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "Xb"), (5, "a")]
+ > updateMin (\ _ > Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+
hunk ./Data/Map.hs 772
+
+ > updateMax (\ a > Just ("X" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "Xa")]
+ > updateMax (\ _ > Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
+
hunk ./Data/Map.hs 782
+
+ > updateMinWithKey (\ k a > Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"3:b"), (5,"a")]
+ > updateMinWithKey (\ _ _ > Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+
hunk ./Data/Map.hs 796
+
+ > updateMaxWithKey (\ k a > Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"b"), (5,"5:a")]
+ > updateMaxWithKey (\ _ _ > Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
+
hunk ./Data/Map.hs 811
+
+ > v < minViewWithKey (fromList [(5,"a"), (3,"b")])
+ > v == ((3,"b"), singleton 5 "a")
+ > minViewWithKey empty Error: empty map
+
hunk ./Data/Map.hs 817
minViewWithKey Tip = fail "Map.minView: empty map"
+minViewWithKey Tip = fail "Map.minViewWithKey: empty map"
hunk ./Data/Map.hs 822
+
+ > v < maxViewWithKey (fromList [(5,"a"), (3,"b")])
+ > v == ((5,"a"), singleton 3 "b")
+ > maxViewWithKey empty Error: empty map
+
hunk ./Data/Map.hs 828
maxViewWithKey Tip = fail "Map.maxView: empty map"
+maxViewWithKey Tip = fail "Map.maxViewWithKey: empty map"
hunk ./Data/Map.hs 833
+
+ > v < minView (fromList [(5,"a"), (3,"b")])
+ > v == ("b", singleton 5 "a")
+ > minView empty Error: empty map
+
hunk ./Data/Map.hs 844
+
+ > v < maxView (fromList [(5,"a"), (3,"b")])
+ > v == ("a", singleton 3 "b")
+ > maxView empty Error: empty map
+
hunk ./Data/Map.hs 862
+
+ > unions [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]
+ > == fromList [(3, "b"), (5, "a"), (7, "C")]
+ > unions [(fromList [(5, "A3"), (3, "B3")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "a"), (3, "b")])]
+ > == fromList [(3, "B3"), (5, "A3"), (7, "C")]
+
hunk ./Data/Map.hs 874
+
+ > unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])]
+ > == fromList [(3, "bB3"), (5, "aAA3"), (7, "C")]
+
hunk ./Data/Map.hs 887
 Hedgeunion is more efficient on (bigset `union` smallset)
+ Hedgeunion is more efficient on (bigset \``union`\` smallset).
+
+ > union (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "a"), (7, "C")]
+
hunk ./Data/Map.hs 927
+
+ > unionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "aA"), (7, "C")]
+
hunk ./Data/Map.hs 936
 Hedgeunion is more efficient on (bigset `union` smallset).
+ Hedgeunion is more efficient on (bigset \``union`\` smallset).
+
+ > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "" ++ old_value
+ > unionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "5:aA"), (7, "C")]
+
hunk ./Data/Map.hs 965
+ Return elements of the first map not existing in the second map.
hunk ./Data/Map.hs 967
+
+ > difference (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 3 "b"
+
hunk ./Data/Map.hs 986
+ When two equal keys are
+ encountered, the combining function is applied to the values of these keys.
+ If it returns 'Nothing', the element is discarded (proper set difference). If
+ it returns (@'Just' y@), the element is updated with a new value @y@.
hunk ./Data/Map.hs 991
+
+ > let f al ar = if al == "b" then Just (al ++ ":" ++ ar) else Nothing
+ > differenceWith f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (7, "C")])
+ > == singleton 3 "b:B"
+
hunk ./Data/Map.hs 1005
+
+ > let f k al ar = if al == "b" then Just ((show k) ++ ":" ++ al ++ "" ++ ar) else Nothing
+ > differenceWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (10, "C")])
+ > == singleton 3 "3:bB"
+
hunk ./Data/Map.hs 1038
  /O(n+m)/. Intersection of two maps. The values in the first
 map are returned, i.e. (@'intersection' m1 m2 == 'intersectionWith' 'const' m1 m2@).
+  /O(n+m)/. Intersection of two maps.
+ Return data in the first map for the keys existing in both maps.
+ (@'intersection' m1 m2 == 'intersectionWith' 'const' m1 m2@).
+
+ > intersection (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "a"
+
hunk ./Data/Map.hs 1049
+
+ > intersectionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "aA"
+
hunk ./Data/Map.hs 1057
 Intersection is more efficient on (bigset `intersection` smallset)
+ Intersection is more efficient on (bigset \``intersection`\` smallset).
+
+ > let f k al ar = (show k) ++ ":" ++ al ++ "" ++ ar
+ > intersectionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "5:aA"
+
hunk ./Data/Map.hs 1078

hunk ./Data/Map.hs 1101
  /O(n+m)/.
+  /O(n+m)/.
hunk ./Data/Map.hs 1103
+
hunk ./Data/Map.hs 1108
{  /O(n+m)/.
+{  /O(n+m)/.
hunk ./Data/Map.hs 1123
+
+
hunk ./Data/Map.hs 1160
+
+
hunk ./Data/Map.hs 1171
+
+ > filter (> "a") (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
+ > filter (> "x") (fromList [(5,"a"), (3,"b")]) == empty
+ > filter (< "a") (fromList [(5,"a"), (3,"b")]) == empty
+
hunk ./Data/Map.hs 1181
+
+ > filterWithKey (\k _ > k > 4) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
+
hunk ./Data/Map.hs 1191
  /O(n)/. partition the map according to a predicate. The first
+  /O(n)/. Partition the map according to a predicate. The first
hunk ./Data/Map.hs 1194
+
+ > partition (> "a") (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a")
+ > partition (< "x") (fromList [(5,"a"), (3,"b")]) == (fromList [(3, "b"), (5, "a")], empty)
+ > partition (> "x") (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3, "b"), (5, "a")])
+
hunk ./Data/Map.hs 1203
  /O(n)/. partition the map according to a predicate. The first
+  /O(n)/. Partition the map according to a predicate. The first
hunk ./Data/Map.hs 1206
+
+ > partitionWithKey (\ k _ > k > 3) (fromList [(5,"a"), (3,"b")]) == (singleton 5 "a", singleton 3 "b")
+ > partitionWithKey (\ k _ > k < 7) (fromList [(5,"a"), (3,"b")]) == (fromList [(3, "b"), (5, "a")], empty)
+ > partitionWithKey (\ k _ > k > 7) (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3, "b"), (5, "a")])
+
hunk ./Data/Map.hs 1221
+
+ > let f x = if x == "a" then Just "new a" else Nothing
+ > mapMaybe f (fromList [(5,"a"), (3,"b")]) == singleton 5 "new a"
+
hunk ./Data/Map.hs 1230
+
+ > let f k _ = if k < 5 then Just ("key : " ++ (show k)) else Nothing
+ > mapMaybeWithKey f (fromList [(5,"a"), (3,"b")]) == singleton 3 "key : 3"
+
hunk ./Data/Map.hs 1241
+
+ > let f a = if a < "c" then Left a else Right a
+ > mapEither f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
+ > == (fromList [(3,"b"), (5,"a")], fromList [(1,"x"), (7,"z")])
+ >
+ > mapEither (\ a > Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
+ > == (empty, fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
+
hunk ./Data/Map.hs 1254
+
+ > let f k a = if k < 5 then Left (k * 2) else Right (a ++ a)
+ > mapEitherWithKey f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
+ > == (fromList [(1,2), (3,6)], fromList [(5,"aa"), (7,"zz")])
+ >
+ > mapEitherWithKey (\_ a > Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
+ > == (empty, fromList [(1,"x"), (3,"b"), (5,"a"), (7,"z")])
+
hunk ./Data/Map.hs 1276
+
+ > map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]
+
hunk ./Data/Map.hs 1284
+
+ > let f key x = (show key) ++ ":" ++ x
+ > mapWithKey f (fromList [(5,"a"), (3,"b")]) == fromList [(3, "3:b"), (5, "5:a")]
+
hunk ./Data/Map.hs 1295
+
+ > let f a b = (a ++ b, b ++ "X")
+ > mapAccum f "Everything: " (fromList [(5,"a"), (3,"b")]) == ("Everything: ba", fromList [(3, "bX"), (5, "aX")])
+
hunk ./Data/Map.hs 1305
+
+ > let f a k b = (a ++ " " ++ (show k) ++ "" ++ b, b ++ "X")
+ > mapAccumWithKey f "Everything:" (fromList [(5,"a"), (3,"b")]) == ("Everything: 3b 5a", fromList [(3, "bX"), (5, "aX")])
+
hunk ./Data/Map.hs 1337
  /O(n*log n)/.
+  /O(n*log n)/.
hunk ./Data/Map.hs 1343
+
+ > mapKeys (+ 1) (fromList [(5,"a"), (3,"b")]) == fromList [(4, "b"), (6, "a")]
+ > mapKeys (\ _ > 1) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 1 "c"
+ > mapKeys (\ _ > 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 3 "c"
hunk ./Data/Map.hs 1351
  /O(n*log n)/.
+  /O(n*log n)/.
hunk ./Data/Map.hs 1357
+
+ > mapKeysWith (++) (\ _ > 1) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 1 "cdab"
+ > mapKeysWith (++) (\ _ > 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 3 "cdab"
hunk ./Data/Map.hs 1369
+ That is, for any values @x@ and @y@, if @x@ < @y@ then @f x@ < @f y@.
hunk ./Data/Map.hs 1376
+
+ This means that @f@ maps distinct original keys to distinct resulting keys.
+ This function has better performance than 'mapKeys'.
+
+ > mapKeysMonotonic (\ k > k * 2) (fromList [(5,"a"), (3,"b")]) == fromList [(6, "b"), (10, "a")]
+ > valid (mapKeysMonotonic (\ k > k * 2) (fromList [(5,"a"), (3,"b")])) == True
+ > valid (mapKeysMonotonic (\ _ > 1) (fromList [(5,"a"), (3,"b")])) == False
hunk ./Data/Map.hs 1399
+ > let f a len = len + (length a)
+ > fold f 0 (fromList [(5,"a"), (3,"bbb")]) == 4
+
hunk ./Data/Map.hs 1412
+ > let f k a result = result ++ "(" ++ (show k) ++ ":" ++ a ++ ")"
+ > foldWithKey f "Map: " (fromList [(5,"a"), (3,"b")]) == "Map: (5:a)(3:b)"
+
hunk ./Data/Map.hs 1439
+
+ > elems (fromList [(5,"a"), (3,"b")]) == ["b","a"]
+ > elems empty == []
+
hunk ./Data/Map.hs 1448
+
+ > keys (fromList [(5,"a"), (3,"b")]) == [3,5]
+ > keys empty == []
+
hunk ./Data/Map.hs 1457
+
+ > keysSet (fromList [(5,"a"), (3,"b")]) == Data.Set.fromList [3,5]
+ > keysSet empty == Data.Set.empty
+
hunk ./Data/Map.hs 1465
+
+ > assocs (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]
+ > assocs empty == []
+
hunk ./Data/Map.hs 1478
+ If the list contains more than one value for the same key, the last value
+ for the key is retained.
+
+ > fromList [] == empty
+ > fromList [(5,"a"), (3,"b"), (5, "c")] == fromList [(5,"c"), (3,"b")]
+ > fromList [(5,"c"), (3,"b"), (5, "a")] == fromList [(5,"a"), (3,"b")]
+
hunk ./Data/Map.hs 1492
+
+ > fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "ab"), (5, "aba")]
+ > fromListWith (++) [] == empty
+
hunk ./Data/Map.hs 1501
+
+ > let f k a1 a2 = (show k) ++ a1 ++ a2
+ > fromListWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "3ab"), (5, "5a5ba")]
+ > fromListWithKey f [] == empty
+
hunk ./Data/Map.hs 1513
+
+ > toList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]
+ > toList empty == []
+
hunk ./Data/Map.hs 1521
+
+ > toAscList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]
+
hunk ./Data/Map.hs 1527
  /O(n)/.
+  /O(n)/.
hunk ./Data/Map.hs 1541
+
+ > fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")]
+ > fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")]
+ > valid (fromAscList [(3,"b"), (5,"a"), (5,"b")]) == True
+ > valid (fromAscList [(5,"a"), (3,"b"), (5,"b")]) == False
+
hunk ./Data/Map.hs 1553
+
+ > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")]
+ > valid (fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")]) == True
+ > valid (fromAscListWith (++) [(5,"a"), (3,"b"), (5,"b")]) == False
+
hunk ./Data/Map.hs 1565
+
+ > let f k a1 a2 = (show k) ++ ":" ++ a1 ++ a2
+ > fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b"), (5,"b")] == fromList [(3, "b"), (5, "5:b5:ba")]
+ > valid (fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b"), (5,"b")]) == True
+ > valid (fromAscListWithKey f [(5,"a"), (3,"b"), (5,"b"), (5,"b")]) == False
+
hunk ./Data/Map.hs 1590
+
+ > fromDistinctAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")]
+ > valid (fromDistinctAscList [(3,"b"), (5,"a")]) == True
+ > valid (fromDistinctAscList [(3,"b"), (5,"a"), (5,"b")]) == False
+
hunk ./Data/Map.hs 1681
 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@.
+ 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@.
+
+ > split 2 (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3,"b"), (5,"a")])
+ > split 3 (fromList [(5,"a"), (3,"b")]) == (empty, singleton 5 "a")
+ > split 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a")
+ > split 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", empty)
+ > split 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], empty)
+
hunk ./Data/Map.hs 1700
+
+ > splitLookup 2 (fromList [(5,"a"), (3,"b")]) == (empty, Nothing, fromList [(3,"b"), (5,"a")])
+ > splitLookup 3 (fromList [(5,"a"), (3,"b")]) == (empty, Just "b", singleton 5 "a")
+ > splitLookup 4 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", Nothing, singleton 5 "a")
+ > splitLookup 5 (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", Just "a", empty)
+ > splitLookup 6 (fromList [(5,"a"), (3,"b")]) == (fromList [(3,"b"), (5,"a")], Nothing, empty)
+
hunk ./Data/Map.hs 1810
+
+ > deleteFindMin (fromList [(5,"a"), (3,"b"), (10,"c")]) == ((3,"b"), fromList[(5,"a"), (10,"c")])
+ > deleteFindMin Error: can not return the minimal element of an empty map
+
hunk ./Data/Map.hs 1822
+
+ > deleteFindMax (fromList [(5,"a"), (3,"b"), (10,"c")]) == ((10,"c"), fromList [(3,"b"), (5,"a")])
+ > deleteFindMax empty Error: can not return the maximal element of an empty map
+
hunk ./Data/Map.hs 1980
 in a compressed, hanging format.
+ in a compressed, hanging format. See 'showTreeWith'.
hunk ./Data/Map.hs 2081
+
+ > valid (fromAscList [(3,"b"), (5,"a")]) == True
+ > valid (fromAscList [(5,"a"), (3,"b")]) == False
+
}
Context:
[Clarify the swapMVar haddock doc
Ian Lynagh **20070807185557]
[fix Haddock markup
Simon Marlow **20070802081717]
[Temporarily fix breakage for nhc98.
Malcolm.Wallace@cs.york.ac.uk**20070801163750
A recent patch to System.IO introduced a cyclic dependency on Foreign.C.Error,
and also inadvertently dragged along System.Posix.Internals which has
nonH'98 layout, causing many build problems. The solution for now
is to #ifndef __NHC__ all of the recent the openTempFile additions,
and mark them nonportable once again. (I also took the opportunity
to note a number of other nonportable functions in their Haddock
comments.)
]
[Generalise the type of synthesize, as suggested by Trac #1571
simonpj@microsoft**20070801125208
I have not looked at the details, but the type checker is happy with the
more general type, and more general types are usually a Good Thing.
]
[Fix fdToHandle on Windows
Ian Lynagh **20070730133139
The old setmode code was throwing an exception, and I'm not sure it is
meant to do what we need anyway. For now we assume that all FDs are
both readable and writable.
]
[Correct Windows OS name in cabal configuration
Ian Lynagh **20070729161739]
[Use cabal configurations rather than Setup hacks
Ian Lynagh **20070729132157]
[Handle buffers should be allocated with newPinnedByteArray# always
Simon Marlow **20070725095550
Not just on Windows. This change is required because we now use safe
foreign calls for I/O on blocking file descriptors with the threaded
RTS. Exposed by concio001.thr on MacOS X: MacOS apparently uses
smaller buffers by default, so they weren't being allocated as large
objects.
]
[fix Hugs implementation of openTempFile
Ross Paterson **20070724114003]
[Hugs only: avoid dependency cycle
Ross Paterson **20070724113852]
[open(Binary)TempFile is now portable
Ian Lynagh **20070722152752]
[Tweak temporary file filename chooser
Ian Lynagh **20070722105445]
[Move open(Binary)TempFile to System.IO
Ian Lynagh **20070722010205]
[Rename openFd to fdToHandle'
Ian Lynagh **20070721235538
The name collision with System.Posix.IO.openFd made my brain hurt.
]
[Add a test for Data.Map, for a bug on the libraries@ list
Ian Lynagh **20070721002119]
[fix Data.Map.updateAt
Bertram Felgenhauer **20070718150340
See http://haskell.org/pipermail/libraries/2007July/007785.html for a piece
of code triggering the bug. updateAt threw away parts of the tree making up
the map.
]
[in hClose, free the handle buffer by replacing it with an empty one
Simon Marlow **20070719161419
This helps reduce the memory requirements for a closed but unfinalised
Handle.
]
[Implement GHC.Environment.getFullArgs
Ian Lynagh **20070717141918
This returns all the arguments, including those normally eaten by the
RTS (+RTS ... RTS).
This is mainly for ghcinplace, where we need to pass /all/ the
arguments on to the real ghc. e.g. ioref001(ghci) was failing because
the +RTS K32m RTS wasn't getting passed on.
]
[Define stripPrefix; fixes trac #1464
Ian Lynagh **20070714235204]
[no need to hide Maybe
Malcolm.Wallace@cs.york.ac.uk**20070710154058]
[Add a more efficient Data.List.foldl' for GHC (from GHC's utils/Util.lhs)
Ian Lynagh **20070706205526]
[Remove includedirs ../../includes and ../../rts
Ian Lynagh **20070705205356
We get these by virtue of depending on the rts package.
]
[FIX #1131 (newArray_ allocates an array full of garbage)
Simon Marlow **20070704102020
Now newArray_ returns a deterministic result in the ST monad, and
behaves as before in other contexts. The current newArray_ is renamed
to unsafeNewArray_; the MArray class therefore has one more method
than before.
]
[change nhc98 option from prelude to prelude
Malcolm.Wallace@cs.york.ac.uk**20070702150355]
[Word is a type synonym in nhc98  so class instance not permitted.
Malcolm.Wallace@cs.york.ac.uk**20070629122035]
[fix bug in writes to blocking FDs in the nonthreaded RTS
Simon Marlow **20070628134320]
[Modernize printf.
lennart.augustsson@creditsuisse.com**20070628083852
Add instances for Int8, Int16, Int32, Int64, Word, Word8, Word16, Word32, and
Word64.
Handle + flag.
Handle X, E, and G formatting characters.
Rewrite internals to make it simpler.
]
[Speed up number printing and remove the need for Array by using the standard 'intToDigit' routine
John Meacham **20070608182353]
[Use " //" (2 spaces) rather than " //" (1) to avoid tripping haddock up
Ian Lynagh **20070627010930
Are we nearly there yet?
]
[Use a combination of Haskell/C comments to ensure robustness.
Malcolm.Wallace@cs.york.ac.uk**20070626095222
e.g.  // ensures that _no_ preprocessor will try to tokenise the
rest of the line.
]
[Change Cstyle comments to Haskellstyle.
Malcolm.Wallace@cs.york.ac.uk**20070625094515
These two headers are only ever used for preprocessing Haskell code,
and are never seen by any C tools except cpp. Using the Haskell comment
convention means that cpphs no longer needs to be given the strip
option to remove C comments from open code. This is a Good Thing,
because all of /* */ and // are valid Haskell operator names, and there
is no compelling reason to forbid using them in files which also happen
to have Cpreprocessor directives.
]
[makefileHook needs to generate PrimopWrappers.hs too
Simon Marlow **20070622073424]
[Hugs now gets MonadFix(mfix) from its prelude
Ross Paterson **20070620000343]
[Typo (consUtils.hs > consUtils.h)
Ian Lynagh **20070619124140]
[install dependent include files and Typeable.h
Bertram Felgenhauer **20070613041734]
[update prototype following inputReady>fdReady change
Simon Marlow **20070614095309]
[FIX hGetBuf001: cutandpasto in readRawBufferNoBlock
Simon Marlow **20070614094222]
[fix description of CWStringLen
Ross Paterson **20070605223345]
[Remove unsafeCoerceimporting kludgery in favor of Unsafe.Coerce
Isaac Dupree **20070601203625]
[configureoption and ghcoption are now provided by Cabal
Ross Paterson **20070604115233]
[Data.PackedString: Data.Generics is GHConly
Ross Paterson **20070529232427]
[Add Data instance for PackedString; patch from greenrd in trac #1263
Ian Lynagh **20070529205420]
[Control.Concurrent documentation fix
shae@ScannedInAvian.com**20070524163325]
[add nhc98options: field to .cabal file
Malcolm.Wallace@cs.york.ac.uk**20070528122626]
[add a dummy implementation of System.Timeout.timeout for nhc98
Malcolm.Wallace@cs.york.ac.uk**20070528110309]
[Add System.Timeout to base.cabal
Ian Lynagh **20070527123314
Filtered out for nonGHC by Setup.hs.
]
[add module Data.Fixed to nhc98 build
Malcolm.Wallace@cs.york.ac.uk**20070525141021]
[DIRS now lives in package Makefile, not script/pkgdirlist
Malcolm.Wallace@cs.york.ac.uk**20070525111749]
[delete unused constants
Ross Paterson **20070525001741]
[remove System.Cmd and System.Time too
Malcolm.Wallace@cs.york.ac.uk**20070524163200]
[remove locale as well
Malcolm.Wallace@cs.york.ac.uk**20070524161943]
[nhc98 version of instance Show (a>b) copied from Prelude
Malcolm.Wallace@cs.york.ac.uk**20070524160615]
[remove directory, pretty, and random bits from base for nhc98
Malcolm.Wallace@cs.york.ac.uk**20070524160608]
[Remove Makefile and package.conf.in (used in the old build system)
Ian Lynagh **20070524142545]
[Split off process package
Ian Lynagh **20070523210523]
[Fix comment: maperrno is in Win32Utils.c, not runProcess.c
Ian Lynagh **20070523181331]
[System.Locale is now split out
Ian Lynagh **20070519132638]
[Split off directory, random and oldtime packages
Ian Lynagh **20070519120642]
[Remove Control.Parallel*, now in package parallel
Ian Lynagh **20070518165431]
[Remove the prettyprinting modules (now in package pretty(
Ian Lynagh **20070518162521]
[add installincludes: field
Simon Marlow **20070517094948]
[correct the documentation for newForeignPtr
Simon Marlow **20070516082019]
[When doing safe writes, handle EAGAIN rather than raising an exception
Simon Marlow **20070515114615
It might be that stdin was set to O_NONBLOCK by someone else, and we
should handle this case. (this happens with GHCi, I'm not quite sure why)
]
[Use FilePath to make paths when building GHC/Prim.hs and GHC/PrimopWrappers.hs
Ian Lynagh **20070514110409]
[Build GHC/Prim.hs and GHC/PrimopWrappers.hs from Cabal
Ian Lynagh **20070509142655]
[fix imports for nonGHC
Ross Paterson **20070513001138]
[Give an example of how intersection takes elements from the first set
Ian Lynagh **20070512160253]
[further clarify the docs for 'evaluate'
Malcolm.Wallace@cs.york.ac.uk**20070508101124]
[improve documentation for evaluate
Simon Marlow **20070508081712]
[FIX: #724 (tee complains if used in a process started by ghc)
Simon Marlow **20070507123537
Now, we only set O_NONBLOCK on file descriptors that we create
ourselves. File descriptors that we inherit (stdin, stdout, stderr)
are kept in blocking mode. The way we deal with this differs between
the threaded and nonthreaded runtimes:
 with threaded, we just make a safe foreign call to read(), which
may block, but this is ok.
 without threaded, we test the descriptor with select() before
attempting any I/O. This isn't completely safe  someone else
might read the data between the select() and the read()  but it's
a reasonable compromise and doesn't seem to measurably affect
performance.
]
[the "unknown" types are no longer required
Simon Marlow **20070426135931]
[Make Control.Exception buildable by nhc98.
Malcolm.Wallace@cs.york.ac.uk**20070504105548
The nhc98 does not have true exceptions, but these additions should be
enough infrastructure to pretend that it does. Only IO exceptions will
actually work.
]
[Trim imports, remove a cycle
simonpj@microsoft**20070503123010
A first attempt at removing gratuitous cycles in the base package.
I've removed the useless module GHC.Dynamic, which gets rid of a cycle;
and trimmed off various unnecesary imports.
This also fixes the IsString import problem.
]
[Be less quiet about building the base package
simonpj@microsoft**20070503093707]
[Remove Splittable class (a vestige of linear implicit parameters)
simonpj@microsoft**20070221104329]
[Add IsString to exports of GHC.Exts
simonpj@microsoft**20070221104249]
[tweak documentation as per suggestion from Marc Weber on libraries@haskell.org
Simon Marlow **20070426075921]
[Add extra libraries when compiling with GHC on Windows
Ian Lynagh **20070424213127]
[Follow Cabal changes in Setup.hs
Ian Lynagh **20070418114345]
[inclusion of libc.h is conditional on __APPLE__
Malcolm.Wallace@cs.york.ac.uk**20070417085556]
[MERGE: fix ugly uses of memcpy foreign import inside ST
Simon Marlow **20070416101530
fixes cg026
]
[Fix configure with no withcc
Ian Lynagh **20070415165143]
[MacOS 10.3 needs #include as well
Malcolm.Wallace@cs.york.ac.uk**20070414155507]
[For nhc98 only, use hsc2hs to determine System.Posix.Types.
Malcolm.Wallace@cs.york.ac.uk**20070413155831
Avoids the existing autoconf stuff, by introducing an auxiliary module
called NHC.PosixTypes that uses hsc2hs, which is then simply reexported
from System.Posix.Types.
]
[we need a makefileHook too
Simon Marlow **20070413151307]
[Remove unnecesary SOURCE import of GHC.Err in GHC.Pack
Ian Lynagh **20070412235908]
[add System.Posix.Types to default nhc98 build
Malcolm.Wallace@cs.york.ac.uk**20070412195026]
[mark System.IO.openTempFile as nonportable in haddocks
Malcolm.Wallace@cs.york.ac.uk**20070412135359]
[Don't turn on Werror in Data.Fixed
Ian Lynagh **20070411155721
This may be responsible for the x86_64/Linux nightly build failing.
]
[Fix Wall warnings
Ian Lynagh **20070411004929]
[Add missing case in removePrefix
Ian Lynagh **20070411002537]
[Allow additional options to pass on to ./configure to be given
Ian Lynagh **20070406151856]
[Hugs only: fix location of unsafeCoerce
Ross Paterson **20070406113731]
[fix isPortableBuild test
Ross Paterson **20070406111304]
[Unsafe.Coerce doesn't need Prelude
Ian Lynagh **20070405175930]
[make Setup and base.cabal suitable for building the libraries with GHC
Ian Lynagh **20070308163824]
[HsByteArray doesn't exist
Ian Lynagh **20070404163051]
[Don't use Fd/FD in foreign decls
Ian Lynagh **20070404155822
Using CInt makes it much easier to verify that it is right, and we won't
get caught out by possible newtype switches between CInt/Int.
]
[HsByteArray doesn't exist
Ian Lynagh **20070404155732]
[Fix braino
Ian Lynagh **20070404144508]
[Fix incorrect changes to C types in a foreign import for nhc98.
Malcolm.Wallace@cs.york.ac.uk**20070404120954
If we use type CTime, it needs to be imported. Also, CTime is not an
instance of Integral, so use some other mechanism to convert it.
]
[Fix C/Haskell type mismatches
Ian Lynagh **20070403194943]
[add new module Unsafe.Coerce to build system
Malcolm.Wallace@cs.york.ac.uk**20070403131333]
[Fix type mismatches between foreign imports and HsBase.h
Ian Lynagh **20070403001611
Merge to stable, checking for interface changes.
]
[put 'unsafeCoerce' in a standard location
Malcolm.Wallace@cs.york.ac.uk**20061113114103]
[fix for nhc98 build
Malcolm.Wallace@cs.york.ac.uk**20070402141712]
[Function crossMapP for fixing desugaring of comprehensions
Manuel M T Chakravarty **20070402082906
Merge into 6.6 branch.
]
[Add min/max handling operations for IntSet/IntMap
jeanphilippe.bernardy@gmail.com**20070315072352]
[Monoid instance for Maybe and two wrappers: First and Last. trac proposal #1189
Jeffrey Yasskin **20070309062550]
[Fix the type of wgencat
Ian Lynagh **20070329164223]
[fix strictness of foldr/build rule for take, see #1219
Simon Marlow **20070327103941]
[remove Makefile.inc (only affects nhc98)
Malcolm.Wallace@cs.york.ac.uk**20070320120057]
[copyBytes copies bytes, not elements; fixes trac #1203
Ian Lynagh **20070312113555]
[Add ioeGetLocation, ioeSetLocation to System/IO/Error.hs; trac #1191
Ian Lynagh **20070304130315]
[fix race condition in prodServiceThread
Simon Marlow **20070307134330
See #1187
]
[Prevent duplication of unsafePerformIO on a multiprocessor
Simon Marlow **20070306145424
Fixes #986. The idea is to add a new operation
noDuplicate :: IO ()
it is guaranteed that if two threads have executed noDuplicate, then
they are not duplicating any computation.
We now provide two new unsafe operations:
unsafeDupablePerformIO :: IO a > a
unsafeDupableInterleaveIO :: IO a > IO a
which are equivalent to the old unsafePerformIO and unsafeInterleaveIO
respectively. The new versions of these functions are defined as:
unsafePerformIO m = unsafeDupablePerformIO (noDuplicate >> m)
unsafeInterleaveIO m = unsafeDupableInterleaveIO (noDuplicate >> m)
]
[expand docs for forkOS
Simon Marlow **20070305160921]
[document timeout limitations
Peter Simons **20070228223540]
[So many people were involved in the writing of this module that
Peter Simons **20070228223415
it feels unfair to single anyone out as the lone copyright
holder.
]
[This patch adds a timeout function to the base libraries. Trac #980 is
Peter Simons **20070126222615
concerned with this issue. The design guideline for this implementation
is that 'timeout N E' should behave exactly the same as E as long as E
doesn't time out. In our implementation, this means that E has the same
myThreadId it would have without the timeout wrapper. Any exception E
might throw cancels the timeout and propagates further up. It also
possible for E to receive exceptions thrown to it by another thread.
]
[PArr: fixed permutations
Manuel M T Chakravarty **20070305055807]
[Add Data.String, containing IsString(fromString); trac proposal #1126
Ian Lynagh **20070130134841
This is used by the overloaded strings extension (foverloadedstrings in GHC).
]
[GHC.PArr: add bounds checking
Manuel M T Chakravarty **20070302053224]
[Bump nhc98 stack size for System/Time.hsc
sven.panne@aedion.de**20070301153009]
[FDs are CInts now, fixing nonGHC builds
sven.panne@aedion.de**20070225105620]
[Fixed PArr.dropP
Manuel M T Chakravarty **20070222032405
 Thanks to Audrey Tang for the bug report
]
[Keep the same FD in both halves of a duplex handle when dup'ing
Ian Lynagh **20070220141039
Otherwise we only close one of the FDs when closing the handle.
Fixes trac #1149.
]
[Remove more redundant FD conversions
Ian Lynagh **20070220092520]
[Fix FD changes on Windows
Ian Lynagh **20070220091516]
[Consistently use CInt rather than Int for FDs
Ian Lynagh **20070219233854]
[Fix the types of minView/maxView (ticket #1134)
jeanphilippe.bernardy@gmail.com**20070210065115]
[fix for hashString, from JanWillem Maessen (see #1137)
Simon Marlow **20070215094304
]
[fix to getUSecOfDay(): arithmetic was overflowing
Simon Marlow **20070214161719]
[The Windows counterpart to 'wrapround of thread delays'
Ian Lynagh **20070209173510]
[wrapround of thread delays
Neil Davies **20070129160519
* made the wrapround of the underlying O/S occur before the wrapround
of the delayed threads by making threads delay in microseconds since
O/S epoch (1970  Unix, 1601  Windows) stored in Word64.
* removed redundant calls reading O/S realtime clock
* removed rounding to 1/50th of sec for timers
* Only for Unix version of scheduler.
]
[Whitespace changes only
Ian Lynagh **20070206232722]
[Add some type sigs
Ian Lynagh **20070206232439]
[Use static inline rather than extern inline/inline
Ian Lynagh **20070205203628
I understand this is more portable, and it also fixes warnings when
C things we are wrapping are themselves static inlines (which FD_ISSET
is on ppc OS X).
]
[add derived instances for Dual monoid
Ross Paterson **20070202190847]
[add doc pointers to Foldable
Ross Paterson **20070202110931
Could be applied to STABLE.
]
[Eliminate some warnings
Ian Lynagh **20060729220854
Eliminate warnings in the libraries caused by mixing pattern matching
with numeric literal matching.
]
[Remove IsString(fromString) from the Prelude
Ian Lynagh **20070130124136]
[Add Kleisli composition
Don Stewart **20061113015442]
[IsString is GHConly (so why is it in the Prelude?)
Ross Paterson **20070123183007]
[Applicative and Monad instances for Tree
Ross Paterson **20070115174510]
[Add IsString class for overloaded string literals.
lennart@augustsson.net**20061221210532]
[fix threadDelay
Simon Marlow **20070117091702
In "Add support for the IO manager thread" I accidentally spammed part
of "Make sure the threaded threadDelay sleeps at least as long as it
is asked", which is why the ThreadDelay001 test has been failing.
]
[update section on "blocking"
Simon Marlow **20070116124328]
[Fix crash with (minBound :: Int*) `div (1) as result is maxBound + 1.
Ian Lynagh **20070115142005]
[version of example using Tomasz Zielonka's technique
Ross Paterson **20070105175907]
[Added Unknowns for higher kinds
Pepe Iborra **20061108155938]
[Improved the Show instance for Unknown
Pepe Iborra **20060813111816]
[Show instance for GHC.Base.Unknown
mnislaih@gmail.com**20060801233530]
[Introduce Unknowns for the closure viewer. Add breakpointCond which was missing
mnislaih@gmail.com**20060725174537]
[Fix missing comma in Fractional documentation
Alec Berryman **20061201173237]
[Mention that throwTo does not guarantee promptness of delivery
simonpj@microsoft**20061211123215]
[Add note about synhronous delivery of throwTo
simonpj@microsoft**20061211122257]
[documentation for installHandler
Simon Marlow **20061205154927
merge to 6.6
]
[Added examples, more detailed documentation to Data.List Extracting sublists functions
Andriy Palamarchuk **20061204164710]
[dos2unix
Simon Marlow **20061204095439]
[don't try to compile this on Unix
Simon Marlow **20061204095427]
[TAG 6.6 release
Ian Lynagh **20061011124740]
[TAG Version 2.1
Ian Lynagh **20061009114014]
[Bump version number
Ian Lynagh **20061009114009]
[Add support for the IO manager thread on Windows
Simon Marlow **20061201152042
Fixes #637. The test program in that report now works for me with
threaded, but it doesn't work without threaded (I don't know if
that's new behaviour or not, though).
]
[deriving (Eq, Ord, Enum, Show, Read, Typeab) for ConsoleEvent
Simon Marlow **20061201144032]
[Make sure the threaded threadDelay sleeps at least as long as it is asked to
Ian Lynagh **20061128204807]
[Add comments about argument order to the definitions of gmapQ and constrFields
simonpj@microsoft**20061124164505]
[Hugs: add Control.Parallel.Strategies
Ross Paterson **20061124161039]
[Move instance of Show Ptr to Ptr.hs (fewer orphans)
simonpj@microsoft.com**20061124100639]
[Add type signatures
simonpj@microsoft.com**20061124100621]
[Add an example of the use of unfoldr, following doc feedback from dozer
Don Stewart **20061124011249]
[trim imports
Ross Paterson **20061123190352]
[Data.Graph is now portable (enable for nhc98)
Malcolm.Wallace@cs.york.ac.uk**20061123174913]
[remove Data.FunctorM and Data.Queue
Ross Paterson **20061112001046
These were deprecated in 6.6, and can thus be removed in 6.8.
]
[make Data.Graph portable (no change to the interface)
Ross Paterson **20061122010040
The algorithm now uses STArrays on GHC and IntSets elsewhere.
(Hugs has STArrays, but avoiding them saves a 98, and boxed arrays
aren't fast under Hugs anyway.)
]
[One less unsafeCoerce# in the tree
Don Stewart **20061120120242]
[typo in comment
Ross Paterson **20061120115106]
[fix shift docs to match ffi spec
Ross Paterson **20061117003144]
[(nhc98) use new primitive implementations of h{Put,Get}Buf.
Malcolm.Wallace@cs.york.ac.uk**20061116173104]
[The wrong 'cycle' was exported from Data.ByteString.Lazy.Char8, spotted by sjanssen
Don Stewart **20061110021311]
[LPS chunk sizes should be 16 bytes, not 17.
Don Stewart **20061110021254]
[Update comments on Prelude organisation in GHC/Base.lhs
Ian Lynagh **20061115001926]
[Control.Parallel.Strategies cleanup: Added export list to avoid exporting seq, fixed import list strangeness that haddock choked on, and moved the deprecated functions to a separate section.
bringert@cs.chalmers.se**20061113224202]
[Control.Parallel.Strategies: added NFData instances for Data.Int.*, Data.Word.*, Maybe, Either, Map, Set, Tree, IntMap, IntSet.
bringert@cs.chalmers.se**20061113221843]
[Control.Parallel.Strategies: deprecate sPar, sSeq, Assoc, fstPairFstList, force and sforce.
bringert@cs.chalmers.se**20061113215219
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.
]
[add Control.Monad.Instances to nhc98 build
Malcolm.Wallace@cs.york.ac.uk**20061113113221]
[Control.Parallel.Strategies: clarified documentation of parListChunk.
bringert@cs.chalmers.se**20061112232904]
[Added and cleaned up Haddock comments in Control.Parallel.Strategies.
bringert@cs.chalmers.se**20061112220445
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 markup.
]
[Fix broken pragmas; spotted by Bulat Ziganshin
Ian Lynagh **20061111205916]
[add doc link to bound threads section
Ross Paterson **20060929103252]
[hide Data.Array.IO.Internals
Ross Paterson **20061111113248
It's hidden from haddock, and everything it exports is reexported by
Data.Array.IO.
]
[add Data.Function
Malcolm.Wallace@cs.york.ac.uk**20061110142710]
[add Data.Function
Ross Paterson **20061110141354]
[whitespace only
Ross Paterson **20061110141326]
[move fix to Data.Function
Ross Paterson **20061110141120]
[import Prelude
Ross Paterson **20061110140445]
[Added Data.Function (Trac ticket #979).
Nils Anders Danielsson **20061110122503
+ A module with simple combinators working solely on and with
functions.
+ The only new function is "on".
+ Some functions from the Prelude are reexported.
]
[__hscore_long_path_size is not portable beyond GHC
Malcolm.Wallace@cs.york.ac.uk**20061110113222]
[redefine writeFile and appendFile using withFile
Ross Paterson **20061107140359]
[add withFile and withBinaryFile (#966)
Ross Paterson **20061107134510]
[remove conflicting import for nhc98
Malcolm.Wallace@cs.york.ac.uk**20061108111215]
[Add intercalate to Data.List (ticket #971)
Josef Svenningsson **20061102122052]
[nonGHC: fix canonicalizeFilePath
Ross Paterson **20061107133902
I've also removed the #ifdef __GLASGOW_HASKELL__ from the proper
Windows versions of a few functions. These will need testing with
Hugs on Windows.
]
[enable canonicalizePath for nonGHC platforms
Simon Marlow **20061107121141]
[Update documentation for hWaitForInput
Simon Marlow **20061107111430
See #972
Merge to 6.6 branch.
]
[Use unchecked shifts to implement Data.Bits.rotate
Samuel Bronson **20061012125553
This should get rid of those cases, maybe lower the size enough that the inliner will like it?
]
[fix Haddock module headers
Ross Paterson **20061106124140]
[fix example in docs
Ross Paterson **20061106115628]
[Add intercalate and split to Data.List
Josef Svenningsson *20061024172357]
[Data.Generics.Basics is GHConly
Ross Paterson **20061102111736]
[#ifdef around nonportable Data.Generics.Basics
Malcolm.Wallace@cs.york.ac.uk**20061102103445]
[Add deriving Data to Complex
simonpj@microsoft**20061101102059]
[minor clarification of RandomGen doc
Ross Paterson **20061030230842]
[rearrange docs a bit
Ross Paterson **20061030161223]
[Add intercalate and split to Data.List
Josef Svenningsson **20061024172357]
[Export pseq from Control.Parallel, and use it in Control.Parallel.Strategies
Simon Marlow **20061027150141]
[`par` should be infixr 0
Simon Marlow **20061027130800
Alas, I didn't spot this due to lack of testing, and the symptom is
that an expression like x `par` y `seq z will have exactly the wrong
parallelism properties. The workaround is to add parantheses.
I think we could push this to the 6.6 branch.
]
[fix example in comment
Ross Paterson **20061023163925]
[Use the new Any type for dynamics (GHC only)
simonpj@microsoft**20061019160408]
[add Data.Sequence to nhc98 build
Malcolm.Wallace@cs.york.ac.uk**20061012135200]
[Remove Data.FiniteMap, add Control.Applicative, Data.Traversable, and
Malcolm.Wallace@cs.york.ac.uk**20061012095605
Data.Foldable to the nhc98 build.
]
[STM invariants
tharris@microsoft.com**20061007123253]
[Inline shift in GHC's Bits instances for {Int,Word}{,8,16,32,64}
Samuel Bronson **20061009020906]
[Don't create GHC.Prim when bootstrapping; we can't, and we don't need it
Ian Lynagh **20061004165355]
[Data.ByteString: fix lazyness of take, drop & splitAt
Don Stewart **20061005011703
ByteString.Lazy's take, drop and splitAt were too strict when demanding
a byte string. Spotted by Einar Karttunen. Thanks to him and to Bertram
Felgenhauer for explaining the problem and the fix.
]
[Fix syntax error that prevents building Haddock documentation on Windows
brianlsmith@gmail.com**20060917013530]
[Hugs only: unbreak typeRepKey
Ross Paterson **20060929102743]
[make hGetBufNonBlocking do something on Windows w/ threaded
Simon Marlow **20060927145811
hGetBufNonBlocking will behave the same as hGetBuf on Windows now, which
is better than just crashing (which it did previously).
]
[add typeRepKey :: TypeRep > IO Int
Simon Marlow **20060927100342
See feature request #880
]
[fix header comment
Ross Paterson **20060926135843]
[Add strict versions of insertWith and insertWithKey (Data.Map)
jeanphilippe.bernardy@gmail.com**20060910162443]
[doc tweaks, including more precise equations for evaluate
Ross Paterson **20060910115259]
[Sync Data.ByteString with stable branch
Don Stewart **20060909050111
This patch:
* hides the LPS constructor (its in .Base if you need it)
* adds functions to convert between strict and lazy bytestrings
* and adds readInteger
]
[Typeable1 instances for STM and TVar
Ross Paterson **20060904231425]
[remove obsolete Hugs stuff
Ross Paterson **20060904223944]
[Cleaner isInfixOf suggestion from Ross Paterson
John Goerzen **20060901143654]
[New function isInfixOf that searches a list for a given sublist
John Goerzen **20060831151556
Example:
isInfixOf "Haskell" "I really like Haskell." > True
isInfixOf "Ial" "I really like Haskell." > False
This function was first implemented in MissingH as MissingH.List.contains
]
[Better doc on Data.Map.lookup: explain what the monad is for
jeanphilippe.bernardy@gmail.com**20060903133440]
[fix hDuplicateTo on Windows
Simon Marlow **20060901150016
deja vu  I'm sure I remember fixing this before...
]
[Improve documentation of atomically
simonpj@microsoft**20060714120207]
[Add missing method genRange for StdGen (fixes #794)
simonpj@microsoft**20060707151901
MERGE TO STABLE
Trac #794 reports (correctly) that the implementation of StdGen
only returns numbers in the range (0..something) rather than
(minBound, maxBound), which is what StdGen's genRange claims.
This commit fixes the problem, by implementing genRange for StdGen
(previously it just used the default method).
]
[mark nhc98 import hack
Ross Paterson **20060831125219]
[remove some outdated comments
Simon Marlow **20060831104200]
[import Control.Arrow.ArrowZero to help nhc98's type checker
Malcolm.Wallace@cs.york.ac.uk**20060831101105]
[remove Text.Regex(.Posix) from nhc98 build
Malcolm.Wallace@cs.york.ac.uk**20060831101016]
[add Data.Foldable.{msum,asum}, plus tweaks to comments
Ross Paterson **20060830163521]
[fix doc typo
Ross Paterson **20060830134123]
[add Data.Foldable.{for_,forM_} and Data.Traversable.{for,forM}
Ross Paterson **20060830133805
generalizing Control.Monad.{forM_,forM}
]
[Make length a good consumer
simonpj@microsoft*20060508142726
Make length into a good consumer. Fixes Trac bug #707.
(Before length simply didn't use foldr.)
]
[Add Control.Monad.forM and forM_
Don Stewart **20060824081118
flip mapM_ is more and more common, I find. Several suggestions have
been made to add this, as foreach or something similar. This patch
does just that:
forM :: (Monad m) => [a] > (a > m b) > m [b]
forM_ :: (Monad m) => [a] > (a > m b) > m ()
So we can write:
Prelude Control.Monad> forM_ [1..4] $ \x > print x
1
2
3
4
]
[Hide internal module from haddock in Data.ByteString
Don Stewart **20060828011515]
[add advice on avoiding import ambiguities
Ross Paterson **20060827170407]
[expand advice on importing these modules
Ross Paterson **20060827164044]
[add Haddock marker
Ross Paterson **20060827115140]
[Clarify how one hides Prelude.catch
Don Stewart **20060826124346
User feedback indicated that an example was required, of how to hide
Prelude.catch, so add such an example to the docs
]
[Workaround for OSes that don't have intmax_t and uintmax_t
Ian Lynagh **20060825134936
OpenBSD (and possibly others) do not have intmax_t and uintmax_t types:
http://www.mailarchive.com/haskellprime@haskell.org/msg01548.html
so substitute (unsigned) long long if we have them, otherwise
(unsigned) long.
]
[add docs for par
Simon Marlow **20060825110610]
[document minimal complete definition for Bits
Ross Paterson **20060824140504]
[C regex library bits have moved to the regexposix package
Simon Marlow **20060824132311]
[Add shared Typeable support (ghc only)
Esa Ilari Vuokko **20060823003126]
[this should have been removed with the previous patch
Simon Marlow **20060824121223]
[remove Text.Regx & Text.Regex.Posix
Simon Marlow **20060824094615
These are subsumed by the new regexbase, regexposix and regexcompat
packages.
]
[explicitly tag Data.ByteString rules with the FPS prefix.
Don Stewart **20060824041326]
[Add spec rules for sections in Data.ByteString
Don Stewart **20060824012611]
[Sync Data.ByteString with current stable branch, 0.7
Don Stewart **20060823143338]
[add notes about why copyFile doesn't remove the target
Simon Marlow **20060823095059]
[copyFile: try removing the target file before opening it for writing
Simon Marlow *20060822121909]
[copyFile: try removing the target file before opening it for writing
Simon Marlow **20060822121909]
[add alternative functors and extra instances
Ross Paterson **20060821152151
* Alternative class, for functors with a monoid
* instances for Const
* instances for arrows
]
[generate Haddock docs on all platforms
Simon Marlow **20060821131612]
[remove extra comma from import
Ross Paterson **20060819173954]
[fix docs for withC(A)StringLen
Ross Paterson **20060818170328]
[use Haskell'98 compliant indentation in do blocks
Malcolm.Wallace@cs.york.ac.uk**20060818130810]
[use correct names of IOArray operations for nhc98
Malcolm.Wallace@cs.york.ac.uk**20060818130714]
[add mapMaybe and mapEither, plus WithKey variants
Ross Paterson **20060817235041]
[remove Text.Html from nhc98 build
Malcolm.Wallace@cs.york.ac.uk**20060817135502]
[eliminate more HOST_OS tests
Ross Paterson **20060815190609]
[Hugs only: disable unused process primitives
Ross Paterson **20060813184435
These were the cause of Hugs bug #30, I think, and weren't used by Hugs anyway.
]
[markup fix to Data.HashTable
Ross Paterson **20060812103835]
[revert removal of ghcconfig.h from package.conf.in
Ross Paterson **20060812082702
as it's preprocessed with undef (pointed out by Esa Ilari Vuokko)
]
[fix Data.HashTable for nonGHC
Ross Paterson **20060811231521]
[remove deprecated 'withObject'
Simon Marlow **20060811152350]
[JanWillem Maessen's improved implementation of Data.HashTable
Simon Marlow **20060811151024
Rather than incrementally enlarging the hash table, this version
just does it in one go when the table gets too full.
]
[Warning police: Make some prototypes from the RTS known
sven.panne@aedion.de**20060811144629]
[Warning police: Removed useless catchall clause
sven.panne@aedion.de**20060811142208]
[reduce dependency on ghcconfig.h
Ross Paterson **20060811124030
The only remaining use is in cbits/dirUtils.h, which tests solaris2_HOST_OS
(Also System.Info uses ghcplatform.h and several modules import MachDeps.h
to get SIZEOF_* and ALIGNMENT_* from ghcautoconf.h)
]
[(nonGHC only) track MArray interface change
Ross Paterson **20060810182902]
[move Text.Html to a separate package
Simon Marlow **20060810113017]
[bump version to 2.0
Simon Marlow **20060810112833]
[Remove deprecated Data.FiniteMap and Data.Set interfaces
Simon Marlow **20060809153810]
[move altzone test from ghc to base package
Ross Paterson **20060809124259]
[remove unnecessary #include "ghcconfig.h"
Ross Paterson **20060809123812]
[Change the API of MArray to allow resizable arrays
Simon Marlow **20060809100548
See #704
The MArray class doesn't currently allow a mutable array to change its
size, because of the pure function
bounds :: (HasBounds a, Ix i) => a i e > (i,i)
This patch removes the HasBounds class, and adds
getBounds :: (MArray a e m, Ix i) => a i e > m (i,i)
to the MArray class, and
bounds :: (IArray a e, Ix i) => a i e > (i,i)
to the IArray class.
The reason that bounds had to be incorporated into the IArray class is
because I couldn't make DiffArray work without doing this. DiffArray
acts as a layer converting an MArray into an IArray, and there was no
way (that I could find) to define an instance of HasBounds for
DiffArray.
]
[deprecate this module.
Simon Marlow **20060808100708]
[add traceShow (see #474)
Simon Marlow **20060807155545]
[remove spurious 'extern "C" {'
Simon Marlow **20060724160258]
[Fix unsafeIndex for large ranges
Simon Marlow **20060721100225]
[disambiguate uses of foldr for nhc98 to compile without errors
Malcolm.Wallace@cs.york.ac.uk**20060711161614]
[make Control.Monad.Instances compilable by nhc98
Malcolm.Wallace@cs.york.ac.uk**20060711160941]
[breakpointCond
Lemmih **20060708055528]
[UNDO: Merge "unrecognized long opt" fix from 6.4.2
Simon Marlow **20060705142537
This patch undid the previous patch, "RequireOrder: do not collect
unrecognised options after a nonopt". I asked Sven to revert it, but
didn't get an answer.
See bug #473.
]
[Avoid strictness in accumulator for unpackFoldr
Don Stewart **20060703091806
The seq on the accumulator for unpackFoldr will break in the presence of
head/build rewrite rules. The empty list case will be forced, producing
an exception. This is a known issue with seq and rewrite rules that we
just stumbled on to.
]
[Disable unpack/build fusion
Don Stewart **20060702083913
unpack/build on bytestrings seems to trigger a bug when interacting with
head/build fusion in GHC.List. The bytestring001 testcase catches it.
I'll investigate further, but best to disable this for now (its not
often used anyway).
Note that with frulesoff or ghc 6.4.2 things are fine. It seems to
have emerged with the recent rules changes.
]
[Import Data.ByteString.Lazy, improve ByteString Fusion, and resync with FPS head
Don Stewart **20060701084345
This patch imports the Data.ByteString.Lazy module, and its helpers,
providing a ByteString implemented as a lazy list of strict cachesized
chunks. This type allows the usual lazy operations to be written on
bytestrings, including lazy IO, with much improved space and time over
the [Char] equivalents.
]
[Wibble in docs for new ForeignPtr functionsn
Don Stewart **20060609075924]
[comments for Applicative and Traversable
Ross Paterson **20060622170436]
[default to NoBuffering on Windows for a read/write text file
Simon Marlow **20060622144446
Fixes (works around) #679
]
[remove dead code
Simon Marlow **20060622144433]
[clarify and expand docs
Simon Marlow **20060622112911]
[Add minView and maxView to Map and Set
jeanphilippe.bernardy@gmail.com**20060616180121]
[add signature for registerDelay
Ross Paterson **20060614114456]
[a few doc comments
Ross Paterson **20060613142704]
[Optimised foreign pointer representation, for heapallocated objects
Don Stewart **20060608015011]
[Add the inline function, and many comments
simonpj@microsoft.com**20060605115814
This commit adds the 'inline' function described in the
related patch in the compiler.
I've also added comments about the 'lazy' function.
]
[small intro to exceptions
Ross Paterson **20060525111604]
[export breakpoint
Simon Marlow **20060525090456]
[Merge in changes from fps head. Highlights:
Don Stewart **20060525065012
Wed May 24 15:49:38 EST 2006 sjanssen@cse.unl.edu
* instance Monoid ByteString
Wed May 24 15:04:04 EST 2006 Duncan Coutts
* Rearange export lists for the .Char8 modules
Wed May 24 14:59:56 EST 2006 Duncan Coutts
* Implement mapAccumL and reimplement mapIndexed using loopU
Wed May 24 14:47:32 EST 2006 Duncan Coutts
* Change the implementation of the unfoldr(N) functions.
Use a more compact implementation for unfoldrN and change it's behaviour
to only return Just in the case that it actually 'overflowed' the N, so
the boundary case of unfolding exactly N gives Nothing.
Implement unfoldr and Lazy.unfoldr in terms of unfoldrN. Use fibonacci
growth for the chunk size in unfoldr
Wed May 24 08:32:29 EST 2006 sjanssen@cse.unl.edu
* Add unfoldr to ByteString and .Char8
A preliminary implementation of unfoldr.
Wed May 24 01:39:41 EST 2006 Duncan Coutts
* Reorder the export lists to better match the Data.List api
Tue May 23 14:04:32 EST 2006 Don Stewart
* pack{Byte,Char} > singleton. As per fptools convention
Tue May 23 14:00:51 EST 2006 Don Stewart
* elemIndexLast > elemIndexEnd
Tue May 23 13:57:34 EST 2006 Don Stewart
* In the search for a more orthogonal api, we kill breakFirst/breakLast,
which were of dubious value
Tue May 23 12:24:09 EST 2006 Don Stewart
* Abolish elems. It's name implied it was unpack, but its type didn't. it made no sense
Tue May 23 10:42:09 EST 2006 Duncan Coutts
* Minor doc tidyup. Use haddock markup better.
Tue May 23 11:00:31 EST 2006 Don Stewart
* Simplify the join() implementation. Spotted by Duncan.
]
[add a way to ask the IO manager thread to exit
Simon Marlow **20060524121823]
[Sync with FPS head, including the following patches:
Don Stewart **20060520030436
Thu May 18 15:45:46 EST 2006 sjanssen@cse.unl.edu
* Export unsafeTake and unsafeDrop
Fri May 19 11:53:08 EST 2006 Don Stewart
* Add foldl1'
Fri May 19 13:41:24 EST 2006 Don Stewart