- intToDigit: if we're going to crash and burn, we might
as well report back the argument value that caused it.
intToDigit i
| i >= 0 && i <= 9 = toEnum (fromEnum '0' + i)
| i >= 10 && i <= 15 = toEnum (fromEnum 'a' + i -10)
- | otherwise = error "Char.intToDigit: not a digit" -- ....
+ | otherwise = error ("Char.intToDigit: not a digit: " ++ show i) -- ....
\end{code}