diff options
Diffstat (limited to 'src/compiler/GFC.hs')
| -rw-r--r-- | src/compiler/GFC.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/GFC.hs b/src/compiler/GFC.hs index f75a39ab1..dd9f1771b 100644 --- a/src/compiler/GFC.hs +++ b/src/compiler/GFC.hs @@ -55,9 +55,9 @@ compileSourceFiles opts fs = compileCFFiles :: Options -> [FilePath] -> IOE () compileCFFiles opts fs = - do s <- ioeIO $ fmap unlines $ mapM readFile fs + do s <- liftIO $ fmap unlines $ mapM readFile fs let cnc = justModuleName (last fs) - gf <- ioeErr $ getCF cnc s + gf <- getCF cnc s gr <- compileSourceGrammar opts gf if flag optStopAfterPhase opts == Compile then return () @@ -76,7 +76,7 @@ unionPGFFiles opts fs = then putStrLnE $ "Refusing to overwrite " ++ pgfFile else writePGF opts pgf writeOutputs opts pgf - where readPGFVerbose f = putPointE Normal opts ("Reading " ++ f ++ "...") $ ioeIO $ readPGF f + where readPGFVerbose f = putPointE Normal opts ("Reading " ++ f ++ "...") $ liftIO $ readPGF f writeOutputs :: Options -> PGF -> IOE () writeOutputs opts pgf = do @@ -93,7 +93,7 @@ writeByteCode opts pgf path = case flag optOutputDir opts of Nothing -> file Just dir -> dir </> file - in putPointE Normal opts ("Writing " ++ path ++ "...") $ ioeIO $ + in putPointE Normal opts ("Writing " ++ path ++ "...") $ liftIO $ bracket (openFile path WriteMode) (hClose) @@ -109,14 +109,14 @@ writeByteCode opts pgf writePGF :: Options -> PGF -> IOE () writePGF opts pgf = do let outfile = grammarName opts pgf <.> "pgf" - putPointE Normal opts ("Writing " ++ outfile ++ "...") $ ioeIO $ encodeFile outfile pgf + putPointE Normal opts ("Writing " ++ outfile ++ "...") $ liftIO $ encodeFile outfile pgf grammarName :: Options -> PGF -> String grammarName opts pgf = fromMaybe (showCId (absname pgf)) (flag optName opts) writeOutput :: Options -> FilePath-> String -> IOE () writeOutput opts file str = - putPointE Normal opts ("Writing " ++ path ++ "...") $ ioeIO $ + putPointE Normal opts ("Writing " ++ path ++ "...") $ liftIO $ writeUTF8File path str where path = maybe id (</>) (flag optOutputDir opts) file |
