| Copyright | (C) 2015 Nicolas Trangez |
|---|---|
| License | MIT (see the file LICENSE) |
| Maintainer | Nicolas Trangez <ikke@nicolast.be> |
| Stability | provisional |
| Safe Haskell | None |
| Language | Haskell2010 |
| Extensions |
|
Data.Vector.Storable.ByteString
Contents
Description
- fromByteString :: ByteString -> Vector Word8
- toByteString :: Vector Word8 -> ByteString
- type Iso s t a b = forall p f. (Profunctor p, Functor f) => p a (f b) -> p s (f t)
- type Iso' s a = Iso s s a a
- iso :: Iso' ByteString (Vector Word8)
Conversion routines
fromByteString :: ByteString -> Vector Word8 Source
Convert a ByteString into a Vector of bytes.
No data is copied, so in-place mutations break referential transparency.
O(1).
toByteString :: Vector Word8 -> ByteString Source
Convert a Vector of bytes into a ByteString.
No data is copied, so in-place mutations break referential transparency.
O(1).
Isomorphism
type Iso s t a b = forall p f. (Profunctor p, Functor f) => p a (f b) -> p s (f t) Source
The type of an isomorphism a la Iso.