Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							f78dc639a5 
							
						 
					 
					
						
						
							
							fix a slowdown with report rendering in 1.19.1 ( #1350 )  
						
						... 
						
						
						
						stripAnsi is called many times during rendering (by strWidth), so
should be fast. It was originally a regex replacement, and more
recently a custom parser. The parser was slower, particularly the one
in 1.19.1. See #1350 , and this rough test:
time118ish = timeIt $ print $ length $ concat $ map (fromRight undefined . regexReplace (toRegex' "\ESC\\[([0-9]+;)*([0-9]+)?[ABCDHJKfmsu]") "") testdata
time119    = timeparser (many (takeWhile1P Nothing (/='\ESC') <|> "" <$ ansi))
time1191   = timeparser (many ("" <$ try ansi <|> pure <$> anySingle))
timeparser p = timeIt $ print $ length $ concat $ map (concat . fromJust . parseMaybe p) testdata
testdata = concat $ replicate 10000
    [ "2008-01-01 income               assets🏦 checking            $1            $1"
    , "2008-06-01 gift                 assets🏦 checking            $1            $2"
    , "2008-06-02 save                 assets🏦 saving              $1            $3"
    , "                                assets🏦 checking  ..m$-1\ESC[m\ESC[m            $2"
    , "2008-06-03 eat & shop           assets:cash           ..m$-2\ESC[m\ESC[m             0"
    , "2008-12-31 pay off              assets🏦 checking  ..m$-1\ESC[m\ESC[m  ..m$-1\ESC[m\ESC[m"
    ]
ghci> time118ish
4560000
CPU time:   0.17s
ghci> time119
4560000
CPU time:   0.91s
ghci> time1191
4560000
CPU time:   2.76s
Possibly a more careful parser could beat regexReplace. Note the
latter does memoisation, which could be faster and/or could also use
more resident memory in some situations.
Ideally we would calculate all widths before adding ANSI colour codes,
so we wouldn't have to wastefully strip them. 
						
					 
					
						2020-09-10 18:07:40 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							2d068662c1 
							
						 
					 
					
						
						
							
							;make nix-view-commits  
						
						
						
					 
					
						2020-09-10 18:07:40 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							11a63c0274 
							
						 
					 
					
						
						
							
							;make quickbench: fix help  
						
						
						
					 
					
						2020-09-10 18:07:40 -07:00 
						 
				 
			
				
					
						
							
							
								legrostdg 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							1dfc7e1116 
							
						 
					 
					
						
						
							
							web: Put session file in $XDG_DATA_DIR. ( #1344 )  
						
						... 
						
						
						
						* web: Put session file in $XDG_DATA_DIR.
* web: Use $XDG_CACHE_HOME instead of $XDG_DATA_HOME.
* web: Force minimum version of directory (needed for xdg utilities).
* web: Cancel changes to hledger-web.cabal
Co-authored-by: Félix Sipma <felix.sipma@no-log.org> 
						
					 
					
						2020-09-10 08:37:33 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							8e1b5e784b 
							
						 
					 
					
						
						
							
							;doc: journal: redundant budget report link  
						
						
						
					 
					
						2020-09-08 07:55:07 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							389f163427 
							
						 
					 
					
						
						
							
							;install: update versions  
						
						
						
					 
					
						2020-09-08 07:11:12 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							73de12c264 
							
						 
					 
					
						
						
							
							;update changelogs  
						
						
						
					 
					
						2020-09-07 16:17:58 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							65d603abd4 
							
						 
					 
					
						
						
							
							;ci: release: try to fix over-active release creation  
						
						
						
					 
					
						2020-09-07 16:13:21 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							3a130f1c19 
							
						 
					 
					
						
						
							
							;ci: push: this workflow's cache seems stale, rebuild all  
						
						
						
					 
					
						2020-09-07 16:13:21 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							72a6b67368 
							
						 
					 
					
						
						
							
							;make: STACK environment variable can override stack command  
						
						... 
						
						
						
						Eg to run rules with a different snapshot:
  STACK="stack --stack-yaml=stack8.10.yaml" make functest 
						
					 
					
						2020-09-07 16:13:21 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							2b715fbe0d 
							
						 
					 
					
						
						
							
							;update changelogs  
						
						
						
					 
					
						2020-09-07 16:13:21 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							bc2670204f 
							
						 
					 
					
						
						
							
							;update missed hledger-web cabal file  
						
						
						
					 
					
						2020-09-07 15:40:43 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							b02218586b 
							
						 
					 
					
						
						
							
							;shake setversion: tweak commit message  
						
						
						
					 
					
						2020-09-07 12:19:16 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							018bf8f474 
							
						 
					 
					
						
						
							
							;update manuals  
						
						
						
					 
					
						2020-09-07 12:17:35 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							71e2111002 
							
						 
					 
					
						
						
							
							;update CLI usage texts  
						
						
						
					 
					
						2020-09-07 12:17:35 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							90adb95983 
							
						 
					 
					
						
						
							
							;update cabal files  
						
						
						
					 
					
						2020-09-07 12:17:35 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							a151bcaec7 
							
						 
					 
					
						
						
							
							; bump hledger-lib, hledger, hledger-ui, hledger-web version to 1.19.99  
						
						
						
					 
					
						2020-09-07 12:16:12 -07:00 
						 
				 
			
				
					
						
							
							
								Felix Yan 
							
						 
					 
					
						
						
						
						
							
						
						
							c6f33cc824 
							
						 
					 
					
						
						
							
							Remove redundant semigroups dependency  
						
						
						
					 
					
						2020-09-07 12:12:46 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							8599eda37c 
							
						 
					 
					
						
						
							
							allow megaparsec 9  
						
						
						
					 
					
						2020-09-07 11:41:57 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							845f344eba 
							
						 
					 
					
						
						
							
							;shake commandtxts,manuals,changelogs,cabalfiles,update: --commit  
						
						
						
					 
					
						2020-09-07 11:41:57 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							d6b1a18178 
							
						 
					 
					
						
						
							
							;shake setversion --commit: also commit the updated files  
						
						
						
					 
					
						2020-09-07 11:41:56 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							0578c50bf8 
							
						 
					 
					
						
						
							
							;shake update: regenerate all the usual bits  
						
						
						
					 
					
						2020-09-07 11:41:56 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							731cda3f65 
							
						 
					 
					
						
						
							
							;shake: use --dry-run instead of changelogs-dry  
						
						
						
					 
					
						2020-09-07 11:41:56 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							00e12c626c 
							
						 
					 
					
						
						
							
							;shake: simplify argument handling, fix setversion  
						
						
						
					 
					
						2020-09-07 11:41:56 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							306975e6ac 
							
						 
					 
					
						
						
							
							;shake cabalfiles updates .cabal files  
						
						
						
					 
					
						2020-09-07 11:41:56 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							1f4907928c 
							
						 
					 
					
						
						
							
							;shake: build can take package arguments, drop Shake PKG  
						
						
						
					 
					
						2020-09-07 11:41:56 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							a1321b7f26 
							
						 
					 
					
						
						
							
							;shake: commandhelp -> commandtxts, don't build this for "manuals"  
						
						
						
					 
					
						2020-09-07 11:41:56 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							5344913d04 
							
						 
					 
					
						
						
							
							;make ghci[d]-shake: extra package needed sometimes  
						
						
						
					 
					
						2020-09-07 09:23:42 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							f8a57dae51 
							
						 
					 
					
						
						
							
							;shake: help, cleanups  
						
						
						
					 
					
						2020-09-07 09:23:42 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							5c86e0bdbd 
							
						 
					 
					
						
						
							
							;shake changelogs: do both dev & release updates, based on .version  
						
						... 
						
						
						
						And add changelogs-dry. 
						
					 
					
						2020-09-07 09:23:42 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							79b532017b 
							
						 
					 
					
						
						
							
							;shake: setversion can operate on specified packages  
						
						
						
					 
					
						2020-09-07 09:23:42 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							fdd346294f 
							
						 
					 
					
						
						
							
							;shake: setversion can save a new version number  
						
						
						
					 
					
						2020-09-07 09:23:42 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							465e8cbc51 
							
						 
					 
					
						
						
							
							;make: update help  
						
						
						
					 
					
						2020-09-07 09:23:42 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							ec2826ba09 
							
						 
					 
					
						
						
							
							;shake: cleanup  
						
						
						
					 
					
						2020-09-07 09:23:42 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							13ccd23304 
							
						 
					 
					
						
						
							
							;shake: bump resolver  
						
						
						
					 
					
						2020-09-07 09:23:42 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							ab9e50003c 
							
						 
					 
					
						
						
							
							shake: refactor; use only the first argument as build target  
						
						
						
					 
					
						2020-09-07 09:23:42 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							a5fcb19bb0 
							
						 
					 
					
						
						
							
							;doc: changelog updates  
						
						
						
					 
					
						2020-09-07 09:23:42 -07:00 
						 
				 
			
				
					
						
							
							
								Stephen Morgan 
							
						 
					 
					
						
						
						
						
							
						
						
							600dab3976 
							
						 
					 
					
						
						
							
							lib: Correctly strip ansi sequences with no numbers/semicolons.  
						
						
						
					 
					
						2020-09-06 19:11:28 -07:00 
						 
				 
			
				
					
						
							
							
								Jakob Schöttl 
							
						 
					 
					
						
						
						
						
							
						
						
							1fb6f17bb2 
							
						 
					 
					
						
						
							
							Update shell completion for current master (v1.19)  
						
						
						
					 
					
						2020-09-06 17:11:59 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							a965bc8e75 
							
						 
					 
					
						
						
							
							install: add hledger-interest 1.6  
						
						
						
					 
					
						2020-09-03 09:57:34 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							a9fbaaf284 
							
						 
					 
					
						
						
							
							;partial comment cleanups  
						
						
						
					 
					
						2020-09-03 09:52:00 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							c2929939e4 
							
						 
					 
					
						
						
							
							make account type autodetection (& hledger-smooth) case insensitive again ( #1341 )  
						
						... 
						
						
						
						lib: added case-insensitive variants of the accountNameToRegex functions. 
						
					 
					
						2020-09-03 09:52:00 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							a229b658e8 
							
						 
					 
					
						
						
							
							;tests: convert balancesheet tests to new format  
						
						
						
					 
					
						2020-09-03 09:03:55 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							f4c4f06474 
							
						 
					 
					
						
						
							
							;doc: 1.19 announcement  
						
						
						
					 
					
						2020-09-02 12:38:49 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							0751536d25 
							
						 
					 
					
						
						
							
							install: bump minimum stack version to 2.3.1  
						
						
						
					 
					
						2020-09-02 12:33:38 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							3ff8a6291f 
							
						 
					 
					
						
						
							
							;ci: release: see if making branches explicit enables this  
						
						
						
					 
					
						2020-09-02 11:41:17 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							bb1d8f5ed8 
							
						 
					 
					
						
						
							
							;ci: linux: re-enable artifact building  
						
						
						
					 
					
						2020-09-02 11:09:19 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							d2a1afdfc2 
							
						 
					 
					
						
						
							
							;ci: mac: invalidate mac cache to work around the usual failure  
						
						... 
						
						
						
						(cf https://github.com/haskell/cabal/issues/1076#issuecomment-685879454 ) 
						
					 
					
						2020-09-02 10:35:28 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							5f1e040ad7 
							
						 
					 
					
						
						
							
							stack: bump default resolver to lts 16.12, ghc 8.8.4  
						
						
						
					 
					
						2020-09-02 10:20:57 -07:00 
						 
				 
			
				
					
						
							
							
								Simon Michael 
							
						 
					 
					
						
						
						
						
							
						
						
							e95a222ad2 
							
						 
					 
					
						
						
							
							;update some cabal files  
						
						
						
					 
					
						2020-09-01 20:39:02 -07:00