X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FRandom.hs;h=8b648a73654a2b1087e54b985dece207be395de1;hb=a2a70b9bf60672c72b35654105402cf21238b6f4;hp=4e9ba1ea76ba687e4aaf581928fdccddd1a70ddf;hpb=553e39786807a03e5072a717d722d56d646cbde8;p=haskell-directory.git diff --git a/System/Random.hs b/System/Random.hs index 4e9ba1e..8b648a7 100644 --- a/System/Random.hs +++ b/System/Random.hs @@ -70,6 +70,7 @@ import Prelude #ifdef __NHC__ import CPUTime ( getCPUTime ) import Foreign.Ptr ( Ptr, nullPtr ) +import Foreign.C ( CTime, CUInt ) #else import System.CPUTime ( getCPUTime ) import System.Time ( getClockTime, ClockTime(..) ) @@ -86,7 +87,7 @@ import Numeric ( readDec ) data ClockTime = TOD Integer () foreign import ccall "time.h time" readtime :: Ptr CTime -> IO CTime getClockTime :: IO ClockTime -getClockTime = do t <- readtime nullPtr; return (TOD (toInteger t) ()) +getClockTime = do CTime t <- readtime nullPtr; return (TOD (toInteger t) ()) #endif -- | The class 'RandomGen' provides a common interface to random number