From: simonmar Date: Tue, 18 Sep 2001 14:42:33 +0000 (+0000) Subject: [project @ 2001-09-18 14:42:33 by simonmar] X-Git-Tag: Approximately_9120_patches~956 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=dd7ecb76f84dbcb4c9db209f5c80c0b856ceb29c;p=ghc-hetmet.git [project @ 2001-09-18 14:42:33 by simonmar] Rearrange some code in order to make printing of Ints go a little faster. --- diff --git a/ghc/lib/std/PrelShow.lhs b/ghc/lib/std/PrelShow.lhs index 08d728e..409ab93 100644 --- a/ghc/lib/std/PrelShow.lhs +++ b/ghc/lib/std/PrelShow.lhs @@ -1,5 +1,5 @@ % ------------------------------------------------------------------------------ -% $Id: PrelShow.lhs,v 1.13 2001/02/28 00:01:03 qrczak Exp $ +% $Id: PrelShow.lhs,v 1.14 2001/09/18 14:42:33 simonmar Exp $ % % (c) The University of Glasgow, 1992-2000 % @@ -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} %*********************************************************