From e3f12103697e5eb9caada06134ba9aba01333928 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 19 Jun 2007 18:12:35 +0000 Subject: extended functor syntax --- src/GF/Infra/Modules.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/GF/Infra/Modules.hs') diff --git a/src/GF/Infra/Modules.hs b/src/GF/Infra/Modules.hs index edbddbd3c..b0fe1b0ba 100644 --- a/src/GF/Infra/Modules.hs +++ b/src/GF/Infra/Modules.hs @@ -58,7 +58,7 @@ data MGrammar i f a = MGrammar {modules :: [(i,ModInfo i f a)]} data ModInfo i f a = ModMainGrammar (MainGrammar i) | ModMod (Module i f a) - | ModWith (ModuleType i) ModuleStatus i [(i,MInclude i)] [OpenSpec i] + | ModWith (Module i f a) (i,MInclude i) [OpenSpec i] deriving Show data Module i f a = Module { @@ -213,7 +213,8 @@ partOfGrammar gr (i,m) = MGrammar [mo | mo@(j,_) <- mods, elem j modsFor] mods = modules gr modsFor = case m of ModMod n -> (i:) $ map openedModule $ allDepsModule gr n - _ -> [i] ---- ModWith? + ---- ModWith n i os -> i : map openedModule os ++ partOfGrammar (ModMod n) ---- + _ -> [i] -- | all modules that a module extends, directly or indirectly -- cgit v1.2.3