From 70ac18e908c5c00390239b2361115f8ab292d49d Mon Sep 17 00:00:00 2001 From: aarne Date: Sun, 26 Feb 2006 11:16:53 +0000 Subject: bug fixed (?) in compilation --- src/GF/Compile/Compile.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/GF/Compile/Compile.hs') 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 -- cgit v1.2.3