Skip to content

Commit

Permalink
generalize error message of annotate
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewthad committed Sep 19, 2019
1 parent 2493d72 commit b3a9af3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Data/Bytes/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ bytes e !expected = Parser
infix 0 <?>

-- | Infix version of 'annotate'.
(<?>) :: Parser e s a -> e -> Parser e s a
(<?>) :: Parser x s a -> e -> Parser e s a
(<?>) = annotate

-- | Annotate a parser. If the parser fails, the error will
-- be returned.
annotate :: Parser e s a -> e -> Parser e s a
annotate :: Parser x s a -> e -> Parser e s a
annotate p e = p `orElse` fail e

-- | Consumes and returns the next byte in the input.
Expand Down

0 comments on commit b3a9af3

Please sign in to comment.