mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
fix in the versioning of the .gfo files
This commit is contained in:
@@ -115,7 +115,7 @@ getAllFiles opts ps env file = do
|
|||||||
case mb_mo of
|
case mb_mo of
|
||||||
Just mo -> return (st,importsOfModule mo)
|
Just mo -> return (st,importsOfModule mo)
|
||||||
Nothing
|
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
|
| otherwise -> do s <- ioeIO $ BS.readFile file
|
||||||
case runP pModHeader s of
|
case runP pModHeader s of
|
||||||
Left (Pn l c,msg) -> ioeBad (file ++ ":" ++ show l ++ ":" ++ show c ++ ": " ++ msg)
|
Left (Pn l c,msg) -> ioeBad (file ++ ":" ++ show l ++ ":" ++ show c ++ ": " ++ msg)
|
||||||
|
|||||||
@@ -285,9 +285,8 @@ putGFOVersion = mapM_ (putWord8 . fromIntegral . ord) gfoVersion
|
|||||||
getGFOVersion = replicateM (length gfoVersion) (fmap (chr . fromIntegral) getWord8)
|
getGFOVersion = replicateM (length gfoVersion) (fmap (chr . fromIntegral) getWord8)
|
||||||
|
|
||||||
decodeModule :: FilePath -> IO SourceModule
|
decodeModule :: FilePath -> IO SourceModule
|
||||||
decodeModule fpath = do
|
decodeModule fpath =
|
||||||
(m,mtype,mstatus,mflags,mextend,mwith,mopens,med,msrc) <- decodeFile_ fpath (getGFOVersion >> get)
|
decodeFile_ fpath (getGFOVersion >> get)
|
||||||
return (m,ModInfo mtype mstatus mflags mextend mwith mopens med msrc Nothing Map.empty)
|
|
||||||
|
|
||||||
decodeModuleHeader fpath = decodeFile_ fpath getVersionedMod
|
decodeModuleHeader fpath = decodeFile_ fpath getVersionedMod
|
||||||
where
|
where
|
||||||
|
|||||||
Reference in New Issue
Block a user