From 1ab0e42605b4bbc8d7c959ccf2b40bab1ce3237e Mon Sep 17 00:00:00 2001 From: rhiannon morris Date: Fri, 31 Mar 2023 19:33:40 +0200 Subject: [PATCH] print a slightly better error if 'case' has no qty --- lib/Quox/Parser/Parser.idr | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Quox/Parser/Parser.idr b/lib/Quox/Parser/Parser.idr index f8b9496..08c27ef 100644 --- a/lib/Quox/Parser/Parser.idr +++ b/lib/Quox/Parser/Parser.idr @@ -166,7 +166,9 @@ lamIntro = symbolsC [(Lam, "λ"), (DLam, "δ")] private covering caseIntro : Grammar True PQty caseIntro = symbols [(One, "case1"), (Any, "caseω")] - <|> resC "case" *> qty <* resC "." + <|> resC "case" *> + (qty <* resC "." <|> + fatalError {c = True} "missing quantity on 'case'") private optNameBinder : Grammar False BName