From 734c66710e9bffa986c094e8c584295b33cd2f63 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Wed, 2 Nov 2011 13:57:11 +0000 Subject: merge GF.Infra.Modules and GF.Grammar.Grammar. This is a preparation for the separate PGF building --- src/compiler/GF/Compile/CheckGrammar.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/compiler/GF/Compile/CheckGrammar.hs') 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 -- cgit v1.2.3