basement-0.0.10: Foundation scrap box of array & string

Safe Haskell | None
Language | Haskell2010

Basement.Base16

Synopsis

- unsafeConvertByte :: Word# -> (#Word#, Word##)
- hexWord16 :: Word16 -> (Char, Char, Char, Char)
- hexWord32 :: Word32 -> (Char, Char, Char, Char, Char, Char, Char, Char)
- escapeByte :: Word8 -> Base16Escape
- data Base16Escape = Base16Escape !Char7 !Char7

# Documentation

unsafeConvertByte :: Word# -> (#Word#, Word##) Source #

Convert a byte value in Words containing the hexadecimal representation of the Word#

The output words# are guaranteed to be included in the 0 to 2^7-1 range

Note that calling convertByte with a value greater than 256 will cause segfault or other horrible effect.

hexWord16 :: Word16 -> (Char, Char, Char, Char) Source #

hex word16

hexWord32 :: Word32 -> (Char, Char, Char, Char, Char, Char, Char, Char) Source #

hex word32

escapeByte :: Word8 -> Base16Escape Source #

data Base16Escape Source #

Constructors

Base16Escape !Char7 !Char7 |