diff options
| author | aarne <unknown> | 2003-12-09 16:39:24 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2003-12-09 16:39:24 +0000 |
| commit | 08c9a2ab8cf7b77a5c0392f5f8e9643e39c89c5b (patch) | |
| tree | 56add96ffe8436f3fe920deb4bc7da320bc19e5d /src/GF/Compile/ModDeps.hs | |
| parent | 8e637feb793364134d469cb7d1e68605aab2c2ea (diff) | |
Introduced output of stripped format gfcm.
Diffstat (limited to 'src/GF/Compile/ModDeps.hs')
| -rw-r--r-- | src/GF/Compile/ModDeps.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/GF/Compile/ModDeps.hs b/src/GF/Compile/ModDeps.hs index 2f5f916d6..c4784e243 100644 --- a/src/GF/Compile/ModDeps.hs +++ b/src/GF/Compile/ModDeps.hs @@ -11,6 +11,7 @@ import Modules import Operations import Monad +import List -- AR 13/5/2003 @@ -106,6 +107,17 @@ openInterfaces ds m = do let mods = iterFix (concatMap more) (more (m,undefined)) return $ [i | (i,MTInterface) <- mods] +-- this function finds out what modules are really needed in the canoncal gr. +-- its argument is typically a concrete module name + +requiredCanModules :: (Eq i, Show i) => MGrammar i f a -> i -> [i] +requiredCanModules gr = nub . iterFix (concatMap more) . singleton where + more i = errVal [] $ do + m <- lookupModMod gr i + return $ maybe [] return (extends m) ++ map openedModule (opens m) + + + {- -- to test exampleDeps = [ @@ -117,3 +129,4 @@ exampleDeps = [ ii s = IdentM (IC s) MTInterface ir s = IdentM (IC s) MTResource -} + |
