summaryrefslogtreecommitdiff
path: root/DataUnits.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-23 01:13:13 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-23 01:13:13 -0400
commit12cdc96216e0c516ceeee922f9ca1568e9d4d592 (patch)
treeb8fdd69250c20e544ce2fccd1d796a5a2695e688 /DataUnits.hs
parent0a295fad345c9b41b457eeeb9f57ae0871c930b0 (diff)
tweak
Diffstat (limited to 'DataUnits.hs')
-rw-r--r--DataUnits.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/DataUnits.hs b/DataUnits.hs
index 3404e0ab1..329bf7e58 100644
--- a/DataUnits.hs
+++ b/DataUnits.hs
@@ -54,9 +54,8 @@ roughSize short i
at n = 1000^n
chop :: Integer -> Integer
- chop d = round ((fromInteger i :: Double) / fromInteger (at d))
+ chop d = round $ (fromInteger i :: Double) / fromInteger (at d)
- units :: Integer -> String -> String -> String
units d u u' = let num = chop d in
show num ++ " " ++
(if short then u' else plural num u)