Skip to content

Commit 34b17f4

Browse files
committed
Fix Show instance for ParseError
Before: (Left (ParseError "Expecting octave mark"Position { line: 1, column: 1 })) After: (Left (ParseError "Expecting octave mark" (Position { line: 1, column: 1 })))
1 parent 5ffbcf1 commit 34b17f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Text/Parsing/Parser.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ parseErrorPosition (ParseError _ pos) = pos
3737

3838
instance showParseError :: Show ParseError where
3939
show (ParseError msg pos) =
40-
"(ParseError " <> show msg <> show pos <> ")"
40+
"(ParseError " <> show msg <> " " <> show pos <> ")"
4141

4242
derive instance eqParseError :: Eq ParseError
4343
derive instance ordParseError :: Ord ParseError

src/Text/Parsing/Parser/Pos.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ newtype Position = Position
1616

1717
instance showPosition :: Show Position where
1818
show (Position { line: line, column: column }) =
19-
"Position { line: " <> show line <> ", column: " <> show column <> " }"
19+
"(Position { line: " <> show line <> ", column: " <> show column <> " })"
2020

2121
derive instance eqPosition :: Eq Position
2222
derive instance ordPosition :: Ord Position

0 commit comments

Comments
 (0)