From e70f67fb7544644d939c8eafdbdc08f33299010e Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 29 May 2009 17:46:43 +0000 Subject: [PATCH] use double not float --- Commands/Add.hs | 4 ++-- Commands/Stats.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Commands/Add.hs b/Commands/Add.hs index 59b4ace05..f4c2a50d7 100644 --- a/Commands/Add.hs +++ b/Commands/Add.hs @@ -161,7 +161,7 @@ registerFromString s = do -- This is Simon White's letter pairs algorithm from -- http://www.catalysoft.com/articles/StrikeAMatch.html -- with a modification for short strings. -compareStrings :: String -> String -> Float +compareStrings :: String -> String -> Double compareStrings "" "" = 1 compareStrings (_:[]) "" = 0 compareStrings "" (_:[]) = 0 @@ -181,7 +181,7 @@ compareLedgerDescriptions s t = compareStrings s' t' t' = simplify t simplify = filter (not . (`elem` "0123456789")) -transactionsSimilarTo :: Ledger -> String -> [(Float,LedgerTransaction)] +transactionsSimilarTo :: Ledger -> String -> [(Double,LedgerTransaction)] transactionsSimilarTo l s = sortBy compareRelevanceAndRecency $ filter ((> threshold).fst) diff --git a/Commands/Stats.hs b/Commands/Stats.hs index 462c3de42..2f3a4e507 100644 --- a/Commands/Stats.hs +++ b/Commands/Stats.hs @@ -49,8 +49,8 @@ showStats _ _ l today = end _ = "" days = fromMaybe 0 $ daysInSpan span txnrate | days==0 = 0 - | otherwise = fromIntegral txns / fromIntegral days :: Float + | otherwise = fromIntegral txns / fromIntegral days :: Double txns30 = length $ filter withinlast30 rawledgertransactions withinlast30 t = (d>=(addDays (-30) today) && (d<=today)) where d = ltdate t - txnrate30 = fromIntegral txns30 / 30 :: Float + txnrate30 = fromIntegral txns30 / 30 :: Double