From 6802bcca2c9a1e7d3e079b308844ec6422a2af48 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 23 Jun 2004 11:57:17 +0000 Subject: some fixes for Shae --- src/GF.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/GF.hs') 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 "" - 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 "" 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 () -- cgit v1.2.3