bio-0.5.2: A bioinformatics library

Safe Haskell | None

Bio.Util

Description

Utility module, with various useful stuff.

Synopsis

- lines :: ByteString -> [ByteString]
- splitWhen :: (ByteString -> Bool) -> [ByteString] -> [[ByteString]]
- countIO :: String -> String -> Int -> [a] -> IO [a]
- sequence' :: [IO a] -> IO [a]
- mylines :: ByteString -> [ByteString]

# Documentation

lines :: ByteString -> [ByteString]

Workaround, the current Data.ByteString.Lazy.Char8 contains a bug in `lines`.

splitWhen :: (ByteString -> Bool) -> [ByteString] -> [[ByteString]]

Break a list of bytestrings on a predicate.

countIO :: String -> String -> Int -> [a] -> IO [a]

Output (to stderr) progress while evaluating a lazy list. Useful for generating output while (conceptually, at least) in pure code

sequence' :: [IO a] -> IO [a]

A lazier version of `sequence` in Control.Monad, needed by `countIO` above.

mylines :: ByteString -> [ByteString]

Workaround, the current Data.ByteString.Lazy.Char8 contains a bug in `lines`.