aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--System/Posix/Files/Common.hsc4
1 files changed, 2 insertions, 2 deletions
diff --git a/System/Posix/Files/Common.hsc b/System/Posix/Files/Common.hsc
index ad52030..44d66e8 100644
--- a/System/Posix/Files/Common.hsc
+++ b/System/Posix/Files/Common.hsc
@@ -411,7 +411,7 @@ instance Storable CTimeSpec where
return $ CTimeSpec sec nsec
toCTimeSpec :: POSIXTime -> CTimeSpec
-toCTimeSpec t = CTimeSpec (CTime sec) (truncate $ 10^9 * frac)
+toCTimeSpec t = CTimeSpec (CTime sec) (truncate $ 10^(9::Int) * frac)
where
(sec, frac) = if (frac' < 0) then (sec' - 1, frac' + 1) else (sec', frac')
(sec', frac') = properFraction $ toRational t
@@ -441,7 +441,7 @@ instance Storable CTimeVal where
return $ CTimeVal sec usec
toCTimeVal :: POSIXTime -> CTimeVal
-toCTimeVal t = CTimeVal sec (truncate $ 10^6 * frac)
+toCTimeVal t = CTimeVal sec (truncate $ 10^(6::Int) * frac)
where
(sec, frac) = if (frac' < 0) then (sec' - 1, frac' + 1) else (sec', frac')
(sec', frac') = properFraction $ toRational t