@@ -47,9 +47,9 @@ defaultTheme = ColourTheme { keywordColour = IdrisColour Nothing True False True
47mkSGR :: IdrisColour -> [SGR]
47mkSGR :: IdrisColour -> [SGR]
48mkSGR (IdrisColour c v u b i) =
48mkSGR (IdrisColour c v u b i) =
50− (if u then [SetUnderlining SingleUnderline] else []) ++
50+ [SetUnderlining SingleUnderline | u] ++
51− (if b then [SetConsoleIntensity BoldIntensity] else []) ++
51+ [SetConsoleIntensity BoldIntensity | b] ++
52− (if i then [SetItalicized True] else [])
52+ [SetItalicized True | i]
54 fg Nothing = []
54 fg Nothing = []
55 fg (Just c) = [SetColor Foreground (if v then Vivid else Dull) c]
55 fg (Just c) = [SetColor Foreground (if v then Vivid else Dull) c]
@@ -71,9 +71,9 @@ hEndColourise h _ = hSetSGR h [Reset]
71colouriseWithSTX :: IdrisColour -> String -> String
71colouriseWithSTX :: IdrisColour -> String -> String
72colouriseWithSTX (IdrisColour c v u b i) str = setSGRCode sgr ++ "\STX" ++ str ++ setSGRCode [Reset] ++ "\STX"
72colouriseWithSTX (IdrisColour c v u b i) str = setSGRCode sgr ++ "\STX" ++ str ++ setSGRCode [Reset] ++ "\STX"
73 where sgr = fg c ++
73 where sgr = fg c ++
74− (if u then [SetUnderlining SingleUnderline] else []) ++
74+ [SetUnderlining SingleUnderline | u] ++
75− (if b then [SetConsoleIntensity BoldIntensity] else []) ++
75+ [SetConsoleIntensity BoldIntensity | b] ++
76− (if i then [SetItalicized True] else [])
76+ [SetItalicized True | i]
77 fg Nothing = []
77 fg Nothing = []
78 fg (Just c) = [SetColor Foreground (if v then Vivid else Dull) c]
78 fg (Just c) = [SetColor Foreground (if v then Vivid else Dull) c]