rio-0.1.22.0: A standard library for Haskell
Safe HaskellNone
LanguageHaskell2010

RIO.ByteString.Lazy

Description

Lazy ByteString. Import as:

import qualified RIO.ByteString.Lazy as BL

This module does not export any partial functions. For those, see RIO.ByteString.Lazy.Partial

Synopsis

The ByteString type

data ByteString #

Instances

Instances details
Data ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteString -> c ByteString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteString #

toConstr :: ByteString -> Constr #

dataTypeOf :: ByteString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteString) #

gmapT :: (forall b. Data b => b -> b) -> ByteString -> ByteString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

IsString ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

IsList ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Associated Types

type Item ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

type Item ByteString = Word8
Read ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Methods

readsPrec :: Int -> ReadS ByteString

readList :: ReadS [ByteString]

readPrec :: ReadPrec ByteString

readListPrec :: ReadPrec [ByteString]

Show ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Methods

showsPrec :: Int -> ByteString -> ShowS

show :: ByteString -> String #

showList :: [ByteString] -> ShowS

NFData ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Methods

rnf :: ByteString -> () #

Eq ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Ord ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Lift ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Methods

lift :: Quote m => ByteString -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => ByteString -> Code m ByteString

type Item ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

type Item ByteString = Word8

Introducing and eliminating ByteStrings

fromStrict :: StrictByteString -> LazyByteString #

toStrict :: LazyByteString -> StrictByteString #

fromChunks :: [StrictByteString] -> LazyByteString #

toChunks :: LazyByteString -> [StrictByteString] #

foldrChunks :: (StrictByteString -> a -> a) -> a -> ByteString -> a #

foldlChunks :: (a -> StrictByteString -> a) -> a -> ByteString -> a #

Basic interface

Transforming ByteStrings

Reducing ByteStrings (folds)

foldl :: (a -> Word8 -> a) -> a -> ByteString -> a #

foldl' :: (a -> Word8 -> a) -> a -> ByteString -> a #

foldr :: (Word8 -> a -> a) -> a -> ByteString -> a #

Special folds

any :: (Word8 -> Bool) -> ByteString -> Bool #

all :: (Word8 -> Bool) -> ByteString -> Bool #

Building ByteStrings

Scans

Accumulating maps

mapAccumL :: (acc -> Word8 -> (acc, Word8)) -> acc -> ByteString -> (acc, ByteString) #

mapAccumR :: (acc -> Word8 -> (acc, Word8)) -> acc -> ByteString -> (acc, ByteString) #

Infinite ByteStrings

Unfolding ByteStrings

unfoldr :: (a -> Maybe (Word8, a)) -> a -> ByteString #

Substrings

Breaking strings

Breaking into many substrings

Predicates

Search ByteStrings

Searching by equality

Searching with a predicate

Indexing ByteStrings

Zipping and unzipping ByteStrings

zipWith :: (Word8 -> Word8 -> a) -> ByteString -> ByteString -> [a] #

Low level conversions

Copying ByteStrings

I/O with ByteStrings

Standard input and output

putStr :: MonadIO m => LByteString -> m () Source #

Lifted putStr

Files

I/O with Handles

hGet :: MonadIO m => Handle -> Int -> m LByteString Source #

Lifted hGet

hPut :: MonadIO m => Handle -> LByteString -> m () Source #

Lifted hPut

hPutStr :: MonadIO m => Handle -> LByteString -> m () Source #

Lifted hPutStr