diff --git a/src/Data/Syntax/Assignment.hs b/src/Data/Syntax/Assignment.hs index 1c87d68ca..09a4304b7 100644 --- a/src/Data/Syntax/Assignment.hs +++ b/src/Data/Syntax/Assignment.hs @@ -167,9 +167,9 @@ data ErrorCause symbol showError :: Show symbol => Source.Source -> Error symbol -> ShowS showError source Error{..} = showSourcePos errorPos . showString ": error: " . showExpectation . showChar '\n' - . showString (prettyCallStack callStack) . 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' where showExpectation = case errorCause of UnexpectedEndOfInput [] -> showString "no rule to match at end of input nodes" UnexpectedEndOfInput symbols -> showString "expected " . showSymbols symbols . showString " at end of input nodes"