1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Use the same Colourize type synonym for withSGRCode.

This commit is contained in:
Rob Rix 2017-08-06 15:44:52 -04:00
parent e74c98f9cc
commit 2ca0450737

View File

@ -45,7 +45,7 @@ formatError includeSource colourize Blob{..} Error{..}
showLineNumber n = let s = show n in replicate (lineNumberDigits - length s) ' ' <> s
lineNumberDigits = succ (floor (logBase 10 (fromIntegral (posLine (spanStart errorSpan)) :: Double)))
withSGRCode :: Bool -> [SGR] -> ShowS -> ShowS
withSGRCode :: Colourize -> [SGR] -> ShowS -> ShowS
withSGRCode useColour code content =
if useColour then
showString (setSGRCode code)