Safe Haskell | None |
---|---|
Language | Haskell98 |
- module Data.Repa.Convert.Formats
- packFormat_i :: (Packable format, Elem (Value format)) => format -> Sources (Value format) -> IO (Sources (Array Word8))
- flatPackFormat_i :: (Packable format, Elem (Value format)) => format -> Sources (Value format) -> IO (Sources Word8)
- packFormatLn_i :: (Packable format, Elem (Value format)) => format -> Sources (Value format) -> IO (Sources (Array Word8))
- flatPackFormatLn_i :: (Packable format, Elem (Value format)) => format -> Sources (Value format) -> IO (Sources Word8)
- packAsciiLn_i :: forall a. (FormatAscii a, a ~ Value (FormatAscii' a), Elem a, Packable (FormatAscii' a)) => Sources a -> IO (Sources (Array Word8))
- flatPackAsciiLn_i :: forall a. (FormatAscii a, a ~ Value (FormatAscii' a), Elem a, Packable (FormatAscii' a)) => Sources a -> IO (Sources Word8)
- keyPackAsciiLn_i :: forall a k. (FormatAscii a, a ~ Value (FormatAscii' a), Elem a, Packable (FormatAscii' a), Elem k, Build k) => Sources (k, a) -> IO (Sources (k, Array Word8))
Pre-defined data formats
module Data.Repa.Convert.Formats
Packing
Standard
:: (Packable format, Elem (Value format)) | |
=> format | Desination format for data. |
-> Sources (Value format) | Sources of values to be packed. |
-> IO (Sources (Array Word8)) | Packed data. |
Pack elements into the given storage formats.
flatPackFormat_i :: (Packable format, Elem (Value format)) => format -> Sources (Value format) -> IO (Sources Word8) Source #
Like packFormat_i
, but return sources of flat bytes.
With newlines
:: (Packable format, Elem (Value format)) | |
=> format | Destination format for data. |
-> Sources (Value format) | Sources of values to be packed. |
-> IO (Sources (Array Word8)) | Packed data. |
Like packFormat_i
, but also append a newline character
after every packed element.
flatPackFormatLn_i :: (Packable format, Elem (Value format)) => format -> Sources (Value format) -> IO (Sources Word8) Source #
Like packFormatLn_i
, but return sources of flat bytes.
Default ASCII format
:: (FormatAscii a, a ~ Value (FormatAscii' a), Elem a, Packable (FormatAscii' a)) | |
=> Sources a | Sources of values to be packed. |
-> IO (Sources (Array Word8)) | Packed data. |
Like packFormatLn_i
,
but use a default, human-readable format to encode the values.
flatPackAsciiLn_i :: forall a. (FormatAscii a, a ~ Value (FormatAscii' a), Elem a, Packable (FormatAscii' a)) => Sources a -> IO (Sources Word8) Source #
Like packAsciiLn_i
, but return sources of flat bytes.
Keys and values
:: (FormatAscii a, a ~ Value (FormatAscii' a), Elem a, Packable (FormatAscii' a), Elem k, Build k) | |
=> Sources (k, a) | Sources of values to be packed. |
-> IO (Sources (k, Array Word8)) | Packed data. |
Like packFormatLn_i
,
but use a default, human-readable format to encode the values.