summaryrefslogtreecommitdiff
path: root/src/GF/Compile/ModDeps.hs
diff options
context:
space:
mode:
authoraarne <unknown>2004-09-15 14:36:27 +0000
committeraarne <unknown>2004-09-15 14:36:27 +0000
commita25ee154e760a424ef4aef46a6e3d6fdf1079cf1 (patch)
tree50315c6fe03325fca09e1a922172de111faa7639 /src/GF/Compile/ModDeps.hs
parent7697b222d0b7053e4b955a6ab9ba2ad0d6c9c512 (diff)
introducing multiple inheritance
Diffstat (limited to 'src/GF/Compile/ModDeps.hs')
-rw-r--r--src/GF/Compile/ModDeps.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/GF/Compile/ModDeps.hs b/src/GF/Compile/ModDeps.hs
index c4784e243..60f360746 100644
--- a/src/GF/Compile/ModDeps.hs
+++ b/src/GF/Compile/ModDeps.hs
@@ -65,9 +65,7 @@ moduleDeps ms = mapM deps ms where
t -> chDep (IdentM c t) (extends m) t (opens m) t
chDep it es ety os oty = do
- ests <- case es of
- Just e -> liftM singleton $ lookupModuleType gr e
- _ -> return []
+ ests <- mapM (lookupModuleType gr) es
testErr (all (compatMType ety) ests) "inappropriate extension module type"
osts <- mapM (lookupModuleType gr . openedModule) os
testErr (all (compatOType oty) osts) "inappropriate open module type"
@@ -75,7 +73,7 @@ moduleDeps ms = mapM deps ms where
IdentM _ (MTConcrete a) -> [IdentM a MTAbstract]
_ -> [] ----
return (it, ab ++
- [IdentM e ety | Just e <- [es]] ++
+ [IdentM e ety | e <- es] ++
[IdentM (openedModule o) oty | o <- os])
-- check for superficial compatibility, not submodule relation etc: what can be extended
@@ -114,7 +112,7 @@ 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)
+ return $ extends m ++ map openedModule (opens m)