Ticket #2769: export-mapAccumRWithKey.patch

File export-mapAccumRWithKey.patch, 4.5 KB (added by Deewiant, 7 years ago)

Revised

Line 
1Wed Dec 10 18:02:05 FLE Standard Time 2008  [email protected]
2  * Export mapAccumRWithKey from Map and IntMap (Trac #2769)
3
4New patches:
5
6[Export mapAccumRWithKey from Map and IntMap (Trac #2769)
7[email protected]**20081210160205] {
8hunk ./Data/IntMap.hs 99
9+            , mapAccumRWithKey
10hunk ./Data/IntMap.hs 1116
11-{-
12-XXX unused code
13-
14hunk ./Data/IntMap.hs 1117
15--- argument throught the map in descending order of keys.
16-mapAccumR :: (a -> Key -> b -> (a,c)) -> a -> IntMap b -> (a,IntMap c)
17-mapAccumR f a t
18+-- argument through the map in descending order of keys.
19+mapAccumRWithKey :: (a -> Key -> b -> (a,c)) -> a -> IntMap b -> (a,IntMap c)
20+mapAccumRWithKey f a t
21hunk ./Data/IntMap.hs 1121
22-      Bin p m l r -> let (a1,r') = mapAccumR f a r
23-                         (a2,l') = mapAccumR f a1 l
24+      Bin p m l r -> let (a1,r') = mapAccumRWithKey f a r
25+                         (a2,l') = mapAccumRWithKey f a1 l
26hunk ./Data/IntMap.hs 1126
27--}
28hunk ./Data/Map.hs 99
29+            , mapAccumRWithKey
30hunk ./Data/Map.hs 1338
31-{-
32-XXX unused code
33-
34hunk ./Data/Map.hs 1339
35--- argument throught the map in descending order of keys.
36-mapAccumR :: (a -> k -> b -> (a,c)) -> a -> Map k b -> (a,Map k c)
37-mapAccumR f a t
38+-- argument through the map in descending order of keys.
39+mapAccumRWithKey :: (a -> k -> b -> (a,c)) -> a -> Map k b -> (a,Map k c)
40+mapAccumRWithKey f a t
41hunk ./Data/Map.hs 1345
42-          -> let (a1,r') = mapAccumR f a r
43+          -> let (a1,r') = mapAccumRWithKey f a r
44hunk ./Data/Map.hs 1347
45-                 (a3,l') = mapAccumR f a2 l
46+                 (a3,l') = mapAccumRWithKey f a2 l
47hunk ./Data/Map.hs 1349
48--}
49}
50
51Context:
52
53[Fix #2760: change mkNorepType to mkNoRepType
54'Jose Pedro Magalhaes <[email protected]>'**20081202083424]
55[Doc fix, from hackage trac #378
56Ian Lynagh <[email protected]>**20081024143949]
57[import Data.Data instead of Data.Generics.*, eliminating the dependency on syb
58Ross Paterson <[email protected]>**20081005002559]
59[fixed typo in highestBitMask
60[email protected]**20081002215438]
61[export Data.Map.toDescList, foldlWithKey, and foldrWithKey (trac ticket 2580)
62[email protected]**20080922213200
63 
64 toDescList was previously implemented, but not exported.
65 
66 foldlWithKey was previously implemented, but not exported.  It can be used to
67 implement toDescList.
68 
69 foldrWithKey is already exported as foldWithKey, but foldrWithKey is explicitly
70 the mirror of foldlWithKey, and foldWithKey kept for compatibility.
71]
72[Bump version number to 0.2.0.0
73Ian Lynagh <[email protected]>**20080920160016]
74[TAG 6.10 branch has been forked
75Ian Lynagh <[email protected]>**20080919123438]
76[Fixed typo in updateMinWithKey / updateMaxWithKey
77[email protected]**20080704054350]
78[follow library changes
79Ian Lynagh <[email protected]>**20080903223610]
80[add include/Typeable.h to extra-source-files
81Ross Paterson <[email protected]>**20080831181402]
82[fix cabal build-depends for nhc98
83[email protected]**20080828104248]
84[Add a dep on syb
85Ian Lynagh <[email protected]>**20080825214314]
86[add category field
87Ross Paterson <[email protected]>**20080824003013]
88[we depend on st, now split off from base
89Ian Lynagh <[email protected]>**20080823223053]
90[specialize functions that fail in a Monad to Maybe (proposal #2309)
91Ross Paterson <[email protected]>**20080722154812
92 
93 Specialize functions signatures like
94 
95        lookup :: (Monad m, Ord k) => k -> Map k a -> m a
96 to
97        lookup :: (Ord k) => k -> Map k a -> Maybe a
98 
99 for simplicity and safety.  No information is lost, as each of these
100 functions had only one use of fail, which is now changed to Nothing.
101]
102[tighter description of split (addresses #2447)
103Ross Paterson <[email protected]>**20080717064838]
104[Make warning-clean with GHC again
105Ian Lynagh <[email protected]>**20080623232023
106 With any luck we have now converged on a solution that works everywhere!
107]
108[Undo more Data.Typeable-related breakage for non-ghc.
109[email protected]**20080623092757]
110[Placate GHC with explicit import lists
111Ian Lynagh <[email protected]>**20080620183926]
112[undo breakage caused by -Wall cleaning
113[email protected]**20080620093922
114 The import of Data.Typeable is still required, at least for non-GHC.
115]
116[Make the package -Wall clean
117Ian Lynagh <[email protected]>**20080618233627]
118[List particular extensions rather than -fglasgow-exts
119Ian Lynagh <[email protected]>**20080616232035]
120[Avoid using deprecated flags
121Ian Lynagh <[email protected]>**20080616145241]
122[TAG 2008-05-28
123Ian Lynagh <[email protected]>**20080528004309]
124Patch bundle hash:
1258efd0173e8e4dfdf0b2fda8b9f1e76ca0a8f63f5