From: Duncan C. <dun...@us...> - 2004-12-09 18:26:25
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/c2hs/base/sysdep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28179/tools/c2hs/base/sysdep Modified Files: SysDep.hs Log Message: Change some import modules to use modern hierarchical modules so we no longer need the LocalData or LocalControl modules, nor the data or lang packages. This should still work all the way back to ghc 5.04.x, though it needs testing. Index: SysDep.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/c2hs/base/sysdep/SysDep.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SysDep.hs 28 Nov 2004 21:19:52 -0000 1.1 +++ SysDep.hs 9 Dec 2004 18:26:03 -0000 1.2 @@ -89,16 +89,29 @@ import Ix (Ix) import Monad (when) -import IOExts (fixIO, unsafePerformIO, - IORef, newIORef, readIORef, writeIORef, - IOArray, newIOArray, boundsIOArray, readIOArray, - writeIOArray, - trace) +import Control.Monad.Fix (mfix) +import System.IO.Unsafe (unsafePerformIO, unsafeInterleaveIO) +import Data.IORef (IORef, newIORef, readIORef, writeIORef) +import Data.Array.IO (IOArray, newArray, bounds, readArray, writeArray) +import Debug.Trace (trace) -- other system-dependent components -- import SysDepPosix +-- re-export some things with different names +-- +fixIO :: (a -> IO a) -> IO a +fixIO = mfix + +newIOArray :: Ix i => (i, i) -> e -> IO (IOArray i e) +newIOArray = newArray +boundsIOArray :: Ix i => IOArray i e -> (i, i) +boundsIOArray = bounds +readIOArray :: Ix i => IOArray i e -> i -> IO e +readIOArray = readArray +writeIOArray :: Ix i => IOArray i e -> i -> e -> IO () +writeIOArray = writeArray -- UNSAFE mutable variables -- ------------------------ |