diff options
| author | hallgren <hallgren@chalmers.se> | 2014-02-04 13:36:16 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-02-04 13:36:16 +0000 |
| commit | 3900d3cfbb47539a8acbd332cdea6a0b1a2f1a60 (patch) | |
| tree | 9eb30a06c37586eafc12f62a269fc1df767e740e | |
| parent | c97e5f40866a1c88ae06f096182954eb94d8e84f (diff) | |
GFC.hs: encodeFile_ is not available in the standard Data.Binary
| -rw-r--r-- | src/compiler/GFC.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/GFC.hs b/src/compiler/GFC.hs index 6e4c50258..acb4e21ab 100644 --- a/src/compiler/GFC.hs +++ b/src/compiler/GFC.hs @@ -18,7 +18,8 @@ import GF.Data.ErrM import GF.System.Directory import Data.Maybe -import Data.Binary +import Data.Binary(encode,encodeFile) +import Data.Binary.Put(runPut) import qualified Data.Map as Map import qualified Data.ByteString as BSS import qualified Data.ByteString.Lazy as BSL @@ -130,7 +131,8 @@ writePGF :: Options -> PGF -> IOE () writePGF opts pgf | flag optSplitPGF opts = do let outfile = grammarName opts pgf <.> "pgf" putPointE Normal opts ("Writing " ++ outfile ++ "...") $ liftIO $ do - encodeFile_ outfile (putSplitAbs pgf) + --encodeFile_ outfile (putSplitAbs pgf) + BSL.writeFile outfile (runPut (putSplitAbs pgf)) forM_ (Map.toList (concretes pgf)) $ \cnc -> do let outfile = showCId (fst cnc) <.> "pgf_c" putPointE Normal opts ("Writing " ++ outfile ++ "...") $ liftIO $ encodeFile outfile cnc |
