mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-13 05:02:50 -06:00
CheckGrammar is now using the printer in GF.Grammar.Printer. Fixed bug that was hiding the warnings
This commit is contained in:
@@ -226,16 +226,16 @@ string s = "'" ++ concatMap esc s ++ "'"
|
||||
--
|
||||
|
||||
isListCat :: (CId, [(CId, [CId])]) -> Bool
|
||||
isListCat (cat,rules) = "List" `isPrefixOf` prIdent cat && length rules == 2
|
||||
isListCat (cat,rules) = "List" `isPrefixOf` showIdent cat && length rules == 2
|
||||
&& ("Base"++c) `elem` fs && ("Cons"++c) `elem` fs
|
||||
where c = drop 4 (prIdent cat)
|
||||
fs = map (prIdent . fst) rules
|
||||
where c = drop 4 (showIdent cat)
|
||||
fs = map (showIdent . fst) rules
|
||||
|
||||
isBaseFun :: CId -> Bool
|
||||
isBaseFun f = "Base" `isPrefixOf` prIdent f
|
||||
isBaseFun f = "Base" `isPrefixOf` showIdent f
|
||||
|
||||
isConsFun :: CId -> Bool
|
||||
isConsFun f = "Cons" `isPrefixOf` prIdent f
|
||||
isConsFun f = "Cons" `isPrefixOf` showIdent f
|
||||
|
||||
baseSize :: (CId, [(CId, [CId])]) -> Int
|
||||
baseSize (_,rules) = length bs
|
||||
|
||||
Reference in New Issue
Block a user