From d95ca4a103c9023aa104b25acdc9c21418de6a14 Mon Sep 17 00:00:00 2001 From: krasimir Date: Mon, 19 Jan 2009 13:23:03 +0000 Subject: refactor the GF.Grammar.Grammar syntax. The obsolete constructions are removed --- src/GF/Compile/Extend.hs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/GF/Compile/Extend.hs') 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)) -- cgit v1.2.3