mirror of
https://github.com/github/semantic.git
synced 2024-12-20 21:31:48 +03:00
Bold the source line/column.
This commit is contained in:
parent
fa3407f045
commit
5e88098782
@ -167,7 +167,7 @@ data ErrorCause symbol
|
||||
-- | Pretty-print an Error with reference to the source where it occurred.
|
||||
showError :: Show symbol => Source.Source -> Error symbol -> ShowS
|
||||
showError source Error{..}
|
||||
= showSourcePos errorPos . showString ": " . withSGRCode [SetColor Foreground Vivid Red] (showString "error") . showString ": " . showExpectation . showChar '\n'
|
||||
= withSGRCode [SetConsoleIntensity BoldIntensity] (showSourcePos errorPos) . showString ": " . withSGRCode [SetColor Foreground Vivid Red] (showString "error") . showString ": " . showExpectation . showChar '\n'
|
||||
. showString context -- actualLines results include line endings, so no newline here
|
||||
. showString (replicate (succ (Info.column errorPos + lineNumberDigits)) ' ') . showChar '^' . showChar '\n'
|
||||
. showString (prettyCallStack callStack) . showChar '\n'
|
||||
|
Loading…
Reference in New Issue
Block a user