From 8852637997be27a86c65740ddb14d5e9e183c1ee Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 15 Nov 2007 17:09:33 +0000 Subject: [PATCH] diagnostic error message in GrammarToHaskell --- src/GF/API/GrammarToHaskell.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GF/API/GrammarToHaskell.hs b/src/GF/API/GrammarToHaskell.hs index eae98d3f4..c57cfed42 100644 --- a/src/GF/API/GrammarToHaskell.hs +++ b/src/GF/API/GrammarToHaskell.hs @@ -248,6 +248,7 @@ updateSkeleton cat skel rule = case skel of (cat0,rules):rr | cat0 == cat -> (cat0, rule:rules) : rr (cat0,rules):rr -> (cat0, rules) : updateSkeleton cat rr rule + _ -> error $ cat ++ ": updating empty skeleton with" +++ show rule isListCat :: (OIdent, [(OIdent, [OIdent])]) -> Bool isListCat (cat,rules) = "List" `isPrefixOf` cat && length rules == 2 @@ -267,4 +268,4 @@ isConsFun f = "Cons" `isPrefixOf` f baseSize :: (OIdent, [(OIdent, [OIdent])]) -> Int baseSize (_,rules) = length bs - where Just (_,bs) = find (("Base" `isPrefixOf`) . fst) rules \ No newline at end of file + where Just (_,bs) = find (("Base" `isPrefixOf`) . fst) rules