summaryrefslogtreecommitdiff
path: root/src/GF/Compile/Extend.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Compile/Extend.hs')
-rw-r--r--src/GF/Compile/Extend.hs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/GF/Compile/Extend.hs b/src/GF/Compile/Extend.hs
index 8344a1696..4cf2101de 100644
--- a/src/GF/Compile/Extend.hs
+++ b/src/GF/Compile/Extend.hs
@@ -29,20 +29,17 @@ import GF.Data.Operations
import Control.Monad
extendModule :: [SourceModule] -> SourceModule -> Err SourceModule
-extendModule ms (name,mod) = case mod of
-
+extendModule ms (name,m)
---- Just to allow inheritance in incomplete concrete (which are not
---- compiled anyway), extensions are not built for them.
---- Should be replaced by real control. AR 4/2/2005
- ModMod m | mstatus m == MSIncomplete && isModCnc m -> return (name,mod)
-
- ModMod m -> do
- mod' <- foldM extOne m (extend m)
- return (name,ModMod mod')
+ | mstatus m == MSIncomplete && isModCnc m = return (name,m)
+ | otherwise = do m' <- foldM extOne m (extend m)
+ return (name,m')
where
extOne mo (n,cond) = do
(m0,isCompl) <- do
- m <- lookupModMod (MGrammar ms) n
+ m <- lookupModule (MGrammar ms) n
-- test that the module types match, and find out if the old is complete
testErr (sameMType (mtype m) (mtype mo))