lens-4.2: Lenses, Folds and Traversals

Copyright(C) 2012-2014 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellTrustworthy
LanguageHaskell98

Control.Lens.Internal.ByteString

Description

This module spends a lot of time fiddling around with ByteString internals to work around http://hackage.haskell.org/trac/ghc/ticket/7556 on older Haskell Platforms and to improve constant and asymptotic factors in our performance.

Synopsis

Documentation

traversedStrict :: Int -> IndexedTraversal' Int ByteString Word8 Source

Traverse a strict ByteString from left to right in a biased fashion.

traversedStrictTree :: Int -> IndexedTraversal' Int ByteString Word8 Source

Traverse a strict ByteString in a relatively balanced fashion, as a balanced tree with biased runs of elements at the leaves.

unpackStrict8 :: ByteString -> String Source

Unpack a strict Bytestring, pretending the bytes are chars.

traversedStrict8 :: Int -> IndexedTraversal' Int ByteString Char Source

Traverse a strict ByteString from left to right in a biased fashion pretending the bytes are characters.

traversedStrictTree8 :: Int -> IndexedTraversal' Int ByteString Char Source

Traverse a strict ByteString in a relatively balanced fashion, as a balanced tree with biased runs of elements at the leaves, pretending the bytes are chars.

unpackLazy :: ByteString -> [Word8] Source

Unpack a lazy Bytestring

unpackLazy8 :: ByteString -> String Source

Unpack a lazy ByteString pretending the bytes are chars.

traversedLazy8 :: IndexedTraversal' Int64 ByteString Char Source

An IndexedTraversal of the individual bytes in a lazy ByteString pretending the bytes are chars.