[project @ 1998-01-30 16:59:06 by sof]
authorsof <unknown>
Fri, 30 Jan 1998 16:59:06 +0000 (16:59 +0000)
committersof <unknown>
Fri, 30 Jan 1998 16:59:06 +0000 (16:59 +0000)
- intToDigit: if we're going to crash and burn, we might
  as well report back the argument value that caused it.

ghc/lib/ghc/PrelBase.lhs

index ee3151b..c8b4da1 100644 (file)
@@ -791,7 +791,7 @@ intToDigit :: Int -> Char
 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}