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)
|
import System.IO (stdout)
|
||||||
|
|
||||||
prettyopts =
|
prettyopts =
|
||||||
defaultOutputOptionsDarkBg
|
baseopts
|
||||||
-- defaultOutputOptionsLightBg
|
|
||||||
-- defaultOutputOptionsNoColor
|
|
||||||
{ outputOptionsIndentAmount=2
|
{ outputOptionsIndentAmount=2
|
||||||
, outputOptionsCompact=True
|
, outputOptionsCompact=True
|
||||||
}
|
}
|
||||||
|
where
|
||||||
|
baseopts
|
||||||
|
| useColor = defaultOutputOptionsDarkBg -- defaultOutputOptionsLightBg
|
||||||
|
| otherwise = defaultOutputOptionsNoColor
|
||||||
|
|
||||||
-- | Pretty print. Generic alias for pretty-simple's pPrint.
|
-- | Pretty print. Generic alias for pretty-simple's pPrint.
|
||||||
pprint :: Show a => a -> IO ()
|
pprint :: Show a => a -> IO ()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user