From dd7ecb76f84dbcb4c9db209f5c80c0b856ceb29c Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 18 Sep 2001 14:42:33 +0000 Subject: [PATCH] [project @ 2001-09-18 14:42:33 by simonmar] Rearrange some code in order to make printing of Ints go a little faster. --- ghc/lib/std/PrelShow.lhs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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} %********************************************************* -- 1.7.10.4