File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
- {-# LANGUAGE CPP #-}
1
+ {-# LANGUAGE CPP, ScopedTypeVariables #-}
2
2
--
3
3
-- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons
4
4
--
@@ -63,8 +63,10 @@ import System.Plugins.Env ( isLoaded )
63
63
import System.Plugins.Consts ( objSuf , hiSuf , tmpDir )
64
64
-- import qualified System.MkTemp ( mkstemps )
65
65
66
+ import Control.Exception (IOException , catch )
66
67
import Data.Char
67
68
import Data.List
69
+ import Prelude hiding (catch )
68
70
69
71
import System.IO
70
72
import System.Environment ( getEnv )
@@ -119,7 +121,7 @@ foreign import ccall unsafe "mkstemps" c_mkstemps :: CString -> CInt -> IO Fd
119
121
-- bit like the mktemp shell utility
120
122
--
121
123
mkTemp :: IO (String ,Handle )
122
- mkTemp = do tmpd <- catch (getEnv " TMPDIR" ) (\ _ -> return tmpDir)
124
+ mkTemp = do tmpd <- catch (getEnv " TMPDIR" ) (\ (_ :: IOException ) -> return tmpDir)
123
125
mkTempIn tmpd
124
126
125
127
mkTempIn :: String -> IO (String , Handle )
You can’t perform that action at this time.
0 commit comments