Skip to content

Commit 2511d02

Browse files
authored
Merge pull request #46 from mlang/showParseError
Fix Show instance for ParseError
2 parents 5ffbcf1 + 34b17f4 commit 2511d02

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Text/Parsing/Parser.purs

+1-1
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

+1-1
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)