summaryrefslogtreecommitdiff
path: root/src/GF/Compile/ModDeps.hs
diff options
context:
space:
mode:
authoraarne <unknown>2005-02-18 13:53:29 +0000
committeraarne <unknown>2005-02-18 13:53:29 +0000
commit75b03fb624af33c9b90c3f3dccacadf18b442d17 (patch)
tree4731876ea45b88a38a2f71934c55e9be7b4ca632 /src/GF/Compile/ModDeps.hs
parentbafc9fbd0570626749261061c858cbbf95ccdcfb (diff)
working on resource doc and exx, fixing bugs
Diffstat (limited to 'src/GF/Compile/ModDeps.hs')
-rw-r--r--src/GF/Compile/ModDeps.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/GF/Compile/ModDeps.hs b/src/GF/Compile/ModDeps.hs
index 797b445e0..bc47e23a5 100644
--- a/src/GF/Compile/ModDeps.hs
+++ b/src/GF/Compile/ModDeps.hs
@@ -118,12 +118,14 @@ openInterfaces ds m = do
-- | 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
+requiredCanModules :: (Ord i, Show i) => MGrammar i f a -> i -> [i]
+requiredCanModules gr = nub . iterFix (concatMap more) . allExtends gr where
more i = errVal [] $ do
m <- lookupModMod gr i
- return $ extends m ++ map openedModule (opens m)
-
+ return $ extends m ++ [o | o <- map openedModule (opens m), notReuse o]
+ notReuse i = errVal True $ do
+ m <- lookupModMod gr i
+ return $ isModRes m -- to exclude reused Cnc and Abs from required
{-