Ticket #2359: patch.txt

File patch.txt, 2.4 KB (added by sedillard, 7 years ago)

fixed typos and added quickcheck test

Line 
1
2New patches:
3
4[Fixed typo in updateMinWithKey / updateMaxWithKey
5[email protected]**20080704054350] {
6hunk ./Data/IntMap.hs 843
7-        Bin p m l r | m < 0 -> let t' = updateMinWithKeyUnsigned f l in Bin p m t' r
8-        Bin p m l r         -> let t' = updateMinWithKeyUnsigned f r in Bin p m l t'
9+        Bin p m l r | m < 0 -> let t' = updateMinWithKeyUnsigned f r in Bin p m l t'
10+        Bin p m l r         -> let t' = updateMinWithKeyUnsigned f l in Bin p m t' r
11hunk ./Data/IntMap.hs 851
12-        Bin p m l r -> let t' = updateMinWithKeyUnsigned f r in Bin p m l t'
13+        Bin p m l r -> let t' = updateMinWithKeyUnsigned f l in Bin p m t' r
14hunk ./Data/IntMap.hs 863
15-        Bin p m _ r | m < 0 -> let t' = updateMaxWithKeyUnsigned f r in Bin p m r t'
16-        Bin p m l _         -> let t' = updateMaxWithKeyUnsigned f l in Bin p m t' l
17+        Bin p m l r | m < 0 -> let t' = updateMaxWithKeyUnsigned f l in Bin p m t' r
18+        Bin p m l r         -> let t' = updateMaxWithKeyUnsigned f r in Bin p m l t'
19hunk ./Data/IntMap.hs 1873
20+
21+
22+{--------------------------------------------------------------------
23+  updateMin / updateMax
24+--------------------------------------------------------------------}
25+prop_UpdateMinMax :: [Key] -> Bool
26+prop_UpdateMinMax xs =
27+  let m = fromList [(x,0)|x<-xs]
28+      minKey = fst . head . Prelude.filter ((==1).snd) . assocs . updateMin succ $ m
29+      maxKey = fst . head . Prelude.filter ((==1).snd) . assocs . updateMax succ $ m
30+  in  all (>=minKey) xs && all (<=maxKey) xs
31+
32}
33
34Context:
35
36[Make warning-clean with GHC again
37Ian Lynagh <[email protected]>**20080623232023
38 With any luck we have now converged on a solution that works everywhere!
39]
40[Undo more Data.Typeable-related breakage for non-ghc.
41[email protected]**20080623092757]
42[Placate GHC with explicit import lists
43Ian Lynagh <[email protected]>**20080620183926]
44[undo breakage caused by -Wall cleaning
45[email protected]**20080620093922
46 The import of Data.Typeable is still required, at least for non-GHC.
47]
48[Make the package -Wall clean
49Ian Lynagh <[email protected]>**20080618233627]
50[List particular extensions rather than -fglasgow-exts
51Ian Lynagh <[email protected]>**20080616232035]
52[Avoid using deprecated flags
53Ian Lynagh <[email protected]>**20080616145241]
54[TAG 2008-05-28
55Ian Lynagh <[email protected]>**20080528004309]
56Patch bundle hash:
57c6dd65b54886fece69ccee570a5f27f944a538ce