projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a409f49
)
extract information about Data.Time from docs for CTime
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 1 Jul 2010 14:24:15 +0000
(14:24 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 1 Jul 2010 14:24:15 +0000
(14:24 +0000)
Foreign/C/Types.hs
patch
|
blob
|
history
diff --git
a/Foreign/C/Types.hs
b/Foreign/C/Types.hs
index
798c899
..
39a6b00
100644
(file)
--- 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
-- '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
-- ** 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.
--
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
ARITHMETIC_TYPE(CTime,tyConCTime,"CTime",HTYPE_TIME_T)
-- FIXME: Implement and provide instances for Eq and Storable