import EXCEPTION ( catchAllIO )
#endif
-import CString ( CString, peekCString )
import DATA_IOREF ( IORef, readIORef, writeIORef )
import DATA_INT
#else
import qualified Posix
#endif
-#else
+#else /* Must be Win32 */
import List ( isPrefixOf )
import Util ( dropList )
--- import Foreign.Marshal.Array
import Foreign
--- import CString
+import CString ( CString, peekCString )
#endif
#ifdef mingw32_HOST_OS
#else
import System ( system )
#endif
-
--- Make catch work on older GHCs
-#if __GLASGOW_HASKELL__ > 408
-myCatch = Exception.catch
-#else
-myCatch = catchAllIO
-#endif
-
\end{code}
("Deleting: " ++ unwords fs)
(mapM_ rm fs)
where
- rm f = removeFile f `myCatch`
+ rm f = removeFile f `catch`
(\_ignored ->
when (verb >= 2) $
hPutStrLn stderr ("Warning: deleting non-existent " ++ f)
; unless n $ do {
-- And run it!
- ; action `myCatch` handle_exn verb
+ ; action `catch` handle_exn verb
}}
where
handle_exn verb exn = do { when (verb >= 2) (hPutStr stderr "\n")