From 0260265de0cf1e05c88e6475531b589d5302ebaf Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 21 Sep 2007 12:00:31 +0000 Subject: fixed reading argvars from gfc in gf-to-gfcc --- src/GF/Devel/Compile.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/GF/Devel/Compile.hs') 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 -- cgit v1.2.3