From 5e7d3a5ff586ac75b768a9a1c1f2d5b80960e821 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 3 Jun 2020 15:41:17 +0200 Subject: Back to where I was but without the mess --- src/parser/Core.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/parser/Core.hs') diff --git a/src/parser/Core.hs b/src/parser/Core.hs index 8deea2f..08ac1a9 100644 --- a/src/parser/Core.hs +++ b/src/parser/Core.hs @@ -14,7 +14,6 @@ runParserStrict p input = case runParser p input of Right (_, rest) -> Left $ "Unconsumed input: \"" ++ rest ++ "\"" Left err -> Left err - ------------------------------------------------------------------------------- -- Parser instances ------------------------------------------------------------------------------- @@ -66,7 +65,7 @@ satisfyChar :: (Char -> Bool) -> Parser Char satisfyChar predicate = Parser p where p [] = Left "Expected input" p (c:cs) = if predicate c then Right (c, cs) - else Left "Expected char" + else Left $ "Unexpected char '" ++ [c] ++ "'" char :: Char -> Parser Char char c = satisfyChar (c ==) -- cgit