[project @ 2002-03-14 16:26:40 by simonmar]
[ghc-base.git] / GHC / Show.lhs
index 2edd038..9a14dae 100644 (file)
@@ -1,5 +1,5 @@
 % ------------------------------------------------------------------------------
-% $Id: Show.lhs,v 1.1 2001/06/28 14:15:03 simonmar Exp $
+% $Id: Show.lhs,v 1.4 2001/12/21 15:07:25 simonmar Exp $
 %
 % (c) The University of Glasgow, 1992-2000
 %
@@ -34,8 +34,8 @@ module GHC.Show
 
 import {-# SOURCE #-} GHC.Err ( error )
 import GHC.Base
-import GHC.Tup
-import GHC.Maybe
+import Data.Maybe
+import Data.Either
 import GHC.List        ( (!!), break, dropWhile
 #ifdef USE_REPORT_PRELUDE
                 , concatMap, foldr1
@@ -246,8 +246,8 @@ itos n# cs
     itos' :: Int# -> String -> String
     itos' n# cs
         | n# <# 10#  = C# (chr# (ord# '0'# +# n#)) : cs
-        | otherwise = itos' (n# `quotInt#` 10#)
-                            (C# (chr# (ord# '0'# +# (n# `remInt#` 10#))) : cs)
+        | otherwise = case chr# (ord# '0'# +# (n# `remInt#` 10#)) of { c# ->
+                     itos' (n# `quotInt#` 10#) (C# c# : cs) }
 \end{code}
 
 %*********************************************************