dead code elimination for PGF. Note: the produced grammars will not work well with metavariables and high-order abstract syntax

This commit is contained in:
krasimir
2010-06-09 11:32:59 +00:00
parent 4e35f7e5ec
commit d6f32b3bcd
8 changed files with 229 additions and 61 deletions

View File

@@ -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