summaryrefslogtreecommitdiff
path: root/src/GF/Compile
diff options
context:
space:
mode:
authoraarne <unknown>2003-11-10 10:02:26 +0000
committeraarne <unknown>2003-11-10 10:02:26 +0000
commit9eb32352c460f184f73fc13b8d92a0a77d7f5155 (patch)
treee6ca352fc86cbe51c71db74c16d1427e696544b3 /src/GF/Compile
parent86662714a00f2ac08e6129c8bdac235f3e1efb2e (diff)
Fixed local flags.
Diffstat (limited to 'src/GF/Compile')
-rw-r--r--src/GF/Compile/ShellState.hs20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/GF/Compile/ShellState.hs b/src/GF/Compile/ShellState.hs
index 4d0c8b260..1f3078c48 100644
--- a/src/GF/Compile/ShellState.hs
+++ b/src/GF/Compile/ShellState.hs
@@ -87,7 +87,7 @@ emptyStateGrammar = StGr {
stateGrammarST = grammar
stateCF = cf
stateMorpho = morpho
-stateOptions = loptions ----
+stateOptions = loptions
cncModuleIdST = stateGrammarST
@@ -134,7 +134,7 @@ updateShellState opts sh (gr,(sgr,rts)) = do
srcModules = src,
cfs = zip concrs cfs,
morphos = zip concrs (map (mkMorpho cgr) concrs),
- gloptions = options (M.allFlags src), ---- canModules
+ gloptions = opts,
readFiles = [ft | ft@(f,_) <- readFiles sh, notInrts f] ++ rts,
absCats = csi,
statistics = [StDepTypes deps,StBoundVars binds]
@@ -193,13 +193,17 @@ allConcretes gr a = [i | (i,M.ModMod m) <- M.modules gr, M.mtype m== M.MTConcret
stateGrammarOfLang :: ShellState -> Language -> StateGrammar
stateGrammarOfLang st l = StGr {
- absId = maybe (identC "Abs") id (abstract st), ---
- cncId = l,
- grammar = canModules st, ---- only those needed for l
- cf = maybe emptyCF id (lookup l (cfs st)),
- morpho = maybe emptyMorpho id (lookup l (morphos st)),
- loptions = gloptions st ---- only the own ones!
+ absId = maybe (identC "Abs") id (abstract st), ---
+ cncId = l,
+ grammar = can,
+ cf = maybe emptyCF id (lookup l (cfs st)),
+ morpho = maybe emptyMorpho id (lookup l (morphos st)),
+ loptions = errVal noOptions $ lookupOptionsCan can
}
+ where
+ allCan = canModules st
+ can = M.partOfGrammar allCan
+ (l, maybe M.emptyModInfo id (lookup l (M.modules allCan)))
grammarOfLang st = stateGrammarST . stateGrammarOfLang st
cfOfLang st = stateCF . stateGrammarOfLang st