dev: journalFilePath, include: show (unknown) instead of nothing

Probably not user-visible, but might improve debug logging slightly.
This commit is contained in:
Simon Michael 2022-08-14 08:48:50 +01:00
parent 8ec31b079c
commit a3096d0549
2 changed files with 2 additions and 2 deletions

View File

@ -308,7 +308,7 @@ journalFilePaths :: Journal -> [FilePath]
journalFilePaths = map fst . jfiles journalFilePaths = map fst . jfiles
mainfile :: Journal -> (FilePath, Text) mainfile :: Journal -> (FilePath, Text)
mainfile = headDef ("", "") . jfiles mainfile = headDef ("(unknown)", "") . jfiles
addTransaction :: Transaction -> Journal -> Journal addTransaction :: Transaction -> Journal -> Journal
addTransaction t j = j { jtxns = t : jtxns j } addTransaction t j = j { jtxns = t : jtxns j }

View File

@ -328,7 +328,7 @@ includedirectivep = do
where where
childfilename = takeFileName filepath childfilename = takeFileName filepath
parentfilename = maybe "" takeFileName $ headMay $ jincludefilestack parentj -- more accurate than journalFilePath parentj somehow parentfilename = maybe "(unknown)" takeFileName $ headMay $ jincludefilestack parentj -- XXX more accurate than journalFilePath for some reason
-- Update the parse state. -- Update the parse state.
put parentj' put parentj'