1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Pattern guards need not have two sides

This commit is contained in:
Rick Winfrey 2018-06-22 16:54:53 -07:00
parent 2dc20ab960
commit 1bfdcfdb1c

View File

@ -654,7 +654,7 @@ pattern' :: Assignment
pattern' = symbol Pattern *> children expressions
patternGuard :: Assignment
patternGuard = makeTerm <$> symbol PatternGuard <*> children (Syntax.PatternGuard <$> expression <*> expression)
patternGuard = makeTerm <$> symbol PatternGuard <*> children (Syntax.PatternGuard <$> expression <*> (expression <|> emptyTerm))
pragma :: Assignment
pragma = makeTerm <$> symbol Pragma <*> (Syntax.Pragma <$> source)