aboutsummaryrefslogtreecommitdiffhomepage
path: root/System
diff options
context:
space:
mode:
authorGravatar Herbert Valerio Riedel <hvr@gnu.org>2016-01-30 17:25:01 +0100
committerGravatar Herbert Valerio Riedel <hvr@gnu.org>2016-01-30 17:28:30 +0100
commit44a8b5240a8766f2561f36400713ea524dd745b0 (patch)
treeea13e66e626841575f67353eb36782a03b9755fd /System
parentc41080e2f7802e269a12f6511f1846f4740e5300 (diff)
Replace `__hsunix_time` wrapper with CApiFFI
Diffstat (limited to 'System')
-rw-r--r--System/Posix/Time.hs (renamed from System/Posix/Time.hsc)6
1 files changed, 3 insertions, 3 deletions
diff --git a/System/Posix/Time.hsc b/System/Posix/Time.hs
index a28050d..7a2232f 100644
--- a/System/Posix/Time.hsc
+++ b/System/Posix/Time.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE CApiFFI #-}
+{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 709
{-# LANGUAGE Safe #-}
#elif __GLASGOW_HASKELL__ >= 703
@@ -23,8 +25,6 @@ module System.Posix.Time (
-- how much already supported by System.Time?
) where
-#include "HsUnix.h"
-
import System.Posix.Types
import Foreign
import Foreign.C
@@ -37,5 +37,5 @@ import Foreign.C
epochTime :: IO EpochTime
epochTime = throwErrnoIfMinus1 "epochTime" (c_time nullPtr)
-foreign import ccall unsafe "__hsunix_time"
+foreign import capi unsafe "HsUnix.h time"
c_time :: Ptr CTime -> IO CTime