From 75b03fb624af33c9b90c3f3dccacadf18b442d17 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 18 Feb 2005 13:53:29 +0000 Subject: working on resource doc and exx, fixing bugs --- src/GF/Compile/ModDeps.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/GF/Compile/ModDeps.hs') 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 {- -- cgit v1.2.3