From 2b88e86142ffbf79dad8596082ec301627a5682c Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 1 Jul 2010 14:24:15 +0000 Subject: [PATCH] extract information about Data.Time from docs for CTime --- Foreign/C/Types.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Foreign/C/Types.hs b/Foreign/C/Types.hs index 798c899..39a6b00 100644 --- a/Foreign/C/Types.hs +++ b/Foreign/C/Types.hs @@ -43,6 +43,14 @@ module Foreign.C.Types -- 'Prelude.Show', 'Prelude.Enum', 'Typeable' and 'Storable'. , CClock, CTime + -- extracted from CTime, because we don't want this comment in + -- the Haskell 2010 report: + + -- | To convert 'CTime' to 'Data.Time.UTCTime', use the following formula: + -- + -- > posixSecondsToUTCTime (realToFrac :: POSIXTime) + -- + -- ** Floating types -- | These types are are represented as @newtype@s of -- 'Prelude.Float' and 'Prelude.Double', and are instances of @@ -199,10 +207,6 @@ INTEGRAL_TYPE(CSigAtomic,tyConCSigAtomic,"CSigAtomic",HTYPE_SIG_ATOMIC_T) ARITHMETIC_TYPE(CClock,tyConCClock,"CClock",HTYPE_CLOCK_T) -- | Haskell type representing the C @time_t@ type. -- --- To convert to a @Data.Time.UTCTime@, use the following formula: --- --- > posixSecondsToUTCTime (realToFrac :: POSIXTime) --- ARITHMETIC_TYPE(CTime,tyConCTime,"CTime",HTYPE_TIME_T) -- FIXME: Implement and provide instances for Eq and Storable -- 1.7.10.4