diff options
Diffstat (limited to 'src/compiler/GF/Compile/PGFtoHaskell.hs')
| -rw-r--r-- | src/compiler/GF/Compile/PGFtoHaskell.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/GF/Compile/PGFtoHaskell.hs b/src/compiler/GF/Compile/PGFtoHaskell.hs index 749ad24bc..f4cf66219 100644 --- a/src/compiler/GF/Compile/PGFtoHaskell.hs +++ b/src/compiler/GF/Compile/PGFtoHaskell.hs @@ -273,13 +273,13 @@ hSkeleton gr = valtyps (_, (_,x)) (_, (_,y)) = compare x y valtypg (_, (_,x)) (_, (_,y)) = x == y jty (f,(ty,_,_,_)) = (f,catSkeleton ty) - +{- updateSkeleton :: OIdent -> HSkeleton -> (OIdent, [OIdent]) -> HSkeleton 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 - +-} isListCat :: (OIdent, [(OIdent, [OIdent])]) -> Bool isListCat (cat,rules) = "List" `isPrefixOf` cat && length rules == 2 && ("Base"++c) `elem` fs && ("Cons"++c) `elem` fs @@ -289,13 +289,13 @@ isListCat (cat,rules) = "List" `isPrefixOf` cat && length rules == 2 -- | Gets the element category of a list category. elemCat :: OIdent -> OIdent elemCat = drop 4 - +{- isBaseFun :: OIdent -> Bool isBaseFun f = "Base" `isPrefixOf` f isConsFun :: OIdent -> Bool isConsFun f = "Cons" `isPrefixOf` f - +-} baseSize :: (OIdent, [(OIdent, [OIdent])]) -> Int baseSize (_,rules) = length bs where Just (_,bs) = find (("Base" `isPrefixOf`) . fst) rules |
