summaryrefslogtreecommitdiff
path: root/src-3.0/GF/Compile/CheckGrammar.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-05-31 14:40:46 +0000
committeraarne <aarne@cs.chalmers.se>2008-05-31 14:40:46 +0000
commit9229c157642c3503d365f42fe5ecac414958ab9b (patch)
tree422dd9f790ddc0d970e6a03783486616d7c4eb14 /src-3.0/GF/Compile/CheckGrammar.hs
parent66c04672013a8d031ffe53012ed7e843bb54b750 (diff)
added positions to Module record; avoided Module constructor where possible; moved Refresh to Compile/
Diffstat (limited to 'src-3.0/GF/Compile/CheckGrammar.hs')
-rw-r--r--src-3.0/GF/Compile/CheckGrammar.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src-3.0/GF/Compile/CheckGrammar.hs b/src-3.0/GF/Compile/CheckGrammar.hs
index f8383ea9f..587c2bf18 100644
--- a/src-3.0/GF/Compile/CheckGrammar.hs
+++ b/src-3.0/GF/Compile/CheckGrammar.hs
@@ -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