+-- The standard nhc98 implementation of Time.ClockTime does not match
+-- the extended one expected in this module, so we lash-up a quick
+-- replacement here.
+#ifdef __NHC__
+data ClockTime = TOD Integer ()
+foreign import ccall "time.h time" readtime :: Int -> IO Int
+getClockTime :: IO ClockTime
+getClockTime = do t <- readtime 0; return (TOD (toInteger t) ())
+#endif
+