How to print integer literals in binary or hex in haskell?
printBinary 5 => \"0101\" printHex 5 => \"05\"
Which libraries/functions allo
Hex can be written with 0x and binary with 0b prefix e.g.:
0x
0b
> 0xff 255 >:set -XBinaryLiterals > 0b11 3
Note that binary requires the BinaryLiterals extension.
BinaryLiterals