diff options
| author | hallgren <hallgren@chalmers.se> | 2011-08-30 18:54:50 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2011-08-30 18:54:50 +0000 |
| commit | ba10b5b0ca0c906b1b5c94f64b37b5a34f200f71 (patch) | |
| tree | 360302c1d8eb917dd650a9df405b3cca504459ab /src/compiler/GF/Grammar/Grammar.hs | |
| parent | 2001788b0242a0c945655c503262ccf104bcc3bd (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/Grammar/Grammar.hs')
| -rw-r--r-- | src/compiler/GF/Grammar/Grammar.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Grammar/Grammar.hs b/src/compiler/GF/Grammar/Grammar.hs index f99ed0414..e29bc331a 100644 --- a/src/compiler/GF/Grammar/Grammar.hs +++ b/src/compiler/GF/Grammar/Grammar.hs @@ -15,7 +15,7 @@ ----------------------------------------------------------------------------- module GF.Grammar.Grammar (SourceGrammar, - emptySourceGrammar, + emptySourceGrammar,mGrammar, SourceModInfo, SourceModule, mapSourceModule, @@ -56,7 +56,7 @@ import qualified Data.ByteString.Char8 as BS -- | grammar as presented to the compiler type SourceGrammar = MGrammar Info -emptySourceGrammar = MGrammar [] +emptySourceGrammar = mGrammar [] type SourceModInfo = ModInfo Info |
