Skip to content

Commit 1424a1f

Browse files
committed
;cln:import: update some Haddock strings to reflect #2158
Signed-off-by: Jonathan Dowland <[email protected]>
1 parent 71684f5 commit 1424a1f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

hledger-lib/Hledger/Read/RulesReader.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ hledgerField rules record f = fmap
715715
(getEffectiveAssignment rules record f)
716716

717717
-- | Look up the final value assigned to a hledger field, with csv field
718-
-- references interpolated.
718+
-- references and regular expression match group references interpolated.
719719
hledgerFieldValue rules record f = (flip fmap) (getEffectiveAssignment rules record f)
720720
$ either (renderTemplate rules record)
721721
$ \cb -> let
@@ -730,9 +730,10 @@ maybeNegate :: MatcherPrefix -> Bool -> Bool
730730
maybeNegate Not origbool = not origbool
731731
maybeNegate _ origbool = origbool
732732

733-
-- | Given the conversion rules, a CSV record and a hledger field name, find
734-
-- the value template ultimately assigned to this field, if any, by a field
735-
-- assignment at top level or in a conditional block matching this record.
733+
-- | Given the conversion rules, a CSV record and a hledger field name, collect
734+
-- the value templates (and their parent Conditional Blocks where applicable)
735+
-- assigned to this field, if any, by top-level field assignments and
736+
-- conditional blocks matching this record.
736737
--
737738
-- Note conditional blocks' patterns are matched against an approximation of the
738739
-- CSV record: all the field values, without enclosing quotes, comma-separated.
@@ -748,7 +749,7 @@ getEffectiveAssignment rules record f = lastMay assignments
748749
assignments = dbg9 "csv assignments" $ toplevelassignments ++ conditionalassignments
749750
-- all top level field assignments
750751
toplevelassignments = map (Left . snd) $ filter ((==f).fst) $ rassignments rules
751-
-- all field assignments in conditional blocks assigning to field f and active for the current csv record
752+
-- all conditional blocks assigning to field f and active for the current csv record
752753
conditionalassignments = map Right
753754
$ filter (any (==f) . map fst . cbAssignments)
754755
$ filter (isBlockActive rules record)

0 commit comments

Comments
 (0)