1
0
forked from GitHub/gf-core
This commit is contained in:
aarne
2004-04-01 09:51:32 +00:00
parent 8d828c46d5
commit cef421db7e
12 changed files with 64 additions and 24 deletions

View File

@@ -210,6 +210,20 @@ greatestAbstract gr = case allAbstracts gr of
[] -> Nothing
a -> return $ last a
-- all resource modules
allResources :: G.SourceGrammar -> [Ident]
allResources gr = [i | (i,M.ModMod m) <- M.modules gr, M.mtype m == M.MTResource]
-- the last resource in dependency order
greatestResource :: G.SourceGrammar -> Maybe Ident
greatestResource gr = case allResources gr of
[] -> Nothing
a -> return $ last a
resourceOfShellState :: ShellState -> Maybe Ident
resourceOfShellState = greatestResource . srcModules
qualifTop :: StateGrammar -> G.QIdent -> G.QIdent
qualifTop gr (_,c) = (absId gr,c)