String -> ByteString -http -base

pack :: String -> ByteString
bytestring Data.ByteString.Char8
O(n) Convert a String into a ByteString For applications with large numbers of string literals, pack can be a bottleneck.
pack :: [Char] -> ByteString
bytestring Data.ByteString.Lazy.Char8
O(n) Convert a String into a ByteString.
readFile :: FilePath -> IO ByteString
bytestring Data.ByteString.Lazy.Char8
Read an entire file lazily into a ByteString.
readFile :: FilePath -> IO ByteString
bytestring Data.ByteString.Lazy
Read an entire file lazily into a ByteString. The Handle will be held open until EOF is encountered.
readFile :: FilePath -> IO ByteString
bytestring Data.ByteString
Read an entire file strictly into a ByteString. This is far more efficient than reading the characters into a String and then using pack. It also may be more efficient than opening the file and reading it using hGet.
readFile :: FilePath -> IO ByteString
bytestring Data.ByteString.Char8
Read an entire file strictly into a ByteString. This is far more efficient than reading the characters into a String and then using pack. It also may be more efficient than opening the file and reading it using hGet.
repeat :: Char -> ByteString
bytestring Data.ByteString.Lazy.Char8
repeat x is an infinite ByteString, with x the value of every element.
singleton :: Char -> ByteString
bytestring Data.ByteString.Char8, bytestring Data.ByteString.Lazy.Char8
O(1) Convert a Char into a ByteString
strMsg :: Error a => String -> a
transformers Control.Monad.Trans.Error, mtl Control.Monad.Error.Class, mtl Control.Monad.Error
badIO :: String -> IO a
template-haskell Language.Haskell.TH.Syntax
throwSocketError :: String -> IO a
network Network.Socket.Internal
Throw an IOError corresponding to the current socket error.
iterate :: (Char -> Char) -> Char -> ByteString
bytestring Data.ByteString.Lazy.Char8
iterate f x returns an infinite ByteString of repeated applications of f to x: > iterate f x == [x, f x, f (f x), ...]
replicate :: Int64 -> Char -> ByteString
bytestring Data.ByteString.Lazy.Char8
O(n) replicate n x is a ByteString of length n with x the value of every element.
replicate :: Int -> Char -> ByteString
bytestring Data.ByteString.Char8
O(n) replicate n x is a ByteString of length n with x the value of every element. The following holds: > replicate w c = unfoldr w (\u -> Just (u,u)) c This implemenation uses memset(3)
cons :: Char -> ByteString -> ByteString
bytestring Data.ByteString.Lazy.Char8
O(1) cons is analogous to '(:)' for lists.
cons :: Char -> ByteString -> ByteString
bytestring Data.ByteString.Char8
O(n) cons is analogous to (:) for lists, but of different complexity, as it requires a memcpy.
cons' :: Char -> ByteString -> ByteString
bytestring Data.ByteString.Lazy.Char8
O(1) Unlike cons, 'cons\'' is strict in the ByteString that we are consing onto. More precisely, it forces the head and the first chunk. It does this because, for space efficiency, it may coalesce the new byte onto the first 'chunk' rather than starting a new 'chunk'. So that means you can't use a lazy recursive contruction like this: > let xs = cons\' c xs in xs You can however use cons, as well as repeat and cycle, to build infinite lazy ByteStrings.
intersperse :: Char -> ByteString -> ByteString
bytestring Data.ByteString.Char8, bytestring Data.ByteString.Lazy.Char8
O(n) The intersperse function takes a Char and a ByteString and `intersperses' that Char between the elements of the ByteString. It is analogous to the intersperse function on Lists.
snoc :: ByteString -> Char -> ByteString
bytestring Data.ByteString.Char8, bytestring Data.ByteString.Lazy.Char8
O(n) Append a Char to the end of a ByteString. Similar to cons, this function performs a memcpy.
throwSocketErrorCode :: String -> CInt -> IO a
network Network.Socket.Internal
Like throwSocketError, but the error code is supplied as an argument. On Windows, do not use errno. Use a system error code instead.

Show more results