diff options
| author | krasimir <krasimir@chalmers.se> | 2009-01-19 13:23:03 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-01-19 13:23:03 +0000 |
| commit | d95ca4a103c9023aa104b25acdc9c21418de6a14 (patch) | |
| tree | 7cff6e45e2dc1ba08deb503589e21770c7f239b3 /src/GF/Compile/Extend.hs | |
| parent | fa7ab84471652c40079e4f77d242208376c4b668 (diff) | |
refactor the GF.Grammar.Grammar syntax. The obsolete constructions are removed
Diffstat (limited to 'src/GF/Compile/Extend.hs')
| -rw-r--r-- | src/GF/Compile/Extend.hs | 13 |
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)) |
