summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/Refresh.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2011-08-30 18:54:50 +0000
committerhallgren <hallgren@chalmers.se>2011-08-30 18:54:50 +0000
commitba10b5b0ca0c906b1b5c94f64b37b5a34f200f71 (patch)
tree360302c1d8eb917dd650a9df405b3cca504459ab /src/compiler/GF/Compile/Refresh.hs
parent2001788b0242a0c945655c503262ccf104bcc3bd (diff)
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.
Diffstat (limited to 'src/compiler/GF/Compile/Refresh.hs')
-rw-r--r--src/compiler/GF/Compile/Refresh.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/GF/Compile/Refresh.hs b/src/compiler/GF/Compile/Refresh.hs
index 159c26a38..3780db2cf 100644
--- a/src/compiler/GF/Compile/Refresh.hs
+++ b/src/compiler/GF/Compile/Refresh.hs
@@ -108,7 +108,7 @@ refreshEquation pst = err Bad (return . fst) (appSTM (refr pst) initIdState) whe
-- for concrete and resource in grammar, before optimizing
refreshGrammar :: SourceGrammar -> Err SourceGrammar
-refreshGrammar = liftM (MGrammar . snd) . foldM refreshModule (0,[]) . modules
+refreshGrammar = liftM (mGrammar . snd) . foldM refreshModule (0,[]) . modules
refreshModule :: (Int,[SourceModule]) -> SourceModule -> Err (Int,[SourceModule])
refreshModule (k,ms) mi@(i,mo)