From b3a9af303dca37783068590a444e6b066e7db7c5 Mon Sep 17 00:00:00 2001 From: Andrew Martin Date: Thu, 19 Sep 2019 11:55:50 -0400 Subject: [PATCH] generalize error message of annotate --- src/Data/Bytes/Parser.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Bytes/Parser.hs b/src/Data/Bytes/Parser.hs index c087813..9166753 100644 --- a/src/Data/Bytes/Parser.hs +++ b/src/Data/Bytes/Parser.hs @@ -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.