From 21f429caf8c8cb4248457c16abaf0ad4f51c974a Mon Sep 17 00:00:00 2001 From: hallgren Date: Wed, 20 Aug 2014 17:47:08 +0000 Subject: Add lifted directory operations in GF.System.Directory to eliminate the need for liftIO in various places --- src/compiler/GF/CompileOne.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compiler/GF/CompileOne.hs') diff --git a/src/compiler/GF/CompileOne.hs b/src/compiler/GF/CompileOne.hs index 31a0f81df..c99430079 100644 --- a/src/compiler/GF/CompileOne.hs +++ b/src/compiler/GF/CompileOne.hs @@ -37,7 +37,7 @@ compileOne :: Options -> SourceGrammar -> FullPath -> IOE OneOutput compileOne opts srcgr file = if isGFO file then reuseGFO opts srcgr file - else do b1 <- liftIO $ doesFileExist file + else do b1 <- doesFileExist file if b1 then useTheSource else reuseGFO opts srcgr (gf2gfo opts file) where @@ -47,7 +47,7 @@ compileOne opts srcgr file = ("- compiling" +++ file ++ "... ") (getSourceModule opts file) idump opts Source sm - cwd <- liftIO getCurrentDirectory + cwd <- getCurrentDirectory compileSourceModule opts cwd (Just file) srcgr sm putpOpt v m act @@ -65,7 +65,7 @@ reuseGFO opts srcgr file = idump opts Source sm0 let sm1 = unsubexpModule sm0 - cwd <- liftIO getCurrentDirectory + cwd <- getCurrentDirectory (sm,warnings) <- -- putPointE Normal opts "creating indirections" $ runCheck $ extendModule cwd srcgr sm1 warnOut opts warnings -- cgit v1.2.3