summaryrefslogtreecommitdiff
path: root/src/GF/Compile.hs
diff options
context:
space:
mode:
authorbjorn <bjorn@bringert.net>2008-10-15 14:24:23 +0000
committerbjorn <bjorn@bringert.net>2008-10-15 14:24:23 +0000
commit7676ab8e0072263ee52415614eaf94e50bce0995 (patch)
treedeeb7c0122dd65e1200b5a6129f6895190d23688 /src/GF/Compile.hs
parent849642e9dd638082bb7b1d7b704200e01429233d (diff)
Copy command-line options to module flags when compiling to .gfo.
Diffstat (limited to 'src/GF/Compile.hs')
-rw-r--r--src/GF/Compile.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GF/Compile.hs b/src/GF/Compile.hs
index 226602616..7aeab6b08 100644
--- a/src/GF/Compile.hs
+++ b/src/GF/Compile.hs
@@ -158,8 +158,9 @@ compileOne opts env@(_,srcgr,_) file = do
then compileOne opts env $ gfo
else do
- sm00 <- putpOpt ("- parsing" +++ file) ("- compiling" +++ file ++ "... ") $
+ sm000 <- putpOpt ("- parsing" +++ file) ("- compiling" +++ file ++ "... ") $
getSourceModule opts file
+ let sm00 = mapSourceModule (\m -> m { flags = flags m `addOptions` opts }) sm000
let sm0 = decodeStringsInModule sm00
(k',sm) <- compileSourceModule opts env sm0
let sm1 = if isConcr sm then shareModule sm else sm -- cannot expand Str
@@ -171,7 +172,6 @@ compileOne opts env@(_,srcgr,_) file = do
ModMod m -> isModCnc m && mstatus m /= MSIncomplete
_ -> False
-
compileSourceModule :: Options -> CompileEnv ->
SourceModule -> IOE (Int,SourceModule)
compileSourceModule opts env@(k,gr,_) mo@(i,mi) = do