remove read of the heads
and one tail Removed head from Utility.PartialPrelude in order to avoid the build warning with recent ghc versions as well.
This commit is contained in:
parent
10216b44d2
commit
4ca3d1d584
12 changed files with 32 additions and 42 deletions
|
@ -52,9 +52,8 @@ readFileStrict = readFile >=> \s -> length s `seq` return s
|
|||
separate :: (a -> Bool) -> [a] -> ([a], [a])
|
||||
separate c l = unbreak $ break c l
|
||||
where
|
||||
unbreak r@(a, b)
|
||||
| null b = r
|
||||
| otherwise = (a, tail b)
|
||||
unbreak (a, (_:b)) = (a, b)
|
||||
unbreak r = r
|
||||
|
||||
separate' :: (Word8 -> Bool) -> S.ByteString -> (S.ByteString, S.ByteString)
|
||||
separate' c l = unbreak $ S.break c l
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue