summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile.hs
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2011-11-15 19:12:22 +0000
committerkr.angelov <kr.angelov@gmail.com>2011-11-15 19:12:22 +0000
commita2626e24dd9e468ee0c5ccd455e4a5f782d56522 (patch)
treec222b77a1b7ccba40b3bd244ae00f1945eb3a3c8 /src/compiler/GF/Compile.hs
parent8a10aa5cf969caf482a7e852562caad815d74672 (diff)
now we store version number in every .gfo file. If the file is compiled with different compiler then we simply recompile it.
Diffstat (limited to 'src/compiler/GF/Compile.hs')
-rw-r--r--src/compiler/GF/Compile.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/GF/Compile.hs b/src/compiler/GF/Compile.hs
index 01679f727..a52167450 100644
--- a/src/compiler/GF/Compile.hs
+++ b/src/compiler/GF/Compile.hs
@@ -33,7 +33,6 @@ import qualified Data.Map as Map
import qualified Data.Set as Set
import Data.List(nub)
import Data.Maybe (isNothing)
-import Data.Binary
import qualified Data.ByteString.Char8 as BS
import Text.PrettyPrint
@@ -144,7 +143,7 @@ compileOne opts env@(_,srcgr,_) file = do
-- for compiled gf, read the file and update environment
-- also undo common subexp optimization, to enable normal computations
".gfo" -> do
- sm00 <- putPointE Verbose opts ("+ reading" +++ file) $ ioeIO (decodeFile file)
+ sm00 <- putPointE Verbose opts ("+ reading" +++ file) $ ioeIO (decodeModule file)
let sm0 = (fst sm00, (snd sm00) {mflags = mflags (snd sm00) `addOptions` opts})
intermOut opts DumpSource (ppModule Internal sm0)
@@ -243,7 +242,7 @@ writeGFO opts file mo = do
let mo1 = subexpModule mo
mo2 = case mo1 of
(m,mi) -> (m,mi{jments=Map.filter (\x -> case x of {AnyInd _ _ -> False; _ -> True}) (jments mi)})
- putPointE Normal opts (" write file" +++ file) $ ioeIO $ encodeFile file mo2
+ putPointE Normal opts (" write file" +++ file) $ ioeIO $ encodeModule file mo2
-- auxiliaries