core: Add show for ParserError

This commit is contained in:
Nathan McCarty 2025-01-24 17:59:30 -05:00
parent 222ae17180
commit 5e5ede87b4

View file

@ -25,6 +25,16 @@ record ParseError where
message : String
```
<!-- idris
export
Show ParseError where
show (MkParseError state message) =
let (line, col) = positionPair state
(line, col) = (show line, show col)
position = show state.position.index
in "Error at line \{line}, column \{col} (\{position}): \{message}"
-->
## Type Alias
```idris