From 2ca04507375ccd9bf74db431e14f7419a706d591 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Sun, 6 Aug 2017 15:44:52 -0400 Subject: [PATCH] Use the same Colourize type synonym for withSGRCode. --- src/Data/Error.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Error.hs b/src/Data/Error.hs index 9576d74e8..f9bb13d5d 100644 --- a/src/Data/Error.hs +++ b/src/Data/Error.hs @@ -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)