summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/Update.hs
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2011-11-02 13:57:11 +0000
committerkr.angelov <kr.angelov@gmail.com>2011-11-02 13:57:11 +0000
commit734c66710e9bffa986c094e8c584295b33cd2f63 (patch)
tree73fb499ba17a3d6d8986784f4a17ad03420204e4 /src/compiler/GF/Compile/Update.hs
parent5fe49ed9f7ac7089301e867e55bfedefcba230dd (diff)
merge GF.Infra.Modules and GF.Grammar.Grammar. This is a preparation for the separate PGF building
Diffstat (limited to 'src/compiler/GF/Compile/Update.hs')
-rw-r--r--src/compiler/GF/Compile/Update.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/compiler/GF/Compile/Update.hs b/src/compiler/GF/Compile/Update.hs
index fe9bd5984..2a95df4d5 100644
--- a/src/compiler/GF/Compile/Update.hs
+++ b/src/compiler/GF/Compile/Update.hs
@@ -18,7 +18,6 @@ import GF.Infra.Ident
import GF.Grammar.Grammar
import GF.Grammar.Printer
import GF.Grammar.Lookup
-import GF.Infra.Modules
import GF.Infra.Option
import GF.Data.Operations
@@ -50,7 +49,7 @@ extendModule gr (name,m)
---- compiled anyway), extensions are not built for them.
---- Should be replaced by real control. AR 4/2/2005
| mstatus m == MSIncomplete && isModCnc m = return (name,m)
- | otherwise = do m' <- foldM extOne m (extend m)
+ | otherwise = do m' <- foldM extOne m (mextend m)
return (name,m')
where
extOne mo (n,cond) = do
@@ -69,7 +68,7 @@ extendModule gr (name,m)
return $
if isCompl
then mo {jments = js1}
- else mo {extend = filter ((/=n) . fst) (extend mo)
+ else mo {mextend= filter ((/=n) . fst) (mextend mo)
,mexdeps= nub (n : mexdeps mo)
,jments = js1
}
@@ -95,12 +94,12 @@ rebuildModule gr mo@(i,mi@(ModInfo mt stat fs_ me mw ops_ med_ src_ js_)) = do
js' <- extendMod gr False ((i0,m1), isInherited mincl) i (jments mi)
--- to avoid double inclusions, in instance I of I0 = J0 ** ...
case extends mi of
- [] -> return $ replaceJudgements mi js'
+ [] -> return mi{jments=js'}
j0s -> do
m0s <- mapM (lookupModule gr) j0s
let notInM0 c _ = all (not . isInBinTree c . jments) m0s
let js2 = filterBinTree notInM0 js'
- return $ replaceJudgements mi js2
+ return mi{jments=js2}
_ -> return mi
-- add the instance opens to an incomplete module "with" instances