diff --git a/src/Main.purs b/src/Main.purs index 786db45..bc57add 100644 --- a/src/Main.purs +++ b/src/Main.purs @@ -52,6 +52,11 @@ main = do Just (Tuple x y) -> show x <> " " <> show y Nothing -> "failed" + log $ "parsing integer in '-19ab' (integer): " <> + case parse integer "-19ab" of + Just (Tuple x y) -> show x <> " " <> show y + Nothing -> "failed" + -- JUST WORKS -- isffound $ parse isf "fable" -- isffound $ parse isf "f" diff --git a/src/Parser.purs b/src/Parser.purs index f98dad7..176a205 100644 --- a/src/Parser.purs +++ b/src/Parser.purs @@ -131,8 +131,6 @@ int = do _ <- char '-' pure (-n) <|> nat --- Handling spacing - isSpace :: Char -> Boolean isSpace c = A.any (\v -> v == c) [' ', '\t', ' ', '\r', '\n']