summaryrefslogtreecommitdiff
path: root/src/GF/Devel/Compile.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-09-21 12:00:31 +0000
committeraarne <aarne@cs.chalmers.se>2007-09-21 12:00:31 +0000
commit0260265de0cf1e05c88e6475531b589d5302ebaf (patch)
treefeccef4ca57a277a9aa2cefbea5c514732cbdb3d /src/GF/Devel/Compile.hs
parent73ef8309abfb721c89171d8c2b9a122ec94b63f6 (diff)
fixed reading argvars from gfc in gf-to-gfcc
Diffstat (limited to 'src/GF/Devel/Compile.hs')
-rw-r--r--src/GF/Devel/Compile.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/GF/Devel/Compile.hs b/src/GF/Devel/Compile.hs
index 916cb961e..a89ed4624 100644
--- a/src/GF/Devel/Compile.hs
+++ b/src/GF/Devel/Compile.hs
@@ -29,9 +29,9 @@ import GF.Devel.Arch
import Control.Monad
import System.Directory
-batchCompile :: [FilePath] -> IO SourceGrammar
-batchCompile files = do
- let defOpts = options [emitCode]
+batchCompile :: Options -> [FilePath] -> IO SourceGrammar
+batchCompile opts files = do
+ let defOpts = addOptions opts (options [emitCode])
Ok (_,gr) <- appIOE $ foldM (compileModule defOpts) emptyCompileEnv files
return gr
@@ -79,12 +79,12 @@ compileEnvShSt env@(_,sgr) fs = (0,sgr2) where
compileOne :: Options -> CompileEnv -> FullPath -> IOE CompileEnv
compileOne opts env@(_,srcgr) file = do
- let putp s = putPointE opts (s ++ "\n")
+ let putp s = putPointE opts ("\n" ++ s)
let putpp = putPointEsil opts
let putpOpt v m act
| oElem beVerbose opts = putp v act
| oElem beSilent opts = putpp v act
- | otherwise = ioeIO (putStrFlush m) >> act
+ | otherwise = ioeIO (putStrFlush ("\n" ++ m)) >> act
let gf = fileSuffix file
let path = justInitPath file