summaryrefslogtreecommitdiff
path: root/src/GF/Compile.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-09-05 14:04:39 +0000
committerkrasimir <krasimir@chalmers.se>2009-09-05 14:04:39 +0000
commit95a577d2699128174a3cbed982b358a8730518d9 (patch)
treea56a3a1990cc038ad5c96222f1afc2469c90ccbb /src/GF/Compile.hs
parent785ef9224bfe8eb07d599445126278128ec3fcb6 (diff)
simple profiler for PMCFG
Diffstat (limited to 'src/GF/Compile.hs')
-rw-r--r--src/GF/Compile.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GF/Compile.hs b/src/GF/Compile.hs
index c66c2f86a..c23cfe655 100644
--- a/src/GF/Compile.hs
+++ b/src/GF/Compile.hs
@@ -68,7 +68,7 @@ link opts cnc gr = do
_ -> ioeIO $ putStrLn $ "Corrupted PGF"
return gc
Bad s -> fail s
- return $ buildParser opts $ optimize opts gc1
+ ioeIO $ buildParser opts $ optimize opts gc1
optimize :: Options -> PGF -> PGF
optimize opts = cse . suf
@@ -76,12 +76,12 @@ optimize opts = cse . suf
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 :: Options -> PGF -> IO PGF
buildParser opts =
case flag optBuildParser opts of
BuildParser -> addParsers opts
- DontBuildParser -> id
- BuildParserOnDemand -> mapConcretes (\cnc -> cnc { cflags = Map.insert (mkCId "parser") "ondemand" (cflags cnc) })
+ DontBuildParser -> return
+ BuildParserOnDemand -> return . mapConcretes (\cnc -> cnc { cflags = Map.insert (mkCId "parser") "ondemand" (cflags cnc) })
batchCompile :: Options -> [FilePath] -> IOE SourceGrammar
batchCompile opts files = do