[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 15:11:27 UTC 2010


The following commit has been merged in the master branch:
commit 5d21d5c63c174ab8da6fb3011cbce8fc96703684
Author: John Goerzen <jgoerzen at complete.org>
Date:   Sat Oct 14 03:11:41 2006 +0100

    Cleaned up typing

diff --git a/MissingH/Size.hs b/MissingH/Size.hs
index 0650559..594f06c 100644
--- a/MissingH/Size.hs
+++ b/MissingH/Size.hs
@@ -50,10 +50,12 @@ siOpts = SizeOpts {base = 10,
                    suffixes = "yzafpnum kMGTPEZY",
                    powerIncr = 3}
 
-renderNum opts 0.0 = (0, snd $ renderNum opts 1)
-renderNum opts number =
+renderNum :: (Real a, Floating b, Ord b) => SizeOpts -> a -> (b, Char)
+renderNum opts 0 = (0, snd $ renderNum opts 1)
+renderNum opts inpnumber =
     (retnum, suffix)
-    where incrList = map idx2pwr [0..length (suffixes opts) - 1]
+    where number = fromRational . toRational $ inpnumber
+          incrList = map idx2pwr [0..length (suffixes opts) - 1]
           incrIdxList = zip incrList [0..]
           idx2pwr i = i * powerIncr opts + firstPower opts
           

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list