1
0
forked from GitHub/gf-core

added positions to Module record; avoided Module constructor where possible; moved Refresh to Compile/

This commit is contained in:
aarne
2008-05-31 14:40:46 +00:00
parent c8898f51bf
commit 96721de3e3
16 changed files with 71 additions and 64 deletions

View File

@@ -29,7 +29,7 @@ import GF.Infra.Modules
import GF.Compile.TypeCheck
import GF.Grammar.Refresh
import GF.Compile.Refresh
import GF.Grammar.Grammar
import GF.Grammar.PrGrammar
import GF.Grammar.Lookup
@@ -65,9 +65,10 @@ mapsCheckTree f = checkErr . mapsErrTree (\t -> checkStart (f t) >>= return . fs
checkModule :: [SourceModule] -> SourceModule -> Check [SourceModule]
checkModule ms (name,mod) = checkIn ("checking module" +++ prt name) $ case mod of
ModMod mo@(Module mt st fs me ops js) -> do
ModMod mo -> do
let js = jments mo
checkRestrictedInheritance ms (name, mo)
js' <- case mt of
js' <- case mtype mo of
MTAbstract -> mapsCheckTree (checkAbsInfo gr name) js
MTTransfer a b -> mapsCheckTree (checkAbsInfo gr name) js
@@ -87,7 +88,7 @@ checkModule ms (name,mod) = checkIn ("checking module" +++ prt name) $ case mod
-- checkCompleteInstance abs mo -- this is done in Rebuild
mapsCheckTree (checkResInfo gr name) js
return $ (name, ModMod (Module mt st fs me ops js')) : ms
return $ (name, ModMod (replaceJudgements mo js')) : ms
_ -> return $ (name,mod) : ms
where