;check: uniqueleafnames: short circuit to avoid wasted work
This commit is contained in:
parent
b96713a584
commit
6931eec3ce
@ -23,7 +23,9 @@ import Text.Printf (printf)
|
||||
journalCheckUniqueleafnames :: Journal -> Either String ()
|
||||
journalCheckUniqueleafnames j = do
|
||||
-- find all duplicate leafnames, and the full account names they appear in
|
||||
let dupes = finddupes $ journalLeafAndFullAccountNames j
|
||||
case finddupes $ journalLeafAndFullAccountNames j of
|
||||
[] -> Right ()
|
||||
dupes ->
|
||||
-- report the first posting that references one of them (and its position), for now
|
||||
sequence_ $ map (checkposting dupes) $ journalPostings j
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user