I am using this currently: makeHex n = "0x" ++ map toUpper (showHex n "") -- gives me 0xFF for example I know i can use printf but I am not sending this to output when I am doing the formatting.