haddock fixes
This commit is contained in:
parent
bf136fae5c
commit
b90c015d9a
10
Ledger.hs
10
Ledger.hs
@ -63,9 +63,9 @@ cacheLedger pats l =
|
||||
Ledger l' ant amap lprecision
|
||||
|
||||
-- | keep only entries whose description matches one of the
|
||||
-- | description patterns, if any, and which have at least one
|
||||
-- | transaction matching one of the account patterns, if any.
|
||||
-- | No description or account patterns implies match all.
|
||||
-- description patterns, if any, and which have at least one
|
||||
-- transaction matching one of the account patterns, if any.
|
||||
-- No description or account patterns implies match all.
|
||||
filterLedgerEntries :: (Regex,Regex) -> LedgerFile -> LedgerFile
|
||||
filterLedgerEntries (acctpat,descpat) (LedgerFile ms ps es f) =
|
||||
LedgerFile ms ps filteredentries f
|
||||
@ -82,8 +82,8 @@ filterLedgerEntries (acctpat,descpat) (LedgerFile ms ps es f) =
|
||||
otherwise -> True
|
||||
|
||||
-- | in each ledger entry, filter out transactions which do not match
|
||||
-- | the account patterns, if any. (Entries are no longer balanced
|
||||
-- | after this.)
|
||||
-- the account patterns, if any. (Entries are no longer balanced
|
||||
-- after this.)
|
||||
filterLedgerTransactions :: (Regex,Regex) -> LedgerFile -> LedgerFile
|
||||
filterLedgerTransactions (acctpat,descpat) (LedgerFile ms ps es f) =
|
||||
LedgerFile ms ps (map filterentrytxns es) f
|
||||
|
||||
@ -73,16 +73,16 @@ tildeExpand xs = return xs
|
||||
-- -- courtesy of allberry_b
|
||||
|
||||
-- | ledger pattern arguments are: 0 or more account patterns
|
||||
-- | optionally followed by -- and 0 or more description patterns.
|
||||
-- | No arguments implies match all. We convert the arguments to
|
||||
-- | a pair of regexps.
|
||||
-- optionally followed by -- and 0 or more description patterns.
|
||||
-- No arguments implies match all. We convert the arguments to
|
||||
-- a pair of regexps.
|
||||
parsePatternArgs :: [String] -> (Regex,Regex)
|
||||
parsePatternArgs args = (regexFor as, regexFor ds')
|
||||
where (as, ds) = break (=="--") args
|
||||
ds' = dropWhile (=="--") ds
|
||||
|
||||
-- | convert a list of strings to a regular expression matching any of them,
|
||||
-- | or a wildcard if there are none.
|
||||
-- or a wildcard if there are none.
|
||||
regexFor :: [String] -> Regex
|
||||
regexFor [] = wildcard
|
||||
regexFor ss = mkRegex $ "(" ++ (unwords $ intersperse "|" ss) ++ ")"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user