diff options
| author | krasimir <krasimir@chalmers.se> | 2008-06-08 10:35:19 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2008-06-08 10:35:19 +0000 |
| commit | aa5cff205de270ef98d8848816cdf66ba8a4deee (patch) | |
| tree | e99b1e31a0df9de92647f9519e33d794b1b5051f /src-3.0/GF/Command | |
| parent | ec200fdf0b021d109edbf7f077d93e44156a31a3 (diff) | |
force the interpreter to flush the output. usefull for the testsuite
Diffstat (limited to 'src-3.0/GF/Command')
| -rw-r--r-- | src-3.0/GF/Command/Interpreter.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src-3.0/GF/Command/Interpreter.hs b/src-3.0/GF/Command/Interpreter.hs index f39960ae9..6bac6eca0 100644 --- a/src-3.0/GF/Command/Interpreter.hs +++ b/src-3.0/GF/Command/Interpreter.hs @@ -11,6 +11,7 @@ import PGF import PGF.Data import PGF.Macros import GF.System.Signal +import GF.Infra.UseIO import GF.Data.ErrM ---- @@ -30,13 +31,13 @@ interpretCommandLine env line = Just [] -> return () Just pipes -> do res <- runInterruptibly (mapM_ interPipe pipes) case res of - Left ex -> print ex + Left ex -> putStrLnFlush (show ex) Right x -> return x - Nothing -> putStrLn "command not parsed" + Nothing -> putStrLnFlush "command not parsed" where interPipe cs = do (_,s) <- intercs ([],"") cs - putStrLn s + putStrLnFlush s intercs treess [] = return treess intercs (trees,_) (c:cs) = do treess2 <- interc trees c |
