Hlint: Error: Use concatMap

This commit is contained in:
marko.kocic 2009-09-22 12:25:31 +00:00
parent f51083c1ff
commit 5c687ab275
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ accountNameLevel a = length (filter (==acctsepchar) a) + 1
-- | ["a:b:c","d:e"] -> ["a","a:b","a:b:c","d","d:e"]
expandAccountNames :: [AccountName] -> [AccountName]
expandAccountNames as = nub $ concat $ map expand as
expandAccountNames as = nub $ concatMap expand as
where expand = map accountNameFromComponents . tail . inits . accountNameComponents
-- | ["a:b:c","d:e"] -> ["a","d"]

View File

@ -58,7 +58,7 @@ addTimeLogEntry tle l0 = l0 { open_timelog_entries = tle : open_timelog_entries
rawLedgerTransactions :: RawLedger -> [Transaction]
rawLedgerTransactions = txnsof . ledger_txns
where txnsof ts = concat $ map flattenLedgerTransaction $ zip ts [1..]
where txnsof ts = concatMap flattenLedgerTransaction $ zip ts [1..]
rawLedgerAccountNamesUsed :: RawLedger -> [AccountName]
rawLedgerAccountNamesUsed = accountNamesFromTransactions . rawLedgerTransactions