Skip to content

Commit

Permalink
Fix Show instance for ParseError
Browse files Browse the repository at this point in the history
Before:
(Left (ParseError "Expecting octave mark"Position { line: 1, column: 1 }))

After:
(Left (ParseError "Expecting octave mark" (Position { line: 1, column: 1 })))
  • Loading branch information
mlang committed Jan 16, 2017
1 parent 5ffbcf1 commit 34b17f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Text/Parsing/Parser.purs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ parseErrorPosition (ParseError _ pos) = pos

instance showParseError :: Show ParseError where
show (ParseError msg pos) =
"(ParseError " <> show msg <> show pos <> ")"
"(ParseError " <> show msg <> " " <> show pos <> ")"

derive instance eqParseError :: Eq ParseError
derive instance ordParseError :: Ord ParseError
Expand Down
2 changes: 1 addition & 1 deletion src/Text/Parsing/Parser/Pos.purs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ newtype Position = Position

instance showPosition :: Show Position where
show (Position { line: line, column: column }) =
"Position { line: " <> show line <> ", column: " <> show column <> " }"
"(Position { line: " <> show line <> ", column: " <> show column <> " })"

derive instance eqPosition :: Eq Position
derive instance ordPosition :: Ord Position
Expand Down

0 comments on commit 34b17f4

Please sign in to comment.