From: Samuel Bronson Date: Sat, 14 Oct 2006 16:34:42 +0000 (+0000) Subject: Get nofib-analyse to build with 6.4 at least... X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=435d4a45509ef2d703716453c4e64bb513b79006 Get nofib-analyse to build with 6.4 at least... --- diff --git a/utils/nofib-analyse/Main.hs b/utils/nofib-analyse/Main.hs index c2b0d42..c81cfb4 100644 --- a/utils/nofib-analyse/Main.hs +++ b/utils/nofib-analyse/Main.hs @@ -7,7 +7,7 @@ module Main where import GenUtils -import Printf +import Text.Printf import Slurp import CmdLine @@ -17,6 +17,7 @@ import Data.FiniteMap import System.Console.GetOpt import System.Exit ( exitWith, ExitCode(..) ) +import Numeric ( showFloat, showEFloat, showSigned ) import Data.Maybe ( isNothing ) import Data.Char import System.IO @@ -688,16 +689,17 @@ data BoxValue showBox :: BoxValue -> String showBox (RunFailed stat) = show_stat stat showBox (Percentage f) = show_pcntage f -showBox (BoxFloat f) = showFloat' Nothing (Just 2) f +showBox (BoxFloat f) = show f showBox (BoxInt n) = show (n `div` 1024) ++ "k" showBox (BoxInteger n) = show (n `div` 1024) ++ "k" showBox (BoxString s) = s instance Show BoxValue where { show = showBox } -show_pcntage n = show_float_signed (n-100) ++ "%" +show_pcntage n = show (n-100) ++ "%" +--show_pcntage n = show_float_signed (n-100) ++ "%" -show_float_signed = showFloat False False True False False Nothing (Just 1) +--show_float_signed = showFloat False False True False False Nothing (Just 1) show_stat Success = "(no result)" show_stat WrongStdout = "(stdout)" diff --git a/utils/nofib-analyse/Slurp.hs b/utils/nofib-analyse/Slurp.hs index a457857..7e6d46f 100644 --- a/utils/nofib-analyse/Slurp.hs +++ b/utils/nofib-analyse/Slurp.hs @@ -8,7 +8,7 @@ module Slurp (Status(..), Results(..), ResultTable(..), parse_log) where import CmdLine import Data.FiniteMap -import RegexString +import Text.Regex import Data.Maybe -- import Debug.Trace