summaryrefslogtreecommitdiff
path: root/src/GF/API/IOGrammar.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-03-04 15:24:03 +0000
committeraarne <aarne@cs.chalmers.se>2006-03-04 15:24:03 +0000
commit84e01c303dc161c3a811a045cc0c45f3f13e33d6 (patch)
treebe720bec157ded463f5984c510f0d08cf8e80cda /src/GF/API/IOGrammar.hs
parent3589e352cc49c99e9335a97a476fd827b382db2f (diff)
proper place of -treebank option
Diffstat (limited to 'src/GF/API/IOGrammar.hs')
-rw-r--r--src/GF/API/IOGrammar.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/GF/API/IOGrammar.hs b/src/GF/API/IOGrammar.hs
index cb84d9bf7..335757cf4 100644
--- a/src/GF/API/IOGrammar.hs
+++ b/src/GF/API/IOGrammar.hs
@@ -23,6 +23,7 @@ import GF.Compile.Compile
import GF.Compile.ShellState
import GF.Compile.NoParse
import GF.Probabilistic.Probabilistic
+import GF.UseGrammar.Treebank
import GF.Infra.Modules
import GF.Infra.ReadFiles (isOldFile)
@@ -68,6 +69,9 @@ shellStateFromFiles opts st file = do
let osb = addOptions (options []) opts
grts <- compileModule osb st file
ioeErr $ updateShellState opts ign Nothing st grts
+ s | oElem (iOpt "treebank") opts -> do
+ tbs <- ioeIO $ readUniTreebanks file
+ return $ addTreebanks tbs st
_ -> do
b <- ioeIO $ isOldFile file
let opts' = if b then (addOption showOld opts) else opts