mirror of
https://github.com/unisonweb/unison.git
synced 2024-10-05 14:17:33 +03:00
Merge pull request #275 from noahhaasis/nicer-error-for-empty-match-list
Add a nicer error message for empty match lists
This commit is contained in:
commit
ad5f550183
@ -80,8 +80,7 @@ match = do
|
||||
start <- reserved "case"
|
||||
scrutinee <- term
|
||||
_ <- openBlockWith "of"
|
||||
-- TODO: Produce a nice error message for empty match list
|
||||
cases <- sepBy1 semi matchCase
|
||||
cases <- sepBy1 semi matchCase P.<?> "at least one case in case/of"
|
||||
_ <- closeBlock
|
||||
pure $ Term.match (ann start <> ann (last cases)) scrutinee cases
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user