From 260c0dfedcd7e50368bcbd651f4c71d425af244a Mon Sep 17 00:00:00 2001 From: hallgren Date: Thu, 21 Nov 2013 16:27:26 +0000 Subject: Some refactoring in GF.Compile and GF.Compile.GetGrammar Move source transcoding function GF.Compile to GF.Compile.GetGrammar, in preparation for doing transcoding before lexing. --- src/compiler/GF/Compile.hs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/compiler/GF/Compile.hs') diff --git a/src/compiler/GF/Compile.hs b/src/compiler/GF/Compile.hs index 92c2ac415..0e29192c6 100644 --- a/src/compiler/GF/Compile.hs +++ b/src/compiler/GF/Compile.hs @@ -13,7 +13,6 @@ import GF.Compile.GrammarToPGF import GF.Compile.ReadFiles import GF.Compile.Update --import GF.Compile.Refresh -import GF.Compile.Coding import GF.Compile.Tags import GF.Grammar.Grammar @@ -27,7 +26,6 @@ import GF.Infra.CheckM import GF.Data.Operations import Control.Monad -import System.IO import GF.System.Directory import System.FilePath import qualified Data.Map as Map @@ -164,11 +162,8 @@ compileOne opts env@(_,srcgr,_) file = do then compileOne opts env $ (gf2gfo opts file) else do - sm00 <- putpOpt ("- parsing" +++ file) ("- compiling" +++ file ++ "... ") $ - getSourceModule opts file - enc <- liftIO $ mkTextEncoding (renameEncoding (flag optEncoding (mflags (snd sm00)))) - let sm = decodeStringsInModule enc sm00 - + sm <- putpOpt ("- parsing" +++ file) ("- compiling" +++ file ++ "... ") + $ getSourceModule opts file intermOut opts (Dump Source) (ppModule Internal sm) compileSourceModule opts env (Just file) sm -- cgit v1.2.3