From 9229c157642c3503d365f42fe5ecac414958ab9b Mon Sep 17 00:00:00 2001 From: aarne Date: Sat, 31 May 2008 14:40:46 +0000 Subject: added positions to Module record; avoided Module constructor where possible; moved Refresh to Compile/ --- src-3.0/GF/Compile/GrammarToGFCC.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src-3.0/GF/Compile/GrammarToGFCC.hs') diff --git a/src-3.0/GF/Compile/GrammarToGFCC.hs b/src-3.0/GF/Compile/GrammarToGFCC.hs index bf87d42fe..637f40ed8 100644 --- a/src-3.0/GF/Compile/GrammarToGFCC.hs +++ b/src-3.0/GF/Compile/GrammarToGFCC.hs @@ -218,11 +218,12 @@ mkParamLincat sgr lang cat = errVal (C.R [C.S []]) $ do reorder :: Ident -> SourceGrammar -> SourceGrammar reorder abs cg = M.MGrammar $ (abs, M.ModMod $ - M.Module M.MTAbstract M.MSComplete aflags [] [] adefs): + M.Module M.MTAbstract M.MSComplete aflags [] [] adefs poss): [(c, M.ModMod $ - M.Module (M.MTConcrete abs) M.MSComplete fs [] [] (sorted2tree js)) + M.Module (M.MTConcrete abs) M.MSComplete fs [] [] (sorted2tree js) poss) | (c,(fs,js)) <- cncs] where + poss = emptyBinTree -- positions no longer needed mos = M.allModMod cg adefs = sorted2tree $ sortIds $ predefADefs ++ Look.allOrigInfos cg abs @@ -268,8 +269,8 @@ canon2canon abs = js2js ms = map (c2c (j2j (M.MGrammar ms))) ms c2c f2 (c,m) = case m of - M.ModMod mo@(M.Module _ _ _ _ _ js) -> - (c, M.ModMod $ M.replaceJudgements mo $ mapTree f2 js) + M.ModMod mo -> + (c, M.ModMod $ M.replaceJudgements mo $ mapTree f2 (M.jments mo)) _ -> (c,m) j2j cg (f,j) = case j of CncFun x (Yes tr) z -> (f,CncFun x (Yes (trace ("+ " ++ prt f) (t2t tr))) z) -- cgit v1.2.3