@@ -23,8 +23,8 @@ import GHC.Magic (inline)
23import GHC.Magic (noinline)
23import GHC.Magic (noinline)
24import System.IO (Handle)
24import System.IO (Handle)
25import System.Random (randomRIO)
25import System.Random (randomRIO)
26−import Prelude
26+import Prelude hiding
27− hiding (any, all, take, sequence, sequence_, sequenceA, takeWhile)
27+ (any, all, take, sequence, sequence_, sequenceA, takeWhile, dropWhile)
29import qualified Data.Traversable as TR
29import qualified Data.Traversable as TR
30import qualified Data.Foldable as F
30import qualified Data.Foldable as F
@@ -88,9 +88,9 @@ takeBetween value = IP.parse (PR.takeBetween 0 value FL.drain)
88takeEQ :: MonadCatch m => Int -> SerialT m a -> m ()
88takeEQ :: MonadCatch m => Int -> SerialT m a -> m ()
89takeEQ value = IP.parse (PR.takeEQ value FL.drain)
89takeEQ value = IP.parse (PR.takeEQ value FL.drain)
91−{-# INLINE drainWhile #-}
91+{-# INLINE dropWhile #-}
92−drainWhile :: MonadCatch m => Int -> SerialT m Int -> m ()
92+dropWhile :: MonadCatch m => Int -> SerialT m Int -> m ()
93−drainWhile value = IP.parse (PR.drainWhile (<= value))
93+dropWhile value = IP.parse (PR.dropWhile (<= value))
95{-# INLINE sliceBeginWith #-}
95{-# INLINE sliceBeginWith #-}
96sliceBeginWith :: MonadCatch m => Int -> SerialT m Int -> m ()
96sliceBeginWith :: MonadCatch m => Int -> SerialT m Int -> m ()
@@ -154,8 +154,8 @@ splitAp :: MonadCatch m
154splitAp value =
154splitAp value =
157− <$> PR.drainWhile (<= (value `div` 2))
157+ <$> PR.dropWhile (<= (value `div` 2))
158− <*> PR.drainWhile (<= value)
158+ <*> PR.dropWhile (<= value)
161{-# INLINE splitApBefore #-}
161{-# INLINE splitApBefore #-}
@@ -163,8 +163,8 @@ splitApBefore :: MonadCatch m
163 => Int -> SerialT m Int -> m ()
163 => Int -> SerialT m Int -> m ()
164splitApBefore value =
164splitApBefore value =
166− ( PR.drainWhile (<= (value `div` 2))
166+ ( PR.dropWhile (<= (value `div` 2))
167− *> PR.drainWhile (<= value)
167+ *> PR.dropWhile (<= value)
170{-# INLINE splitApAfter #-}
170{-# INLINE splitApAfter #-}
@@ -172,8 +172,8 @@ splitApAfter :: MonadCatch m
172 => Int -> SerialT m Int -> m ()
172 => Int -> SerialT m Int -> m ()
173splitApAfter value =
173splitApAfter value =
175− ( PR.drainWhile (<= (value `div` 2))
175+ ( PR.dropWhile (<= (value `div` 2))
176− <* PR.drainWhile (<= value)
176+ <* PR.dropWhile (<= value)
179{-# INLINE serialWith #-}
179{-# INLINE serialWith #-}
@@ -182,8 +182,8 @@ serialWith :: MonadCatch m
182serialWith value =
182serialWith value =
184 (PR.serialWith (,)
184 (PR.serialWith (,)
185− (PR.drainWhile (<= (value `div` 2)))
185+ (PR.dropWhile (<= (value `div` 2)))
186− (PR.drainWhile (<= value))
186+ (PR.dropWhile (<= value))
189{-# INLINE split_ #-}
189{-# INLINE split_ #-}
@@ -192,8 +192,8 @@ split_ :: MonadCatch m
192split_ value =
192split_ value =
194 (PR.split_
194 (PR.split_
195− (PR.drainWhile (<= (value `div` 2)))
195+ (PR.dropWhile (<= (value `div` 2)))
196− (PR.drainWhile (<= value))
196+ (PR.dropWhile (<= value))
199{-# INLINE sliceSepByP #-}
199{-# INLINE sliceSepByP #-}
@@ -207,8 +207,8 @@ teeAllAny :: MonadCatch m
207teeAllAny value =
207teeAllAny value =
209 (PR.teeWith (,)
209 (PR.teeWith (,)
210− (PR.drainWhile (<= value))
210+ (PR.dropWhile (<= value))
211− (PR.drainWhile (<= value))
211+ (PR.dropWhile (<= value))
214{-# INLINE teeFstAllAny #-}
214{-# INLINE teeFstAllAny #-}
@@ -217,8 +217,8 @@ teeFstAllAny :: MonadCatch m
217teeFstAllAny value =
217teeFstAllAny value =
219 (PR.teeWithFst (,)
219 (PR.teeWithFst (,)
220− (PR.drainWhile (<= value))
220+ (PR.dropWhile (<= value))
221− (PR.drainWhile (<= value))
221+ (PR.dropWhile (<= value))
224{-# INLINE shortestAllAny #-}
224{-# INLINE shortestAllAny #-}
@@ -227,8 +227,8 @@ shortestAllAny :: MonadCatch m
227shortestAllAny value =
227shortestAllAny value =
229 (PR.shortest
229 (PR.shortest
230− (PR.drainWhile (<= value))
230+ (PR.dropWhile (<= value))
231− (PR.drainWhile (<= value))
231+ (PR.dropWhile (<= value))
234{-# INLINE longestAllAny #-}
234{-# INLINE longestAllAny #-}
@@ -237,8 +237,8 @@ longestAllAny :: MonadCatch m
237longestAllAny value =
237longestAllAny value =
239 (PR.longest
239 (PR.longest
240− (PR.drainWhile (<= value))
240+ (PR.dropWhile (<= value))
241− (PR.drainWhile (<= value))
241+ (PR.dropWhile (<= value))
244parseManyChunksOfSum :: Int -> Handle -> IO Int
244parseManyChunksOfSum :: Int -> Handle -> IO Int
@@ -345,7 +345,7 @@ o_1_space_serial value =
345 , benchIOSink value "takeEQ" $ takeEQ value
345 , benchIOSink value "takeEQ" $ takeEQ value
346 , benchIOSink value "takeWhile" $ takeWhile value
346 , benchIOSink value "takeWhile" $ takeWhile value
347 , benchIOSink value "takeP" $ takeP value
347 , benchIOSink value "takeP" $ takeP value
348− , benchIOSink value "drainWhile" $ drainWhile value
348+ , benchIOSink value "dropWhile" $ dropWhile value
349 , benchIOSink value "sliceBeginWith" $ sliceBeginWith value
349 , benchIOSink value "sliceBeginWith" $ sliceBeginWith value
350 , benchIOSink value "groupBy" $ groupBy
350 , benchIOSink value "groupBy" $ groupBy
351 , benchIOSink value "groupByRolling" $ groupByRolling
351 , benchIOSink value "groupByRolling" $ groupByRolling