Added setOptimization function to GF.Infra.Options. I will need to do similar things for other options.

This commit is contained in:
bjorn
2008-05-30 13:56:50 +00:00
parent 3f3188a430
commit 7b52464a92
4 changed files with 43 additions and 17 deletions

View File

@@ -34,6 +34,7 @@ import System.Directory
import System.FilePath
import System.Time
import qualified Data.Map as Map
import qualified Data.Set as Set
import PGF.Check
import PGF.Data
@@ -60,8 +61,8 @@ link opts cnc gr =
optimize :: Options -> PGF -> PGF
optimize opts = cse . suf
where os = moduleFlag optOptimizations opts
cse = if OptCSE `elem` os then cseOptimize else id
suf = if OptStem `elem` os then suffixOptimize else id
cse = if OptCSE `Set.member` os then cseOptimize else id
suf = if OptStem `Set.member` os then suffixOptimize else id
buildParser :: Options -> PGF -> PGF
buildParser opts =