From e94cc84c43db4d961f45f55119ad4a5e04ab7ae6 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Wed, 28 Apr 2010 21:59:27 +0900 Subject: [PATCH] ignoring error. --- Check.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Check.hs b/Check.hs index 38dca02..3200368 100644 --- a/Check.hs +++ b/Check.hs @@ -6,6 +6,7 @@ import Control.Monad import Data.IORef import DynFlags import ErrUtils +import Exception import FastString import GHC import GHC.Paths (libdir) @@ -32,7 +33,7 @@ cmdOptions :: [Located String] cmdOptions = map noLoc ["-Wall","-fno-warn-unused-do-bind"] check :: String -> String -> IO [String] -check fileName dir = defaultErrorHandler defaultDynFlags $ runGhc (Just libdir) $ do +check fileName dir = ghandle ignore $ runGhc (Just libdir) $ do ref <- liftIO $ newIORef [] initSession setTargetFile fileName @@ -46,6 +47,8 @@ check fileName dir = defaultErrorHandler defaultDynFlags $ runGhc (Just libdir) setTargetFile file = do target <- guessTarget file Nothing setTargets [target] + ignore :: SomeException -> IO [String] + ignore _ = return [] ----------------------------------------------------------------