diff --git a/Ledger/AccountName.hs b/Ledger/AccountName.hs index b0cafa6ae..0d36436e5 100644 --- a/Ledger/AccountName.hs +++ b/Ledger/AccountName.hs @@ -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"] diff --git a/Ledger/RawLedger.hs b/Ledger/RawLedger.hs index 3eb6f76ee..04db440a5 100644 --- a/Ledger/RawLedger.hs +++ b/Ledger/RawLedger.hs @@ -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