diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2011-11-02 13:57:11 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2011-11-02 13:57:11 +0000 |
| commit | 734c66710e9bffa986c094e8c584295b33cd2f63 (patch) | |
| tree | 73fb499ba17a3d6d8986784f4a17ad03420204e4 /src/compiler/GF/Compile/CheckGrammar.hs | |
| parent | 5fe49ed9f7ac7089301e867e55bfedefcba230dd (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/CheckGrammar.hs')
| -rw-r--r-- | src/compiler/GF/Compile/CheckGrammar.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/compiler/GF/Compile/CheckGrammar.hs b/src/compiler/GF/Compile/CheckGrammar.hs index 44e2e552b..2b82bc781 100644 --- a/src/compiler/GF/Compile/CheckGrammar.hs +++ b/src/compiler/GF/Compile/CheckGrammar.hs @@ -23,7 +23,6 @@ module GF.Compile.CheckGrammar(checkModule) where import GF.Infra.Ident -import GF.Infra.Modules import GF.Compile.TypeCheck.Abstract import GF.Compile.TypeCheck.Concrete @@ -56,13 +55,13 @@ checkModule ms m@(name,mo) = checkIn (text "checking module" <+> ppIdent name) $ where updateCheckInfo (name,mo) (i,info) = do info <- checkInfo ms (name,mo) i info - return (name,updateModule mo i info) + return (name,mo{jments=updateTree (i,info) (jments mo)}) -- check if restricted inheritance modules are still coherent -- i.e. that the defs of remaining names don't depend on omitted names checkRestrictedInheritance :: [SourceModule] -> SourceModule -> Check () checkRestrictedInheritance mos (name,mo) = do - let irs = [ii | ii@(_,mi) <- extend mo, mi /= MIAll] -- names with restr. inh. + let irs = [ii | ii@(_,mi) <- mextend mo, mi /= MIAll] -- names with restr. inh. let mrs = [((i,m),mi) | (i,m) <- mos, Just mi <- [lookup i irs]] -- the restr. modules themself, with restr. infos mapM_ checkRem mrs @@ -90,7 +89,7 @@ checkCompleteGrammar gr (am,abs) (cm,cnc) = do -- check that all abstract constants are in concrete; build default lin and lincats jsc <- foldM checkAbs jsc (tree2list jsa) - return (cm,replaceJudgements cnc jsc) + return (cm,cnc{jments=jsc}) where checkAbs js i@(c,info) = case info of |
