diff options
| author | hallgren <hallgren@chalmers.se> | 2014-01-09 17:30:24 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-01-09 17:30:24 +0000 |
| commit | ed3d30e3d1134dfd06ae2a88b51767041eda6c0b (patch) | |
| tree | 99931497cd2c5316ae42e0acca22d31ce4293ad8 /src/compiler/GF/Command | |
| parent | 768d9de6681b5ac69b42128fbde18c8421cb5f1e (diff) | |
Check file datestamp before creating PGF file when compiling grammars
When running a command like
gf -make L_1.gf ... L_n.gf
gf now avoids recreating the target PGF file if it already exists and is
up-to-date.
gf still reads all required .gfo files, so significant additional speed
improvements are still possible. This could be done by reading .gfo files
more lazily...
Diffstat (limited to 'src/compiler/GF/Command')
| -rw-r--r-- | src/compiler/GF/Command/Importing.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Command/Importing.hs b/src/compiler/GF/Command/Importing.hs index 4697e8b64..2bdc091f8 100644 --- a/src/compiler/GF/Command/Importing.hs +++ b/src/compiler/GF/Command/Importing.hs @@ -46,7 +46,7 @@ importSource :: SourceGrammar -> Options -> [FilePath] -> IO SourceGrammar importSource src0 opts files = do src <- appIOE $ batchCompile opts files case src of - Ok gr -> return gr + Ok (_,_,gr) -> return gr Bad msg -> do putStrLn msg return src0 @@ -58,7 +58,7 @@ importCF opts files get = do Ok gf -> return gf Bad s -> error s ---- Ok gr <- appIOE $ compileSourceGrammar opts gf - epgf <- appIOE $ link opts (identS (justModuleName (last files) ++ "Abs")) gr + epgf <- appIOE $ link opts (identS (justModuleName (last files) ++ "Abs"), (), gr) case epgf of Ok pgf -> return pgf Bad s -> error s ---- |
