From 97ebb614aa7f9d79bfbeabcfb1107bc88c8c5f3f Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Thu, 1 Sep 2022 22:35:54 +0100 Subject: Fix: if binNum fails, backtrack --- src/Lexer.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Lexer.hs') diff --git a/src/Lexer.hs b/src/Lexer.hs index 7d09752..1a7df62 100644 --- a/src/Lexer.hs +++ b/src/Lexer.hs @@ -27,7 +27,7 @@ binNum = do seq n $ return n integer :: Parser Integer -integer = binNum <|> T.integer scanner +integer = try binNum <|> T.integer scanner parens :: Parser a -> Parser a parens = T.parens scanner -- cgit v1.2.3