summaryrefslogtreecommitdiff
path: root/src/GF/Infra/Modules.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-06-19 18:12:35 +0000
committeraarne <aarne@cs.chalmers.se>2007-06-19 18:12:35 +0000
commite3f12103697e5eb9caada06134ba9aba01333928 (patch)
tree17a7f0cf5efbe215a23d5837d11a6981954c39da /src/GF/Infra/Modules.hs
parentf30fa0b4d15ec256f55e2c453fc3d7c42de9b3bf (diff)
extended functor syntax
Diffstat (limited to 'src/GF/Infra/Modules.hs')
-rw-r--r--src/GF/Infra/Modules.hs5
1 files changed, 3 insertions, 2 deletions
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