@@ -97,7 +97,7 @@ many : Parser a -> Parser (List a)
98many1 p = [| p :: many p |]
98many1 p = [| p :: many p |]
100−many p = many1 p <|> pure []
100+many p = lazy (many1 p) <|> pure []
102bool : Parser Bool
102bool : Parser Bool
103bool = parseTrue <|> parseFalse
103bool = parseTrue <|> parseFalse
@@ -164,7 +164,7 @@ sepBy : Parser a -> Parser b -> Parser (List a)
164sepBy p s = sepBy1 p s <|> pure Nil
164sepBy p s = sepBy1 p s <|> pure Nil
166manyTil : Parser a -> Parser b -> Parser (List a)
166manyTil : Parser a -> Parser b -> Parser (List a)
167−manyTil p e = (e $> pure Nil) <|> [| p :: manyTil p e |]
167+manyTil p e = (e $> pure Nil) <|> lazy [| p :: manyTil p e |] <|> pure Nil
169--------------------------------------------------------------------------------
169--------------------------------------------------------------------------------
170-- Expressions
170-- Expressions