Safe Haskell | None |
---|---|
Language | Haskell98 |
- readIntFromOffset :: Array Char -> Int -> Maybe (Int, Int)
- readIntFromOffset# :: Array Char -> Int# -> (#Int#, Int#, Int##)
- readDouble :: Array Char -> Double
- readDoubleFromBytes :: Array Word8 -> Double
- showDouble :: Double -> Array Char
- showDoubleAsBytes :: Double -> Array Word8
- showDoubleFixed :: Int -> Double -> Array Char
- showDoubleFixedAsBytes :: Int -> Double -> Array Word8
Int Conversion
readIntFromOffset# :: Array Char -> Int# -> (#Int#, Int#, Int##) Source #
Unboxed version of readIntFromOffset
.
We still pay to unbox the input array, but avoid boxing the result by construction.
Double Conversion
Read and Show Double
s for a reasonable runtime cost.
readDouble :: Array Char -> Double Source #
Convert a foreign vector of characters to a Double.
- The standard Haskell
Char
type is four bytes in length. If you already have a vector ofWord8
then usereadDoubleFromBytes
instead to avoid the conversion.
showDouble :: Double -> Array Char Source #
Convert a Double
to ASCII text packed into a foreign Vector
.
showDoubleAsBytes :: Double -> Array Word8 Source #
Convert a Double
to ASCII text packed into a foreign Vector
.
showDoubleFixed :: Int -> Double -> Array Char Source #
Like showDouble
, but use a fixed number of digits after
the decimal point.
showDoubleFixedAsBytes :: Int -> Double -> Array Word8 Source #
Like showDoubleAsBytes
, but use a fixed number of digits after
the decimal point.