diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2011-11-15 19:46:02 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2011-11-15 19:46:02 +0000 |
| commit | 04fdb41927699a6536e2cf3603d55ebf2f4a137d (patch) | |
| tree | 949c7ef1686b04b16fab7d952596aa75e65e0322 /src/compiler/GF | |
| parent | a2626e24dd9e468ee0c5ccd455e4a5f782d56522 (diff) | |
fix in the versioning of the .gfo files
Diffstat (limited to 'src/compiler/GF')
| -rw-r--r-- | src/compiler/GF/Compile/ReadFiles.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Grammar/Binary.hs | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/compiler/GF/Compile/ReadFiles.hs b/src/compiler/GF/Compile/ReadFiles.hs index a64bb2a06..276aa2975 100644 --- a/src/compiler/GF/Compile/ReadFiles.hs +++ b/src/compiler/GF/Compile/ReadFiles.hs @@ -115,7 +115,7 @@ getAllFiles opts ps env file = do case mb_mo of Just mo -> return (st,importsOfModule mo) Nothing - | isGFO file -> ioeErr $ Bad (file ++ " is compiled with different GF version and I cannot find the source file") + | isGFO file -> ioeErr $ Bad (file ++ " is compiled with different GF version and I can't find the source file") | otherwise -> do s <- ioeIO $ BS.readFile file case runP pModHeader s of Left (Pn l c,msg) -> ioeBad (file ++ ":" ++ show l ++ ":" ++ show c ++ ": " ++ msg) diff --git a/src/compiler/GF/Grammar/Binary.hs b/src/compiler/GF/Grammar/Binary.hs index 20adf3c48..c46f852a1 100644 --- a/src/compiler/GF/Grammar/Binary.hs +++ b/src/compiler/GF/Grammar/Binary.hs @@ -285,9 +285,8 @@ putGFOVersion = mapM_ (putWord8 . fromIntegral . ord) gfoVersion getGFOVersion = replicateM (length gfoVersion) (fmap (chr . fromIntegral) getWord8)
decodeModule :: FilePath -> IO SourceModule
-decodeModule fpath = do
- (m,mtype,mstatus,mflags,mextend,mwith,mopens,med,msrc) <- decodeFile_ fpath (getGFOVersion >> get)
- return (m,ModInfo mtype mstatus mflags mextend mwith mopens med msrc Nothing Map.empty)
+decodeModule fpath =
+ decodeFile_ fpath (getGFOVersion >> get)
decodeModuleHeader fpath = decodeFile_ fpath getVersionedMod
where
|
