fix compiler warning regarding Prelude.catch -> Control.Exception.catch

This commit is contained in:
Jeremy Shaw 2012-03-19 22:26:53 +00:00
parent 0c1cb118c4
commit 58d98a7471

View File

@ -1,4 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE CPP, ScopedTypeVariables #-}
--
-- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons
--
@ -63,8 +63,10 @@ import System.Plugins.Env ( isLoaded )
import System.Plugins.Consts ( objSuf, hiSuf, tmpDir )
-- import qualified System.MkTemp ( mkstemps )
import Control.Exception (IOException, catch)
import Data.Char
import Data.List
import Prelude hiding (catch)
import System.IO
import System.Environment ( getEnv )
@ -119,7 +121,7 @@ foreign import ccall unsafe "mkstemps" c_mkstemps :: CString -> CInt -> IO Fd
-- bit like the mktemp shell utility
--
mkTemp :: IO (String,Handle)
mkTemp = do tmpd <- catch (getEnv "TMPDIR") (\_ -> return tmpDir)
mkTemp = do tmpd <- catch (getEnv "TMPDIR") (\ (_ :: IOException) -> return tmpDir)
mkTempIn tmpd
mkTempIn :: String -> IO (String, Handle)