data-svd-0.1.0.0: SVD (System view description) file handling
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Bits.Pretty

Synopsis

Show in base

showBin :: (PrintfArg t, FiniteBits t) => t -> String Source #

Format number using binary notation with leading 0b, padded according to its bit size

showDec :: (PrintfArg t, FiniteBits t) => t -> String Source #

Format number using decimal

showHex :: (PrintfArg t, FiniteBits t) => t -> String Source #

Format number using hexadecimal notation with leading 0x, padded according to its bit size

formatHex :: PrintfArg t => t -> String Source #

Format number using hexadecimal notation with leading 0x

Show binary groups

showBinGroups :: (PrintfArg b, Num b, FiniteBits b) => Int -> b -> String Source #

Print number in binary with bits grouped by groupSize e.g. with `groupSize = 4` we would get `0000 1010 0000 0101`

Size of Int

platformSizeOfInt :: Int Source #

Size of Int at the current platform

Shorthand

showHex8 :: Int -> String Source #

Format Int as 8-bit unsigned hexadecimal string

showHex16 :: Int -> String Source #

Format Int as 16-bit unsigned hexadecimal string

showHex32 :: Int -> String Source #

Format Int as 32-bit unsigned hexadecimal string