diff --git a/src/Parser.purs b/src/Parser.purs index c669ecf..f98dad7 100644 --- a/src/Parser.purs +++ b/src/Parser.purs @@ -54,7 +54,7 @@ instance altParser :: Alt Parser where where p stream = case p1 stream of Nothing -> p2 stream - Just x -> Just x + right -> right instance plusParser :: Plus Parser where empty :: forall a. Parser a @@ -62,7 +62,6 @@ instance plusParser :: Plus Parser where instance alternativeParser :: Alternative Parser --- TODO: Control.Lazy instance instance lazyParser :: Lazy (Parser a) where defer f = Parser \str -> parse (f unit) str @@ -158,12 +157,3 @@ integer = token int symbol :: String -> Parser String symbol xs = token (string xs) - --- TODO: try orElse ---try :: Parser a -> Parser a ---try p = Parser p' --- where --- p' = case parse p of --- Nothing -> p --- Just --- orElse, (<|>) :: Parser a -> Parser a -> Parser a