summaryrefslogtreecommitdiff
path: root/src/GF/Compile/Compile.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-02-26 11:16:53 +0000
committeraarne <aarne@cs.chalmers.se>2006-02-26 11:16:53 +0000
commit70ac18e908c5c00390239b2361115f8ab292d49d (patch)
treecda9b2852176f14ccf0a224da2ece7ee9e650965 /src/GF/Compile/Compile.hs
parent38a2d080f99750e82018d00393cf29e4eaa380cc (diff)
bug fixed (?) in compilation
Diffstat (limited to 'src/GF/Compile/Compile.hs')
-rw-r--r--src/GF/Compile/Compile.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GF/Compile/Compile.hs b/src/GF/Compile/Compile.hs
index 8655e0ae7..0dba7a9ec 100644
--- a/src/GF/Compile/Compile.hs
+++ b/src/GF/Compile/Compile.hs
@@ -39,6 +39,7 @@ import GF.Compile.Optimize
import GF.Compile.GrammarToCanon
import GF.Canon.Share
import GF.Canon.Subexpressions (elimSubtermsMod,unSubelimModule)
+import GF.UseGrammar.Linear (unoptimizeCanonMod) ----
import qualified GF.Canon.CanonToGrammar as CG
@@ -165,7 +166,7 @@ extendCompileEnvCanon ((k,s,c),fts) cgr ft =
type TimedCompileEnv = (CompileEnv,[(FilePath,ModTime)])
compileOne :: Options -> TimedCompileEnv -> FullPath -> IOE TimedCompileEnv
-compileOne opts env@((_,srcgr,_),_) file = do
+compileOne opts env@((_,srcgr,cancgr0),_) file = do
let putp = putPointE opts
let putpp = putPointEsil opts
@@ -189,7 +190,8 @@ compileOne opts env@((_,srcgr,_),_) file = do
-- for canonical gf, read the file and update environment, also source env
"gfc" -> do
cm <- putp ("+ reading" +++ file) $ getCanonModule file
- sm <- ioeErr $ CG.canon2sourceModule $ unSubelimModule cm
+ let cancgr = updateMGrammar (MGrammar [cm]) cancgr0
+ sm <- ioeErr $ CG.canon2sourceModule $ unoptimizeCanonMod cancgr $ unSubelimModule cm
ft <- getReadTimes file
extendCompileEnv env (sm, cm) ft