diff options
| author | aarne <unknown> | 2004-06-24 14:06:09 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2004-06-24 14:06:09 +0000 |
| commit | 3b39607bbac8e6ab99198ab608f14e1f84c2f60e (patch) | |
| tree | 35b823c38ef0ed7439f1a057d939fbdfa96bc719 /src/GF/Compile/ShellState.hs | |
| parent | d3db78ad31fe8b27c7ebb4e05b92d4c3986cb119 (diff) | |
last-minute bug fixes
Diffstat (limited to 'src/GF/Compile/ShellState.hs')
| -rw-r--r-- | src/GF/Compile/ShellState.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GF/Compile/ShellState.hs b/src/GF/Compile/ShellState.hs index a306902d9..18b237745 100644 --- a/src/GF/Compile/ShellState.hs +++ b/src/GF/Compile/ShellState.hs @@ -313,12 +313,16 @@ firstGrammarST = stateGrammarST . firstStateGrammar firstAbstractST = abstractOf . firstGrammarST firstConcreteST = concreteOf . firstGrammarST -} --- command-line option -language=foo overrides the actual grammar in state +-- command-line option -lang=foo overrides the actual grammar in state grammarOfOptState :: Options -> ShellState -> StateGrammar grammarOfOptState opts st = maybe (firstStateGrammar st) (stateGrammarOfLang st . language) $ getOptVal opts useLanguage +languageOfOptState :: Options -> ShellState -> Maybe Language +languageOfOptState opts st = + maybe (concrete st) (return . language) $ getOptVal opts useLanguage + -- command-line option -cat=foo overrides the possible start cat of a grammar firstCatOpts :: Options -> StateGrammar -> CFCat firstCatOpts opts sgr = |
