@@ -12,17 +12,40 @@ in the Deep constructor.
1212
1313We also remove the lazy adjust function, and rename the strict adjust' to adjust.
1414
15+ diff --git a/src/Data/Strict/Sequence/Autogen.hs b/src/Data/Strict/Sequence/Autogen.hs
16+ index a4582dd..8cd1431 100644
17+ --- a/src/Data/Strict/Sequence/Autogen.hs
18+ +++ b/src/Data/Strict/Sequence/Autogen.hs
19+ @@ -46,7 +46,7 @@
20+ -- * Logarithmic-time concatenation with '><'
21+ -- * Logarithmic-time splitting with 'splitAt', 'take' and 'drop'
22+ -- * Logarithmic-time access to any element with
23+ --- 'lookup', '!?', 'index', 'insertAt', 'deleteAt', 'adjust'', and 'update'
24+ + -- 'lookup', '!?', 'index', 'insertAt', 'deleteAt', 'adjust', and 'update'
25+ --
26+ -- Note that sequences are typically /slower/ than lists when using only
27+ -- operations for which they have the same big-\(O\) complexity: sequences
28+ @@ -204,7 +204,6 @@ module Data.Strict.Sequence.Autogen (
29+ (!?), -- :: Seq a -> Int -> Maybe a
30+ index, -- :: Seq a -> Int -> a
31+ adjust, -- :: (a -> a) -> Int -> Seq a -> Seq a
32+ - adjust', -- :: (a -> a) -> Int -> Seq a -> Seq a
33+ update, -- :: Int -> a -> Seq a -> Seq a
34+ take, -- :: Int -> Seq a -> Seq a
35+ drop, -- :: Int -> Seq a -> Seq a
36+ diff --git a/src/Data/Strict/Sequence/Autogen/Internal.hs b/src/Data/Strict/Sequence/Autogen/Internal.hs
37+ index b026684..5c02404 100644
1538--- a/src/Data/Strict/Sequence/Autogen/Internal.hs
1639+++ b/src/Data/Strict/Sequence/Autogen/Internal.hs
17- @@ -144 ,7 +144 ,6 @@
40+ @@ -148 ,7 +148 ,6 @@ module Data.Strict.Sequence.Autogen.Internal (
1841 (!?), -- :: Seq a -> Int -> Maybe a
1942 index, -- :: Seq a -> Int -> a
2043 adjust, -- :: (a -> a) -> Int -> Seq a -> Seq a
2144- adjust', -- :: (a -> a) -> Int -> Seq a -> Seq a
2245 update, -- :: Int -> a -> Seq a -> Seq a
2346 take, -- :: Int -> Seq a -> Seq a
2447 drop, -- :: Int -> Seq a -> Seq a
25- @@ -183 ,11 +182 ,9 @@
48+ @@ -187 ,11 +186 ,9 @@ module Data.Strict.Sequence.Autogen.Internal (
2649 zipWith4, -- :: (a -> b -> c -> d -> e) -> Seq a -> Seq b -> Seq c -> Seq d -> Seq e
2750 unzip, -- :: Seq (a, b) -> (Seq a, Seq b)
2851 unzipWith, -- :: (a -> (b, c)) -> Seq a -> (Seq b, Seq c)
@@ -34,7 +57,7 @@ We also remove the lazy adjust function, and rename the strict adjust' to adjust
3457 ) where
3558
3659 import Prelude hiding (
37- @@ -995 ,7 +992 ,7 @@
60+ @@ -998 ,7 +995 ,7 @@ seqDataType = mkDataType "Data.Strict.Sequence.Autogen.Seq" [emptyConstr, consCo
3861
3962 data FingerTree a
4063 = EmptyT
@@ -43,7 +66,7 @@ We also remove the lazy adjust function, and rename the strict adjust' to adjust
4366 | Deep {-# UNPACK #-} !Int !(Digit a) (FingerTree (Node a)) !(Digit a)
4467 #ifdef TESTING
4568 deriving Show
46- @@ -1184 ,10 +1181 ,10 @@
69+ @@ -1189 ,10 +1186 ,10 @@ pullR s pr m = case viewRTree m of
4770 -- Digits
4871
4972 data Digit a
@@ -58,7 +81,7 @@ We also remove the lazy adjust function, and rename the strict adjust' to adjust
5881 #ifdef TESTING
5982 deriving Show
6083 #endif
61- @@ -1287 ,8 +1284 ,8 @@
84+ @@ -1294 ,8 +1291 ,8 @@ digitToTree' !_n (One a) = Single a
6285 -- Nodes
6386
6487 data Node a
@@ -69,7 +92,7 @@ We also remove the lazy adjust function, and rename the strict adjust' to adjust
6992 #ifdef TESTING
7093 deriving Show
7194 #endif
72- @@ -2517 ,25 +2514 ,12 @@
95+ @@ -2511 ,25 +2508 ,12 @@ updateDigit v i (Four a b c d)
7396 sab = sa + size b
7497 sabc = sab + size c
7598
@@ -96,19 +119,19 @@ We also remove the lazy adjust function, and rename the strict adjust' to adjust
96119 -- case xs !? i of
97120 -- Nothing -> xs
98121 -- Just x -> let !x' = f x
99- @@ -2543 ,9 +2527 ,9 @@
122+ @@ -2537 ,9 +2521 ,9 @@ adjust f i (Seq xs)
100123 -- @
101124 --
102125 -- @since 0.5.8
103126- adjust' :: forall a . (a -> a) -> Int -> Seq a -> Seq a
104127+ adjust :: forall a . (a -> a) -> Int -> Seq a -> Seq a
105- #if __GLASGOW_HASKELL__ >= 708
128+ #ifdef __GLASGOW_HASKELL__
106129- adjust' f i xs
107130+ adjust f i xs
108131 -- See note on unsigned arithmetic in splitAt
109132 | fromIntegral i < (fromIntegral (length xs) :: Word) =
110133 coerce $ adjustTree (\ !_k (ForceBox a) -> ForceBox (f a)) i (coerce xs)
111- @@ -2554 ,7 +2538 ,7 @@
134+ @@ -2548 ,7 +2532 ,7 @@ adjust' f i xs
112135 -- This is inefficient, but fixing it would take a lot of fuss and bother
113136 -- for little immediate gain. We can deal with that when we have another
114137 -- Haskell implementation to worry about.
@@ -117,22 +140,3 @@ We also remove the lazy adjust function, and rename the strict adjust' to adjust
117140 case xs !? i of
118141 Nothing -> xs
119142 Just x -> let !x' = f x
120- --- a/src/Data/Strict/Sequence/Autogen.hs
121- +++ b/src/Data/Strict/Sequence/Autogen.hs
122- @@ -46,7 +46,7 @@
123- -- * Logarithmic-time concatenation with '><'
124- -- * Logarithmic-time splitting with 'splitAt', 'take' and 'drop'
125- -- * Logarithmic-time access to any element with
126- --- 'lookup', '!?', 'index', 'insertAt', 'deleteAt', 'adjust'', and 'update'
127- + -- 'lookup', '!?', 'index', 'insertAt', 'deleteAt', 'adjust', and 'update'
128- --
129- -- Note that sequences are typically /slower/ than lists when using only
130- -- operations for which they have the same big-\(O\) complexity: sequences
131- @@ -204,7 +204,6 @@
132- (!?), -- :: Seq a -> Int -> Maybe a
133- index, -- :: Seq a -> Int -> a
134- adjust, -- :: (a -> a) -> Int -> Seq a -> Seq a
135- - adjust', -- :: (a -> a) -> Int -> Seq a -> Seq a
136- update, -- :: Int -> a -> Seq a -> Seq a
137- take, -- :: Int -> Seq a -> Seq a
138- drop, -- :: Int -> Seq a -> Seq a
0 commit comments