From ba10b5b0ca0c906b1b5c94f64b37b5a34f200f71 Mon Sep 17 00:00:00 2001 From: hallgren Date: Tue, 30 Aug 2011 18:54:50 +0000 Subject: GF.Infra.Modules: keep the modules of a grammar in a finite map instead of a list This speeds up the compilation of PhrasebookFin.pgf by 12%, mosly by speeding up calls to lookupModule in calls from lookupParamValues, in calls from allParamValues. The invariant "modules are stored in dependency order" is no longer respected! But the type MGrammar is now abstract, making it easier to maintain this or other invariants in the future. --- src/compiler/GF/Compile/SubExOpt.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/GF/Compile/SubExOpt.hs') diff --git a/src/compiler/GF/Compile/SubExOpt.hs b/src/compiler/GF/Compile/SubExOpt.hs index 42824845e..49d7efb81 100644 --- a/src/compiler/GF/Compile/SubExOpt.hs +++ b/src/compiler/GF/Compile/SubExOpt.hs @@ -61,7 +61,7 @@ unsubexpModule sm@(i,mo) Q (m,c) | isOperIdent c -> --- name convention of subexp opers errVal t $ liftM unparTerm $ lookupResDef gr (m,c) _ -> C.composSafeOp unparTerm t - gr = M.MGrammar [sm] + gr = M.mGrammar [sm] rebuild = buildTree . concat -- implementation -- cgit v1.2.3