Merge pull request #44 from eagletmt/cleanup-temporaries
Cleanup temporaries
This commit is contained in:
commit
575bdc4889
@ -12,7 +12,9 @@ import Types
|
|||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
withGHC :: (MonadPlus m) => Ghc (m a) -> IO (m a)
|
withGHC :: (MonadPlus m) => Ghc (m a) -> IO (m a)
|
||||||
withGHC body = ghandle ignore $ runGhc (Just libdir) body
|
withGHC body = ghandle ignore $ runGhc (Just libdir) $ do
|
||||||
|
dflags <- getSessionDynFlags
|
||||||
|
defaultCleanupHandler dflags body
|
||||||
where
|
where
|
||||||
ignore :: (MonadPlus m) => SomeException -> IO (m a)
|
ignore :: (MonadPlus m) => SomeException -> IO (m a)
|
||||||
ignore _ = return mzero
|
ignore _ = return mzero
|
||||||
|
Loading…
Reference in New Issue
Block a user