From d01cfac221202c4d573ce759aa9e0122087d44a0 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Fri, 1 Mar 2013 16:42:22 +0900 Subject: [PATCH] removing unnecessary return value. --- Cabal.hs | 6 +++--- Check.hs | 4 ++-- Info.hs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cabal.hs b/Cabal.hs index 9c9dcf1..a892df2 100644 --- a/Cabal.hs +++ b/Cabal.hs @@ -23,16 +23,16 @@ import Types importDirs :: [String] importDirs = [".","..","../..","../../..","../../../..","../../../../.."] -initializeGHC :: Options -> FilePath -> [String] -> Bool -> Ghc (FilePath,LogReader) +initializeGHC :: Options -> FilePath -> [String] -> Bool -> Ghc LogReader initializeGHC opt fileName ghcOptions logging = withCabal ||> withoutCabal where withoutCabal = do logReader <- initSession opt ghcOptions importDirs Nothing logging - return (fileName,logReader) + return logReader withCabal = do (gopts,idirs,depPkgs) <- liftIO $ fromCabal ghcOptions logReader <- initSession opt gopts idirs (Just depPkgs) logging - return (fileName,logReader) + return logReader fromCabal :: [String] -> IO ([String], [FilePath], [String]) fromCabal ghcOptions = do diff --git a/Check.hs b/Check.hs index fab8579..a3b831d 100644 --- a/Check.hs +++ b/Check.hs @@ -21,8 +21,8 @@ check :: Options -> String -> IO [String] check opt fileName = withGHC' fileName $ checkIt `gcatch` handleErrMsg where checkIt = do - (file,readLog) <- initializeGHC opt fileName options True - setTargetFile file + readLog <- initializeGHC opt fileName options True + setTargetFile fileName _ <- load LoadAllTargets liftIO readLog options diff --git a/Info.hs b/Info.hs index feb3c1a..c487d77 100644 --- a/Info.hs +++ b/Info.hs @@ -143,8 +143,8 @@ inModuleContext opt fileName modstr action errmsg = withGHC (valid ||> invalid ||> return errmsg) where valid = do - (file,_) <- initializeGHC opt fileName ["-w"] False - setTargetFile file + _ <- initializeGHC opt fileName ["-w"] False + setTargetFile fileName _ <- load LoadAllTargets doif setContextFromTarget action invalid = do