mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-06 09:42:50 -06:00
Copy command-line options to module flags when compiling to .gfo.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user