Fixes for GHC 8.x, archive loading, -dynamic, and file generation
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
{-# OPTIONS -fglasgow-exts -cpp #-}
|
||||
--
|
||||
-- Copyright (c) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons
|
||||
-- LGPL version 2.1 or later (see http://www.gnu.org/copyleft/lesser.html)
|
||||
@ -9,6 +8,8 @@ module TestIO ( resource_dyn ) where
|
||||
import API
|
||||
import Data.Dynamic
|
||||
|
||||
import Control.Exception (SomeException, catch)
|
||||
|
||||
import System.IO
|
||||
import System.Posix.Types ( ProcessID, Fd )
|
||||
import System.Posix.Process ( forkProcess, executeFile, getProcessID )
|
||||
@ -26,7 +27,7 @@ resource = testio { field = date }
|
||||
-- call a shell command , returning it's output
|
||||
--
|
||||
date :: IO String
|
||||
date = do (hdl,_,_) <- catch (popen "/bin/date") (\_->error "popen failed")
|
||||
date = do (hdl,_,_) <- catch (popen "/bin/date") (\(_ :: SomeException)->error "popen failed")
|
||||
hGetLine hdl
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user