diff options
| author | krasimir <krasimir@chalmers.se> | 2010-06-09 11:32:59 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-06-09 11:32:59 +0000 |
| commit | d6f32b3bcd03e7fe806a1b64cd370ba78dc00aa7 (patch) | |
| tree | 12bc89cc43f10e80e95f7b76c52611caa5aa4b40 /src/compiler/GF/Compile.hs | |
| parent | 4e35f7e5ecfebb2503a516c84e4b7d932731a94d (diff) | |
dead code elimination for PGF. Note: the produced grammars will not work well with metavariables and high-order abstract syntax
Diffstat (limited to 'src/compiler/GF/Compile.hs')
| -rw-r--r-- | src/compiler/GF/Compile.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/GF/Compile.hs b/src/compiler/GF/Compile.hs index 1aebeaf31..bf872c138 100644 --- a/src/compiler/GF/Compile.hs +++ b/src/compiler/GF/Compile.hs @@ -41,6 +41,7 @@ import PGF.Check import PGF.CId import PGF.Data import PGF.Macros +import PGF.Optimize -- | Compiles a number of source files and builds a 'PGF' structure for them. @@ -60,7 +61,7 @@ link opts cnc gr = do (True, True) -> ioeIO $ putStrLn "OK" (False,True) -> return () _ -> ioeIO $ putStrLn $ "Corrupted PGF" - return gc + return $ if flag optOptimizePGF opts then optimizePGF gc else gc Bad s -> fail s batchCompile :: Options -> [FilePath] -> IOE SourceGrammar |
