lib: debug output now respects --color/NO_COLOR/ANSI support
Debug output now selects color or monochrome in the same way as normal output.
This commit is contained in:
		
							parent
							
								
									5e57cfb43e
								
							
						
					
					
						commit
						2b04b76448
					
				| @ -116,12 +116,14 @@ import System.Console.ANSI (hSupportsANSIColor) | ||||
| import System.IO (stdout) | ||||
| 
 | ||||
| prettyopts =  | ||||
|     defaultOutputOptionsDarkBg | ||||
|     -- defaultOutputOptionsLightBg | ||||
|     -- defaultOutputOptionsNoColor | ||||
|   baseopts | ||||
|     { outputOptionsIndentAmount=2 | ||||
|     , outputOptionsCompact=True | ||||
|     } | ||||
|   where | ||||
|     baseopts | ||||
|       | useColor  = defaultOutputOptionsDarkBg -- defaultOutputOptionsLightBg | ||||
|       | otherwise = defaultOutputOptionsNoColor | ||||
| 
 | ||||
| -- | Pretty print. Generic alias for pretty-simple's pPrint. | ||||
| pprint :: Show a => a -> IO () | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user