1
0
forked from GitHub/gf-core

Merge ModuleOptions and Options.

This commit is contained in:
bjorn
2008-10-15 11:55:18 +00:00
parent 1ecb4f63e9
commit 849642e9dd
6 changed files with 147 additions and 221 deletions

View File

@@ -58,7 +58,7 @@ optimizeModule opts mse@(ms,eenv) mo@(_,mi) = case mi of
return (mo2,eenv)
_ -> evalModule oopts mse mo
where
oopts = opts `addOptions` toOptions (flagsModule mo)
oopts = opts `addOptions` flagsModule mo
optim = flag optOptimizations oopts
evalModule :: Options -> ([(Ident,SourceModInfo)],EEnv) -> (Ident,SourceModInfo) ->

View File

@@ -210,4 +210,4 @@ getOptionsFromFile file = do
s <- ioeIO $ readFileIfStrict file
let ls = filter (BS.isPrefixOf (BS.pack "--#")) $ BS.lines s
fs = map (BS.unpack . BS.unwords . BS.words . BS.drop 3) ls
ioeErr $ liftM toOptions $ parseModuleOptions fs
ioeErr $ parseModuleOptions fs