Ticket #2960: add-instance-data_traversable-for-intmap.dpatch

File add-instance-data_traversable-for-intmap.dpatch, 4.0 KB (added by Deewiant, 8 years ago)
Line 
1Fri Jan 16 21:03:53 EET 2009  Matti Niemenmaa <matti.niemenmaa+darcs@iki.fi>
2  * Add instance Data.Traversable for IntMap
3
4New patches:
5
6[Add instance Data.Traversable for IntMap
7Matti Niemenmaa <matti.niemenmaa+darcs@iki.fi>**20090116190353
8 Ignore-this: df88a286935926aecec3f8a5dd291699
9] {
10hunk ./Data/IntMap.hs 172
11 import Data.Maybe (fromMaybe)
12 import Data.Typeable
13 import Data.Foldable (Foldable(foldMap))
14+import Data.Traversable (Traversable(traverse))
15+import Control.Applicative ((<*>),(<$>),pure)
16 import Control.Monad ( liftM )
17 {-
18 -- just for testing
19hunk ./Data/IntMap.hs 258
20     foldMap f (Tip _k v) = f v
21     foldMap f (Bin _ _ l r) = foldMap f l `mappend` foldMap f r
22 
23+instance Traversable IntMap where
24+    traverse _ Nil = pure Nil
25+    traverse f (Tip k v) = Tip k <$> f v
26+    traverse f (Bin p m l r) = Bin p m <$> traverse f l <*> traverse f r
27+
28 #if __GLASGOW_HASKELL__
29 
30 {--------------------------------------------------------------------
31}
32
33Context:
34
35[Export mapAccumRWithKey from Map and IntMap (Trac #2769)
36matti.niemenmaa+darcs@iki.fi**20081210160205]
37[Bump the version number to 0.2.0.1, to work-around cabal-install problems
38Ian Lynagh <igloo@earth.li>**20081212201829]
39[Fix #2760: change mkNorepType to mkNoRepType
40'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081202083424]
41[Doc fix, from hackage trac #378
42Ian Lynagh <igloo@earth.li>**20081024143949]
43[import Data.Data instead of Data.Generics.*, eliminating the dependency on syb
44Ross Paterson <ross@soi.city.ac.uk>**20081005002559]
45[fixed typo in highestBitMask
46sedillard@gmail.com**20081002215438]
47[export Data.Map.toDescList, foldlWithKey, and foldrWithKey (trac ticket 2580)
48qdunkan@gmail.com**20080922213200
49 
50 toDescList was previously implemented, but not exported.
51 
52 foldlWithKey was previously implemented, but not exported.  It can be used to
53 implement toDescList.
54 
55 foldrWithKey is already exported as foldWithKey, but foldrWithKey is explicitly
56 the mirror of foldlWithKey, and foldWithKey kept for compatibility.
57]
58[Bump version number to 0.2.0.0
59Ian Lynagh <igloo@earth.li>**20080920160016]
60[TAG 6.10 branch has been forked
61Ian Lynagh <igloo@earth.li>**20080919123438]
62[Fixed typo in updateMinWithKey / updateMaxWithKey
63sedillard@gmail.com**20080704054350]
64[follow library changes
65Ian Lynagh <igloo@earth.li>**20080903223610]
66[add include/Typeable.h to extra-source-files
67Ross Paterson <ross@soi.city.ac.uk>**20080831181402]
68[fix cabal build-depends for nhc98
69Malcolm.Wallace@cs.york.ac.uk**20080828104248]
70[Add a dep on syb
71Ian Lynagh <igloo@earth.li>**20080825214314]
72[add category field
73Ross Paterson <ross@soi.city.ac.uk>**20080824003013]
74[we depend on st, now split off from base
75Ian Lynagh <igloo@earth.li>**20080823223053]
76[specialize functions that fail in a Monad to Maybe (proposal #2309)
77Ross Paterson <ross@soi.city.ac.uk>**20080722154812
78 
79 Specialize functions signatures like
80 
81        lookup :: (Monad m, Ord k) => k -> Map k a -> m a
82 to
83        lookup :: (Ord k) => k -> Map k a -> Maybe a
84 
85 for simplicity and safety.  No information is lost, as each of these
86 functions had only one use of fail, which is now changed to Nothing.
87]
88[tighter description of split (addresses #2447)
89Ross Paterson <ross@soi.city.ac.uk>**20080717064838]
90[Make warning-clean with GHC again
91Ian Lynagh <igloo@earth.li>**20080623232023
92 With any luck we have now converged on a solution that works everywhere!
93]
94[Undo more Data.Typeable-related breakage for non-ghc.
95Malcolm.Wallace@cs.york.ac.uk**20080623092757]
96[Placate GHC with explicit import lists
97Ian Lynagh <igloo@earth.li>**20080620183926]
98[undo breakage caused by -Wall cleaning
99Malcolm.Wallace@cs.york.ac.uk**20080620093922
100 The import of Data.Typeable is still required, at least for non-GHC.
101]
102[Make the package -Wall clean
103Ian Lynagh <igloo@earth.li>**20080618233627]
104[List particular extensions rather than -fglasgow-exts
105Ian Lynagh <igloo@earth.li>**20080616232035]
106[Avoid using deprecated flags
107Ian Lynagh <igloo@earth.li>**20080616145241]
108[TAG 2008-05-28
109Ian Lynagh <igloo@earth.li>**20080528004309]
110Patch bundle hash:
111c0ec88619683cfdeb280d43e08cfeb2a2bb6f492