comments
This commit is contained in:
		
							parent
							
								
									99f397da5d
								
							
						
					
					
						commit
						c5ae8e6891
					
				| @ -291,6 +291,8 @@ parseAndFinaliseJournal parser iopts f txt = do | |||||||
|             Right j -> return j |             Right j -> return j | ||||||
|             Left e  -> throwError e |             Left e  -> throwError e | ||||||
| 
 | 
 | ||||||
|  | -- Like parseAndFinaliseJournal but takes a (non-Erroring) JournalParser. | ||||||
|  | -- Used for timeclock/timedot. XXX let them use parseAndFinaliseJournal instead | ||||||
| parseAndFinaliseJournal' :: JournalParser IO ParsedJournal -> InputOpts | parseAndFinaliseJournal' :: JournalParser IO ParsedJournal -> InputOpts | ||||||
|                            -> FilePath -> Text -> ExceptT String IO Journal |                            -> FilePath -> Text -> ExceptT String IO Journal | ||||||
| parseAndFinaliseJournal' parser iopts f txt = do | parseAndFinaliseJournal' parser iopts f txt = do | ||||||
|  | |||||||
| @ -71,7 +71,7 @@ main = do | |||||||
|         | otherwise                                                = withJournalDoUICommand opts runBrickUi |         | otherwise                                                = withJournalDoUICommand opts runBrickUi | ||||||
| 
 | 
 | ||||||
| -- TODO fix nasty duplication of withJournalDo | -- TODO fix nasty duplication of withJournalDo | ||||||
| -- | hledger-ui's version of withJournalDo. Enables --auto and --forecast. | -- | hledger-ui's version of withJournalDo, which turns on --auto and --forecast. | ||||||
| withJournalDoUICommand :: UIOpts -> (UIOpts -> Journal -> IO ()) -> IO () | withJournalDoUICommand :: UIOpts -> (UIOpts -> Journal -> IO ()) -> IO () | ||||||
| withJournalDoUICommand uopts@UIOpts{cliopts_=copts@CliOpts{inputopts_=iopts,reportopts_=ropts}} cmd = do | withJournalDoUICommand uopts@UIOpts{cliopts_=copts@CliOpts{inputopts_=iopts,reportopts_=ropts}} cmd = do | ||||||
|   let copts' = copts{inputopts_=iopts{auto_=True}, reportopts_=ropts{forecast_=True}} |   let copts' = copts{inputopts_=iopts{auto_=True}, reportopts_=ropts{forecast_=True}} | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user