diff --git a/src/Eval.hs b/src/Eval.hs index 1827db01..11838a1f 100644 --- a/src/Eval.hs +++ b/src/Eval.hs @@ -7,7 +7,6 @@ import Data.Maybe (fromJust, mapMaybe, isJust) import Control.Monad.State import Control.Monad.State.Lazy (StateT(..), runStateT, liftIO, modify, get, put) import System.Exit (exitSuccess, exitFailure, exitWith, ExitCode(..)) -import System.IO (hPutStr) import qualified System.IO as SysIO import System.Directory (doesPathExist) import Control.Concurrent (forkIO) @@ -795,10 +794,9 @@ commandLoad [XObj (Str path) _ _] = return dynamicNil firstPathFound : _ -> do contents <- liftIO $ do --putStrLn ("Will load '" ++ firstPathFound ++ "'") - -- readFile firstPathFound - h <- SysIO.openFile firstPathFound SysIO.ReadMode - SysIO.hSetEncoding h SysIO.utf8 - SysIO.hGetContents h + handle <- SysIO.openFile firstPathFound SysIO.ReadMode + SysIO.hSetEncoding handle SysIO.utf8 + SysIO.hGetContents handle let files = projectFiles proj files' = if firstPathFound `elem` files then files