summaryrefslogtreecommitdiff
path: root/src/GF.hs
diff options
context:
space:
mode:
authoraarne <unknown>2004-06-23 11:57:17 +0000
committeraarne <unknown>2004-06-23 11:57:17 +0000
commit6802bcca2c9a1e7d3e079b308844ec6422a2af48 (patch)
tree4b626417987837f7a9a7a3fca5c2cfb8b9854e8a /src/GF.hs
parent0c84670725da286a1fdaffcd49b2dbad7160cf03 (diff)
some fixes for Shae
Diffstat (limited to 'src/GF.hs')
-rw-r--r--src/GF.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/GF.hs b/src/GF.hs
index 5eafefe8d..78aedadcc 100644
--- a/src/GF.hs
+++ b/src/GF.hs
@@ -25,6 +25,7 @@ main = do
xs <- getArgs
let (os,fs) = getOptions "-" xs
opt j = oElem j os
+ st0 = optInitShellState os
case 0 of
_ | opt getHelp -> do
@@ -32,8 +33,8 @@ main = do
_ | opt forJava -> do
putStrLnFlush $ encodeUTF8 welcomeMsg
- st <- useIOE emptyShellState $
- foldM (shellStateFromFiles os) emptyShellState fs
+ st <- useIOE st0 $
+ foldM (shellStateFromFiles os) st0 fs
sessionLineJ True st
return ()
@@ -44,15 +45,15 @@ main = do
_ | opt doBatch -> do
if opt beSilent then return () else putStrLnFlush "<gfbatch>"
- st <- useIOE emptyShellState $
- foldM (shellStateFromFiles os) emptyShellState fs
+ st <- useIOE st0 $
+ foldM (shellStateFromFiles os) st0 fs
gfBatch (initHState st)
if opt beSilent then return () else putStrLnFlush "</gfbatch>"
return ()
_ -> do
putStrLnFlush $ welcomeMsg
- st <- useIOE emptyShellState $
- foldM (shellStateFromFiles os) emptyShellState fs
+ st <- useIOE st0 $
+ foldM (shellStateFromFiles os) st0 fs
if null fs then return () else putCPU
gfInteract (initHState st)
return ()